module iana-hash-algs {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:iana-hash-algs";
prefix iha;
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web:
WG List:
Author: Kent Watsen
Author: Wang Haiguang ";
description
"This module defines a typedef for hash algorithms, and
a container for a list of hash algorithms supported by
the server.
Copyright (c) 2019 IETF Trust and the persons identified
as authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with
or without modification, is permitted pursuant to, and
subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.;
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all
capitals, as shown here.";
revision 2019-11-02 {
description
"Initial version";
reference
"RFC XXXX: Common YANG Data Types for Cryptography";
}
// Typedefs
typedef hash-algorithm-type {
type enumeration {
enum sha1 {
value 1;
status obsolete;
description
"The SHA1 algorithm.";
reference
"RFC 3174: US Secure Hash Algorithms 1 (SHA1).";
}
enum sha-224 {
value 2;
description
"The SHA-224 algorithm.";
reference
"RFC 6234: US Secure Hash Algorithms.";
}
enum sha-256 {
value 3;
description
"The SHA-256 algorithm.";
reference
"RFC 6234: US Secure Hash Algorithms.";
}
enum sha-384 {
value 4;
description
"The SHA-384 algorithm.";
reference
"RFC 6234: US Secure Hash Algorithms.";
}
enum sha-512 {
value 5;
description
"The SHA-512 algorithm.";
reference
"RFC 6234: US Secure Hash Algorithms.";
}
enum shake-128 {
value 6;
description
"The SHA3 algorithm with 128-bits output.";
reference
"National Institute of Standards and Technology,
SHA-3 Standard: Permutation-Based Hash and
Extendable-Output Functions, FIPS PUB 202, DOI
10.6028/NIST.FIPS.202, August 2015.";
}
enum shake-224 {
value 7;
description
"The SHA3 algorithm with 224-bits output.";
reference
"National Institute of Standards and Technology,
SHA-3 Standard: Permutation-Based Hash and
Extendable-Output Functions, FIPS PUB 202, DOI
10.6028/NIST.FIPS.202, August 2015.";
}
enum shake-256 {
value 8;
description
"The SHA3 algorithm with 256-bits output.";
reference
"National Institute of Standards and Technology,
SHA-3 Standard: Permutation-Based Hash and
Extendable-Output Functions, FIPS PUB 202, DOI
10.6028/NIST.FIPS.202, August 2015.";
}
enum shake-384 {
value 9;
description
"The SHA3 algorithm with 384-bits output.";
reference
"National Institute of Standards and Technology,
SHA-3 Standard: Permutation-Based Hash and
Extendable-Output Functions, FIPS PUB 202, DOI
10.6028/NIST.FIPS.202, August 2015.";
}
enum shake-512 {
value 10;
description
"The SHA3 algorithm with 384-bits output.";
reference
"National Institute of Standards and Technology,
SHA-3 Standard: Permutation-Based Hash and
Extendable-Output Functions, FIPS PUB 202, DOI
10.6028/NIST.FIPS.202, August 2015.";
}
}
description
"A typedef enumerating various hash key algorithms.";
}
// Protocol-accessible Nodes
container supported-hash-algorithms {
config false;
description
"A container for a list of supported hash algorithms.
How algorithms come to be supported is outside the
scope of this module.";
list supported-hash-algorithm {
key algorithm;
description
"A lists of hash algorithms supported by the server.";
leaf algorithm {
type hash-algorithm-type;
description
"An hash algorithms supported by the server.";
}
}
}
}