idnits 2.17.1 draft-farrell-decade-ni-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 23, 2012) is 4379 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'Required' is mentioned on line 224, but not defined == Missing Reference: 'Optional' is mentioned on line 231, but not defined ** Obsolete normative reference: RFC 4395 (Obsoleted by RFC 7595) ** Obsolete normative reference: RFC 5785 (Obsoleted by RFC 8615) == Outdated reference: A later version (-23) exists of draft-ietf-dane-protocol-19 -- Obsolete informational reference (is this intentional?): RFC 4843 (Obsoleted by RFC 7343) -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force S. Farrell 3 Internet-Draft Trinity College Dublin 4 Intended status: Standards Track D. Kutscher 5 Expires: October 25, 2012 NEC 6 C. Dannewitz 7 University of Paderborn 8 B. Ohlman 9 A. Keranen 10 Ericsson 11 P. Hallam-Baker 12 Comodo Group Inc. 13 April 23, 2012 15 Naming Things with Hashes 16 draft-farrell-decade-ni-04 18 Abstract 20 This document defines a set of ways to identify a thing using the 21 output from a hash function, specifying URI, URL, binary and human 22 "speakable" formats for these names. The various formats are 23 designed to support, but not require, a strong link to the referenced 24 object such that the referenced object may be authenticated to the 25 same degree as the reference to it. 27 Status of this Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on October 25, 2012. 44 Copyright Notice 46 Copyright (c) 2012 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 59 2. Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 3. Named Information (ni) URI Format . . . . . . . . . . . . . . 5 61 4. .well-known URL Format . . . . . . . . . . . . . . . . . . . . 7 62 5. URL Segment Format . . . . . . . . . . . . . . . . . . . . . . 8 63 6. Binary Format . . . . . . . . . . . . . . . . . . . . . . . . 8 64 7. Human-readable Format . . . . . . . . . . . . . . . . . . . . 9 65 8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 66 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 67 9.1. Assignment of Named Information (ni) URI Scheme . . . . . 11 68 9.2. Assignment of Named Information for Humans (nih) URI 69 Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . 12 70 9.3. Assignment of Well Known URI prefix ni . . . . . . . . . . 12 71 9.4. Hash Name Algorithm Registry . . . . . . . . . . . . . . . 13 72 10. Security Considerations . . . . . . . . . . . . . . . . . . . 13 73 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 14 74 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 14 75 12.1. Normative References . . . . . . . . . . . . . . . . . . . 14 76 12.2. Informative References . . . . . . . . . . . . . . . . . . 15 77 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 16 79 1. Introduction 81 Names or identifiers are used in various protocols for identifying 82 resources. In many scenarios those names or identifiers contain 83 values that are hash function outputs. However, different 84 deployments have chosen various different ways to include hash 85 function outputs in such names or identifiers. This document 86 specifies standard ways to do that to aid interoperability. 88 Hash function outputs can be used to ensure uniqueness in terms of 89 mapping URIs [RFC3986] to a specific resource, or to make URIs hard 90 to guess for security reasons. Since, there is no standard way to 91 interpret those strings, today in general only the creator of the URI 92 knows how to use the hash function output. Other protocols, such as 93 application layer protocols for accessing "smart objects" in 94 constrained environments also require more compact (e.g., binary) 95 forms of such identifiers, while in other situations people may have 96 to input such values or talk about them, e.g., in a voice call. 98 As another example, protocols for accessing in-network storage 99 servers need a way to identify stored resources uniquely and in a 100 location-independent way so that replicas on different servers can be 101 accessed by the same name. Also, such applications may require 102 verifying that a resource representation that has been obtained 103 actually corresponds to the name that was used to request the 104 resource, i.e., verifying the integrity of the name-data binding. 106 Similarly, in the context of information-centric networking 107 [ref.netinf-design] [ref.ccn] and elsewhere there is value in being 108 able to compare a presented resource against the URI that was 109 dereferenced in order to access that resource. If a 110 cryptographically-strong comparison function can be used then this 111 allows for many forms of in-network storage, without requiring as 112 much trust in the infrastructure used to present the resource. The 113 outputs of hash functions can be used in this manner, if presented in 114 a standard way. 116 Additional applications might include creating references from web 117 pages delivered over HTTP/TLS; DNS resource records signed using 118 DNSSEC or data values embedded in certificates, Certificate 119 Revocation Lists (CRLs), or other signed data objects. 121 The new URI scheme defined here allows for the use of a query-string, 122 similar to how query-strings are used in HTTP URLs. A companion 123 specification [niexts] describes specific values that can be used in 124 such query strings for various purposes and other extensions to this 125 basic format specification. 127 The "ni" URI scheme defined here is very similar to the "magnet link" 128 informally defined in various other protocols. [magnet] 130 In addition to the URI form we also define a ".well-known" URL 131 equivalent, and a way to include a hash as a segment of an HTTP URL, 132 as well as a binary format for use in protocols that require more 133 compact names and a human-speakable text form that could be used, 134 e.g. for reading out (parts of) the name over a voice connection. 136 Not all uses of these names require use of the full hash output - 137 truncated hashes can be safely used in some environments. For this 138 reason, we define a new IANA registry for hash functions to be used 139 with this specification so as not to mix strong and weak (truncated) 140 hash algorithms in other protocol registries. 142 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 143 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 144 document are to be interpreted as described in RFC 2119 [RFC2119]. 146 Syntax definitions in this memo are specified according to ABNF 147 [RFC5234]. 149 2. Basics 151 This section contains basic considerations common to all formats. 153 When verifying whether two names refer to same object, an 154 implementation MUST only consider the digest algorithm identifier and 155 the digest value, i.e., it MUST NOT consider the authority field from 156 a URI or any parameters and MUST consider two hashes identical 157 regardless of encoding, if they encode the same binary value, and are 158 the same length. 160 The sha-256 algorithm as specified in [RFC4055] is mandatory to 161 implement, that is, implementations MUST be able to generate/send and 162 to accept/process names based on a sha-256 hash. However 163 implementations MAY support additional hash algorithms and MAY use 164 those for specific names, for example in a constrained environment 165 where sha-256 is non-optimal or where truncated names are needed to 166 fit into corresponding protocols (when a higher collision probability 167 can be tolerated). 169 Truncated hashes MAY be supported if needed. When a hash value is 170 truncated the name MUST indicate this. Therefore we use different 171 hash algorithm strings for these, such as sha-256-32 for a 32-bit 172 truncation of a sha-256 output. (Note that a 32-bit truncated hash 173 is essentially useless for security but might be useful for naming.) 174 When a hash value is truncated to N bits the left-most or most 175 significant in network byte order N bits from the binary 176 representation of the hash value MUST be used as the truncated value. 177 An example of a 128-bit hash output truncated to 32 bits is shown in 178 Figure 1. 180 128-bit hash: 0x265357902fe1b7e2a04b897c6025d7a2 181 32-bit truncated hash: 0x26535790 183 Figure 1: Example of Truncated Hash 185 When the input to the hash algorithm is a public key value, as may be 186 used by various security protocols, the hash SHOULD be calculated 187 over the public key in an X.509 SubjectPublicKeyInfo structure 188 (Section 4.1 of [RFC5280]). This input has been chosen primarily for 189 compatibility with DANE [I-D.ietf-dane-protocol], but also includes 190 any relevant public key parameters in the hash input, which is 191 sometimes necessary for security reasons. Note also that this does 192 not force use of X.509 or full compliance with [RFC5280] since 193 formatting any public key as a SubjectPublicKeyInfo is relatively 194 straightforward and well supported by libraries. 196 Any of the formats defined below can be used to represent the 197 resulting name for a public key. 199 Other than in the above special case where public keys are used, we 200 do not specify the hash function input here. Other specifications 201 are expected to define this. 203 3. Named Information (ni) URI Format 205 A Named Information (ni) URI consists of the following components: 207 Scheme Name [Required] The scheme name is 'ni'. 209 Colon and Slashes [Required] The literal "://" 211 Authority [Optional] The optional authority component may assist 212 applications in accessing the object named by an ni URI. Note 213 that while the ni names with and without an authority differ 214 syntactically, both names refer to the same object if the digest 215 algorithm and value are the same. 217 One slash [Required] The literal "/" 219 Digest Algorithm [Required] The name of the digest algorithm, as 220 specified in the IANA registry defined in Section 9.4 below. 222 Separator [Required] The literal ";" 224 Digest Value [Required] The digest value encoded in the specified 225 encoding. 227 Query Parameter separator [Optional] '?' The query parameter 228 separator acts a separator between the digest value and the query 229 parameters (if specified). 231 Query Parameters [Optional] A tag=value list of optional query 232 parameters as are used with HTTP URLs. 234 It is OPTIONAL for implementations to check the integrity of the URI/ 235 resource mapping when sending, receiving or processing "ni" URIs. 237 The digest value MUST be encoded using base64url [RFC4648] encoding. 239 The query segment of a URI is NOT hierarchical. Thus escape encoding 240 of slash '/' characters is NOT required. Since application code 241 often attempts to enforce such encoding, decoders MUST recognize the 242 use of URI escape encoding (e.g., '%2f' or '%2F' for the slash 243 character). Section 3.4 of [RFC3986] states that "The characters 244 slash ("/") and question mark ("?") may represent data within the 245 query component." 247 Consequently no special escaping mechanism is required for the query 248 parameter portion of ni URIs. URI escaping is however frequently 249 imposed automatically by scripting environments. Thus to ensure 250 interoperability, implementations SHOULD NOT generate URIs that 251 employ URI character escaping, and implementations MUST NOT reject 252 any URIs that employ URI character escaping. 254 The Named Information URI has the following syntax: 256 niname ="ni://" [ authority ] "/" algval [ "?" query ] 257 algval = alg ";" val 258 alg = 1*unreserved 259 val = 1*unreserved 260 unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" 262 Figure 2: ni Name syntax 264 Note that "unreserved" is defined in the URI specification [RFC3986] 265 Section 2.3, in the way shown above. The "authority" and "query" 266 types are also from the URI specification. [RFC3986] 268 The "val" field MUST contain the output of applying the hash function 269 ("alg") to its defined input, which defaults to the object bytes that 270 are expected to be returned when the URI is dereferenced. 272 4. .well-known URL Format 274 We define a mapping between URIs following the ni URI scheme and HTTP 275 or HTTPS URLs that makes use of the .well-known URI [RFC5785] by 276 defining an "ni" suffix (see Section 9). 278 The HTTP(S) mapping MAY be used in any context where clients without 279 support for ni URIs are needed without loss of interoperability or 280 functionality. 282 For an ni name of the form "ni://n-authority/alg;val?query-string" 283 the corresponding HTTP(S) URL produced by this mapping is 284 "http://h-authority/.well-known/ni/alg/val?query-string", where 285 "h-authority" is derived as follows: If the ni name has a specified 286 authority (i.e., the n-authority is non-empty) then the h-authority 287 MUST have the same value. If the ni name has no authority specified 288 (i.e. the n-authority string is empty), a h-authority value MAY be 289 derived from the application context. For example, if the mapping is 290 being done in the context of a web page then the origin [RFC6454] for 291 that web site can be used. Of course, there are in general no 292 guarantees that the object named by the ni URI will be available at 293 the corresponding HTTP(S) URL. But in the case that any data is 294 returned, the retriever can determine whether or not it is content 295 that matches the ni URI. 297 If an application is presented with a HTTP(S) URL with "/.well- 298 known/ni/" as the start of its pathname component, then the reverse 299 mapping to an ni URI either including or excluding the authority 300 might produce an ni URI that is meaningful, but there is no guarantee 301 that this will be the case. 303 When mapping from a ni URI to a .well-known URL, an implementation 304 will have to decide between choosing an "http" or "https" URL. If 305 the object referenced does in fact match the hash in the URL, then 306 there is arguably no need for additional data integrity, if the ni 307 URI or .well-known URL was received "securely." However TLS also 308 provides confidentiality, so there may still be reasons to use the 309 "https" URL scheme even in this case. In general however, whether to 310 use "http" or "https" is something that needs to be decided by the 311 application. 313 5. URL Segment Format 315 Some applications may benefit from using hashes in existing HTTP URLs 316 or other URLs. To do this one simply uses the "algval" production 317 from the ni name scheme ABNF which may be included in the pathname 318 component of HTTP URLs. In such cases there is nothing present in 319 the URL that ensures that a client can depend on compliance with this 320 specification, so clients MUST NOT assume that any URL with a 321 pathname component that matches the "algval" production was in fact 322 produced as a result of this specification. That URL might or might 323 not be related to this specification, only the context will tell. 325 6. Binary Format 327 When a more space-efficient version of the name is needed, we can use 328 a binary format. The binary format name consists of two fields: a 329 header and the hash value. The header field defines how the 330 identifier has been created and the hash value contains a (possibly 331 truncated) result of a one-way hash over whatever is being identified 332 by the hash value. The format of the binary representation of a name 333 is shown in Figure 3. 335 0 1 2 3 336 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 337 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 338 |Res| Suite ID | Hash Value / 339 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 340 / ... / 341 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 342 / ... | 343 +-+-+-+-+-+-+-+-+ 345 Figure 3: Binary Name Format 347 The Res field is a reserved 2-bit field for future use and MUST be 348 set to zero for this specification. 350 The hash algorithm and truncation length are specified by the Suite 351 ID. For maintaining efficient encoding for the binary presentation, 352 only a few hash algorithms and truncation lengths are supported. See 353 Section 9.4 for details. 355 Note that a hash value that is truncated to 120 bits will result in 356 the overall name being a 128-bit value which may be useful with 357 certain use-cases. 359 7. Human-readable Format 361 Sometimes the name may need to be used in a format that is easy for 362 humans to read and possibly communicate, for example, over the phone. 363 For this purpose, the following more verbose but less ambiguous (when 364 spoken) URI format is defined with scheme name "nih", standing for 365 "Named Information for Humans." (Or possibly "Not Invented Here," 366 which is clearly false, and therefore worth including :-) 368 As with the ni URI format, nih URI fields are separated by a semi- 369 colon (;) character. The first field is a hash algorithm string, as 370 in the ni URI format. Then the hash value is encoded using ASCII hex 371 characters and lower-case alphabet. 373 The hash value is OPTIONALLY followed by a checksum. The checksum 374 MUST be calculated as a crc16 over the following parts (encoded as 375 UTF-8 [RFC3629]): the URI scheme and separator ("nih:"), the 376 algorithm string, the first delimiter, (";") the hash value, and the 377 second delimiter (also ";"). The 16-bit result of the crc16 is 378 encoded using network byte order and, like the hash value, with 379 lower-case ASCII hex characters. 381 The crc16 MUST use the CRC-CCITT polynomial: x^16 + x^12 + x^5 + 1. 383 humanname = "nih:" algval [ ";" checksum ] 384 algval = alg ";" val 385 alg = 1*unreserved 386 val = 1*unreserved 387 checksum = 1*unreserved 389 Figure 4: Human-readable syntax 391 For algorithms that have a Suite ID reserved (see Figure 7), the alg 392 field MAY contain the ID value as a UTF-8 encoded decimal number 393 instead of the hash name string (for example, "3" instead of "sha- 394 256-120"). Implementations MUST be able to match the decimal ID 395 values for the algorithms and hash lengths that they support even if 396 they do not support the binary presentation. Note that using the 397 decimal presentation instead of the hash name string results in a 398 different checksum for the same name. 400 8. Examples 402 The following ni URI references the text "Hello World!" (without the 403 quotes, being 12 characters), using the sha-256 algorithm and no 404 authority field: 406 ni:///sha-256;A7ogTlDRJuRnTABeBNguhMITZngK8fQ71Uo3gWtqs0A 408 And the same example shown with an authority would be: 410 ni://example.com/sha-256;A7ogTlDRJuRnTABeBNguhMITZngK8fQ71Uo3gWtqs0A 412 The following HTTP URL represents a mapping from the previous ni name 413 based on the algorithm outlined above. 415 http://example.com/.well-known/ni/sha-256/ 416 A7ogTlDRJuRnTABeBNguhMITZngK8fQ71Uo3gWtqs0A 418 Given the SubjectPublicKeyInfo in Figure 5 we derive the names shown 419 in Figure 6 for this value. 421 0000000 82 01 0a 02 82 01 01 00 a2 5f 83 da 9b d9 f1 7a 422 0000020 3a 36 67 ba fd 5a 94 0e cf 16 d5 5a 55 3a 5e d4 423 0000040 03 b1 65 8e 6d cf a3 b7 db a4 e7 cc 0f 52 c6 7d 424 0000060 35 1d c4 68 c2 bd 7b 9d db e4 0a d7 10 cd f9 53 425 0000100 20 ee 0d d7 56 6e 5b 7a ae 2c 5f 83 0a 19 3c 72 426 0000120 58 96 d6 86 e8 0e e6 94 eb 5c f2 90 3e f3 a8 8a 427 0000140 88 56 b6 cd 36 38 76 22 97 b1 6b 3c 9c 07 f3 4f 428 0000160 97 08 a1 bc 29 38 9b 81 06 2b 74 60 38 7a 93 2f 429 0000200 39 be 12 34 09 6e 0b 57 10 b7 a3 7b f2 c6 ee d6 430 0000220 c1 e5 ec ae c5 9c 83 14 f4 6b 58 e2 de f2 ff c9 431 0000240 77 07 e3 f3 4c 97 cf 1a 28 9e 38 a1 b3 93 41 75 432 0000260 a1 a4 76 3f 4d 78 d7 44 d6 1a e3 ce e2 5d c5 78 433 0000300 4c b5 31 22 2e c7 4b 8c 6f 56 78 5c a1 c4 c0 1d 434 0000320 ca e5 b9 44 d7 e9 90 9c bc ee b0 a2 b1 dc da 6d 435 0000340 a0 0f f6 ad 1e 2c 12 a2 a7 66 60 3e 36 d4 91 41 436 0000360 c2 f2 e7 69 39 2c 9d d2 df b5 a3 44 95 48 7c 87 437 0000400 64 89 dd bf 05 01 ee dd 02 03 01 00 01 438 0000415 440 0000000 c4 f6 dd 00 8f 7e b5 a0 95 cf 09 c5 8d d7 95 ba 441 0000020 1d 06 6c 11 50 cf 2a e3 d3 07 9b fa af e6 2b 1a 443 Figure 5: A SubjectPublicKeyInfo used in examples and its sha-256 444 hash 446 +-------------------------------------------------------------------+ 447 | URI: | 448 | ni:///sha-256;xPbdAI9-taCVzwnFjdeVuh0GbBFQzyrj0web-q_mKxo | 449 +-------------------------------------------------------------------+ 450 | .well-known URL (split over 2 lines): | 451 | http://example.com/.well-known/ni/sha256/ | 452 | xPbdAI9-taCVzwnFjdeVuh0GbBFQzyrj0web-q_mKxo | 453 +-------------------------------------------------------------------+ 454 | URL Segment: | 455 | sha-256;xPbdAI9-taCVzwnFjdeVuh0GbBFQzyrj0web-q_mKxo | 456 +-------------------------------------------------------------------+ 457 | Binary name (ASCII hex encoded) with 120-bit truncated hash value | 458 | which is Suite ID 0x03: | 459 | 03c4 f6dd 008f 7eb5 a095 cf09 c58d d795 | 460 +-------------------------------------------------------------------+ 461 | Human-readable form of a name for this key (truncated to 120 bits | 462 | in length) with checksum: | 463 | nih:sha-256-120;c4f6dd008f7eb5a095cf09c58dd795;8b04 | 464 +-------------------------------------------------------------------+ 465 | Human-readable form of a name for this key (truncated to 32 bits | 466 | in length) with checksum: | 467 | nih:sha-256-32;c4f6dd00;1fa8 | 468 +-------------------------------------------------------------------+ 469 | Human-readable form using decimal presentation of the | 470 | algorithm ID (sha-256-120) with checksum: | 471 | nih:3;c4f6dd008f7eb5a095cf09c58dd795;1819 | 472 +-------------------------------------------------------------------+ 474 Figure 6: Example Names 476 9. IANA Considerations 478 9.1. Assignment of Named Information (ni) URI Scheme 480 The procedures for registration of a URI scheme are specified in RFC 481 4395 [RFC4395]. The following is the proposed assignment template. 483 URI scheme name: ni 485 Status: Permanent 487 URI scheme syntax. See Section 3 489 URI scheme semantics. See Section 3 491 Encoding considerations. See Section 3 492 Applications/protocols that use this URI scheme name: General 493 applicability with initial use cases provided by CoAP and DECADE 495 Interoperability considerations: Defined here. 497 Security considerations: See Section 10 499 Contact: stephen.farrell@cs.tcd.ie 501 Author/Change controller: IETF 503 References: As specified in this document 505 9.2. Assignment of Named Information for Humans (nih) URI Scheme 507 The procedures for registration of a URI scheme are specified in RFC 508 4395 [RFC4395]. The following is the proposed assignment template. 510 URI scheme name: nih 512 Status: Permanent 514 URI scheme syntax. See Section 7 516 URI scheme semantics. See Section 7 518 Encoding considerations. See Section 7 520 Applications/protocols that use this URI scheme name: General 521 applicability with initial use cases provided by CoAP and DECADE 523 Interoperability considerations: Defined here. 525 Security considerations: See Section 10 527 Contact: stephen.farrell@cs.tcd.ie 529 Author/Change controller: IETF 531 References: As specified in this document 533 9.3. Assignment of Well Known URI prefix ni 535 The procedures for registration of a Well Known URI entry are 536 specified in RFC 5785 [RFC5785]. The following is the proposed 537 assignment template. 539 URI suffix: ni 540 Change controller: IETF 542 Specification document(s): This document 544 Related information: None 546 9.4. Hash Name Algorithm Registry 548 IANA is requested to create a new registry for hash algorithms as 549 used in the name formats specified here. This registry has four 550 fields, the binary suite ID, the hash algorithm name string, the 551 truncation length and the underlying algorithm reference. Future 552 assignments are to be made through expert review [RFC5226]. Initial 553 values are specified below. 555 Since there are only 63 possible binary suite ID field values allowed 556 by the binary format specified here, the suite ID field value is 557 OPTIONAL. Where the binary format is not expected to be used for a 558 given hash algorithm, this field SHOULD be omitted. 560 ID Hash name string Value length Reference 561 0 Reserved 562 1 sha-256 256 bits [RFC4055] 563 2 sha-256-128 128 bits [RFC4055] 564 3 sha-256-120 120 bits [RFC4055] 565 4 sha-256-96 96 bits [RFC4055] 566 5 sha-256-64 64 bits [RFC4055] 567 6 sha-256-32 32 bits [RFC4055] 568 32 Reserved 570 Figure 7: Suite Identifiers 572 The Suite ID value 32 is reserved for compatibility with ORCHIDs 573 [RFC4843]. The referenced hash algorithm matching to the Suite ID, 574 truncated to the length indicated, according to the description given 575 in Section 2, MUST be used for generating the hash. 577 10. Security Considerations 579 No secret information is required to generate or verify a name of the 580 form described here. Therefore a name like this can only provide 581 evidence for the integrity for the referenced object and the proof of 582 integrity provided is only as good as the proof of integrity for the 583 name from which we started. In other words, the hash value can 584 provide a name-data integrity binding between the name and the bytes 585 returned when the name is de-referenced using some protocol. 587 Disclosure of a name value does not necessarily entail disclosure of 588 the referenced object but may enable an attacker to determine the 589 contents of the referenced object by reference to a search engine or 590 other data repository or, for a highly formatted object with little 591 variation, by simply guessing the value and checking if the digest 592 value matches. So the fact that these names contain hashes does not 593 protect the confidentiality of the object that was input to the hash. 595 The integrity of the referenced content would be compromised if a 596 weak hash function were used. So don't use those. SHA-256 is 597 currently our preferred hash algorithm which is why we've only added 598 SHA-256 based suites to the initial IANA registry. 600 If a truncated hash value is used, certain security properties will 601 be affected. In general a hash algorithm is designed to produce 602 sufficient bits to prevent a 'birthday attack' collision occurring. 603 To ensure that the difficulty of discovering two pieces of content 604 that result in the same digest with a work factor O(2^x) by brute 605 force requires a digest length of 2x. Many security applications 606 only require protection against a 2nd pre-image attack which only 607 requires a digest length of x to achieve the same work factor. 608 Basically, the shorter the hash value used, the less security benefit 609 you can possibly get. 611 11. Acknowledgements 613 This work has been supported by the EU FP7 project SAIL. The authors 614 would like to thank SAIL participants to our naming discussions, 615 especially Jean-Francois Peltier, for their input. 617 The authors would also like to thank Bob Moskowitz, Tero Kivinen, 618 Zach Shelby, Carsten Bormann, David McGrew, Eric Rescorla, Tobias 619 Heer, Martin Thomas and James Manger for their comments and input to 620 the document. 622 12. References 624 12.1. Normative References 626 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 627 Requirement Levels", BCP 14, RFC 2119, March 1997. 629 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 630 10646", STD 63, RFC 3629, November 2003. 632 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 633 Resource Identifier (URI): Generic Syntax", STD 66, 634 RFC 3986, January 2005. 636 [RFC4055] Schaad, J., Kaliski, B., and R. Housley, "Additional 637 Algorithms and Identifiers for RSA Cryptography for use in 638 the Internet X.509 Public Key Infrastructure Certificate 639 and Certificate Revocation List (CRL) Profile", RFC 4055, 640 June 2005. 642 [RFC4395] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and 643 Registration Procedures for New URI Schemes", BCP 35, 644 RFC 4395, February 2006. 646 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 647 Encodings", RFC 4648, October 2006. 649 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 650 Specifications: ABNF", STD 68, RFC 5234, January 2008. 652 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 653 Housley, R., and W. Polk, "Internet X.509 Public Key 654 Infrastructure Certificate and Certificate Revocation List 655 (CRL) Profile", RFC 5280, May 2008. 657 [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known 658 Uniform Resource Identifiers (URIs)", RFC 5785, 659 April 2010. 661 12.2. Informative References 663 [I-D.ietf-dane-protocol] 664 Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 665 of Named Entities (DANE) Protocol for Transport Layer 666 Security (TLS)", draft-ietf-dane-protocol-19 (work in 667 progress), April 2012. 669 [RFC4843] Nikander, P., Laganier, J., and F. Dupont, "An IPv6 Prefix 670 for Overlay Routable Cryptographic Hash Identifiers 671 (ORCHID)", RFC 4843, April 2007. 673 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 674 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 675 May 2008. 677 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 678 December 2011. 680 [magnet] Wikipedia article, "Magnet URI Scheme", April 2012, 681 . 683 [niexts] Hallam-Baker, P., Stradling, R., Farrell, S., Kutscher, 684 C., and B. Ohlman, "The Network Information (ni) URI 685 Scheme: Optional Features", 686 draft-hallambaker-decade-ni-params-02 (work in progress), 687 April 2012. 689 [ref.ccn] Jacobsen, K, D, F, H, and L, "Networking Named Content", 690 CoNEXT 2009 , December 2009. 692 [ref.netinf-design] 693 Ahlgren, D'Ambrosio, Dannewitz, Marchisio, Marsh, Ohlman, 694 Pentikousis, Rembarz, Strandberg, and Vercellone, "Design 695 Considerations for a Network of Information", Re-Arch 2008 696 Workshop , December 2008. 698 Authors' Addresses 700 Stephen Farrell 701 Trinity College Dublin 702 Dublin, 2 703 Ireland 705 Phone: +353-1-896-2354 706 Email: stephen.farrell@cs.tcd.ie 708 Dirk Kutscher 709 NEC 710 Kurfuersten-Anlage 36 711 Heidelberg, 712 Germany 714 Phone: 715 Email: kutscher@neclab.eu 717 Christian Dannewitz 718 University of Paderborn 719 Paderborn 720 Germany 722 Email: cdannewitz@upb.de 723 Borje Ohlman 724 Ericsson 725 Stockholm S-16480 726 Sweden 728 Email: Borje.Ohlman@ericsson.com 730 Ari Keranen 731 Ericsson 732 Jorvas 02420 733 Finland 735 Email: ari.keranen@ericsson.com 737 Phillip Hallam-Baker 738 Comodo Group Inc. 740 Email: philliph@comodo.com