aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/TestVNF/netconftemplates/netconftemplates/iana-crypt-hash@2014-08-06.yin
blob: d37aac18c79255f7efed6b51bc67c3902219922b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
  <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;module name="iana-crypt-hash"
        xmlns="urn:ietf:params:xml:ns:yang:yin:1"
        xmlns:ianach="urn:ietf:params:xml:ns:yang:iana-crypt-hash"&gt;
  &lt;namespace uri="urn:ietf:params:xml:ns:yang:iana-crypt-hash"/&gt;
  &lt;prefix value="ianach"/&gt;
  &lt;organization&gt;
    &lt;text&gt;IANA&lt;/text&gt;
  &lt;/organization&gt;
  &lt;contact&gt;
    &lt;text&gt;        Internet Assigned Numbers Authority

Postal: ICANN
        12025 Waterfront Drive, Suite 300
        Los Angeles, CA  90094-2536
        United States

Tel:    +1 310 301 5800
E-Mail: iana@iana.org&amp;gt;&lt;/text&gt;
  &lt;/contact&gt;
  &lt;description&gt;
    &lt;text&gt;This YANG module defines a type for storing passwords
using a hash function and features to indicate which hash
functions are supported by an implementation.

The latest revision of this YANG module can be obtained from
the IANA web site.

Requests for new values should be made to IANA via
email (iana@iana.org).

Copyright (c) 2014 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
(http://trustee.ietf.org/license-info).

The initial version of this YANG module is part of RFC 7317;
see the RFC itself for full legal notices.&lt;/text&gt;
  &lt;/description&gt;
  &lt;revision date="2014-08-06"&gt;
    &lt;description&gt;
      &lt;text&gt;Initial revision.&lt;/text&gt;
    &lt;/description&gt;
    &lt;reference&gt;
      &lt;text&gt;RFC 7317: A YANG Data Model for System Management&lt;/text&gt;
    &lt;/reference&gt;
  &lt;/revision&gt;
  &lt;feature name="crypt-hash-md5"&gt;
    &lt;description&gt;
      &lt;text&gt;Indicates that the device supports the MD5
hash function in 'crypt-hash' values.&lt;/text&gt;
    &lt;/description&gt;
    &lt;reference&gt;
      &lt;text&gt;RFC 1321: The MD5 Message-Digest Algorithm&lt;/text&gt;
    &lt;/reference&gt;
  &lt;/feature&gt;
  &lt;feature name="crypt-hash-sha-256"&gt;
    &lt;description&gt;
      &lt;text&gt;Indicates that the device supports the SHA-256
hash function in 'crypt-hash' values.&lt;/text&gt;
    &lt;/description&gt;
    &lt;reference&gt;
      &lt;text&gt;FIPS.180-4.2012: Secure Hash Standard (SHS)&lt;/text&gt;
    &lt;/reference&gt;
  &lt;/feature&gt;
  &lt;feature name="crypt-hash-sha-512"&gt;
    &lt;description&gt;
      &lt;text&gt;Indicates that the device supports the SHA-512
hash function in 'crypt-hash' values.&lt;/text&gt;
    &lt;/description&gt;
    &lt;reference&gt;
      &lt;text&gt;FIPS.180-4.2012: Secure Hash Standard (SHS)&lt;/text&gt;
    &lt;/reference&gt;
  &lt;/feature&gt;
  &lt;typedef name="crypt-hash"&gt;
    &lt;type name="string"&gt;
      &lt;pattern value="$0$.*|$1$[a-zA-Z0-9./]{1,8}$[a-zA-Z0-9./]{22}|$5$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{43}|$6$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{86}"/&gt;
    &lt;/type&gt;
    &lt;description&gt;
      &lt;text&gt;The crypt-hash type is used to store passwords using
a hash function.  The algorithms for applying the hash
function and encoding the result are implemented in
various UNIX systems as the function crypt(3).

A value of this type matches one of the forms:

  $0$&amp;lt;clear text password&amp;gt;
  $&amp;lt;id&amp;gt;$&amp;lt;salt&amp;gt;$&amp;lt;password hash&amp;gt;
  $&amp;lt;id&amp;gt;$&amp;lt;parameter&amp;gt;$&amp;lt;salt&amp;gt;$&amp;lt;password hash&amp;gt;

The '$0$' prefix signals that the value is clear text.  When
such a value is received by the server, a hash value is
calculated, and the string '$&amp;lt;id&amp;gt;$&amp;lt;salt&amp;gt;$' or
$&amp;lt;id&amp;gt;$&amp;lt;parameter&amp;gt;$&amp;lt;salt&amp;gt;$ is prepended to the result.  This
value is stored in the configuration data store.
If a value starting with '$&amp;lt;id&amp;gt;$', where &amp;lt;id&amp;gt; is not '0', is
received, the server knows that the value already represents a
hashed value and stores it 'as is' in the data store.

When a server needs to verify a password given by a user, it
finds the stored password hash string for that user, extracts
the salt, and calculates the hash with the salt and given
password as input.  If the calculated hash value is the same
as the stored value, the password given by the client is
accepted.

This type defines the following hash functions:

  id | hash function | feature
  ---+---------------+-------------------
   1 | MD5           | crypt-hash-md5
   5 | SHA-256       | crypt-hash-sha-256
   6 | SHA-512       | crypt-hash-sha-512

The server indicates support for the different hash functions
by advertising the corresponding feature.&lt;/text&gt;
    &lt;/description&gt;
    &lt;reference&gt;
      &lt;text&gt;IEEE Std 1003.1-2008 - crypt() function
RFC 1321: The MD5 Message-Digest Algorithm
FIPS.180-4.2012: Secure Hash Standard (SHS)&lt;/text&gt;
    &lt;/reference&gt;
  &lt;/typedef&gt;
&lt;/module&gt;
</data>
</rpc-reply>