idnits 2.17.1 draft-hallambaker-udf-05.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 == Line 366 has weird spacing: '...a 47 cc ab fe...' == Line 369 has weird spacing: '...9 e0 bd ea 47...' == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: Since PKIX certificates and CLRs contain security policy information, UDF fingerprints used to identify certificates or CRLs SHOULD be presented with a minimum of 200 bits of precision. PKIX applications MUST not accept UDF fingerprints specified with less than 200 bits of precision for purposes of identifying trust anchors. -- The document date (May 9, 2017) is 2544 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: 'RFC2119' is mentioned on line 176, but not defined == Missing Reference: 'TBS' is mentioned on line 219, but not defined ** Downref: Normative reference to an Informational RFC: RFC 1321 Summary: 1 error (**), 0 flaws (~~), 6 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Hallam-Baker 3 Internet-Draft Comodo Group Inc. 4 Intended status: Standards Track May 9, 2017 5 Expires: November 10, 2017 7 Uniform Data Fingerprint (UDF) 8 draft-hallambaker-udf-05 10 Abstract 12 This document describes means of generating Uniform Data Fingerprint 13 (UDF) values and their presentation as text sequences and as URIs. 15 Cryptographic digests provide a means of uniquely identifying static 16 data without the need for a registration authority. A fingerprint is 17 a form of presenting a cryptographic digest that makes it suitable 18 for use in applications where human readability is required. The UDF 19 fingerprint format improves over existing formats through the 20 introduction of a compact algorithm identifier affording an 21 intentionally limited choice of digest algorithm and the inclusion of 22 an IANA registered MIME Content-Type identifier within the scope of 23 the digest input to allow the use of a single fingerprint format in 24 multiple application domains. 26 Alternative means of rendering fingerprint values are considered 27 including machine-readable codes, word and image lists. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at http://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on November 10, 2017. 46 Copyright Notice 48 Copyright (c) 2017 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 65 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 66 2.1. Algorithm Identifier . . . . . . . . . . . . . . . . . . 5 67 2.2. Content Type Identifier . . . . . . . . . . . . . . . . . 5 68 2.3. Representation . . . . . . . . . . . . . . . . . . . . . 6 69 2.4. Truncation . . . . . . . . . . . . . . . . . . . . . . . 6 70 3. Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . 7 71 3.1. Binary Fingerprint Value . . . . . . . . . . . . . . . . 7 72 3.1.1. Version ID . . . . . . . . . . . . . . . . . . . . . 7 73 3.2. Truncation . . . . . . . . . . . . . . . . . . . . . . . 8 74 3.3. Base32 Representation . . . . . . . . . . . . . . . . . . 8 75 3.4. Examples . . . . . . . . . . . . . . . . . . . . . . . . 8 76 3.4.1. Using SHA-2-512 Digest . . . . . . . . . . . . . . . 8 77 3.5. Fingerprint Improvement . . . . . . . . . . . . . . . . . 9 78 3.6. Compressed Presentation . . . . . . . . . . . . . . . . . 9 79 3.7. Identifiers formed using UDFs . . . . . . . . . . . . . . 9 80 3.7.1. URI Representation . . . . . . . . . . . . . . . . . 10 81 3.7.2. DNS Name . . . . . . . . . . . . . . . . . . . . . . 10 82 4. Content Types . . . . . . . . . . . . . . . . . . . . . . . . 11 83 4.1. PKIX Certificates and Keys . . . . . . . . . . . . . . . 11 84 4.2. OpenPGP Key . . . . . . . . . . . . . . . . . . . . . . . 11 85 4.3. DNSSEC . . . . . . . . . . . . . . . . . . . . . . . . . 12 86 5. Additional UDF Renderings . . . . . . . . . . . . . . . . . . 12 87 5.1. Machine Readable Rendering . . . . . . . . . . . . . . . 12 88 5.2. Word Lists . . . . . . . . . . . . . . . . . . . . . . . 12 89 5.3. Image List . . . . . . . . . . . . . . . . . . . . . . . 13 90 6. Security Considerations . . . . . . . . . . . . . . . . . . . 13 91 6.1. Work Factor and Precision . . . . . . . . . . . . . . . . 13 92 6.2. Semantic Substitution . . . . . . . . . . . . . . . . . . 14 93 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 94 7.1. URI Registration . . . . . . . . . . . . . . . . . . . . 15 95 7.2. Content Type Registration . . . . . . . . . . . . . . . . 15 96 7.3. Version Registry . . . . . . . . . . . . . . . . . . . . 15 97 8. Normative References . . . . . . . . . . . . . . . . . . . . 15 98 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 15 100 1. Definitions 102 Cryptographic Digest Function 104 A hash function that has the properties required for use as a 105 cryptographic hash function. These include collision resistance, 106 first pre-image resistance and second pre-image resistance. 108 Content Type 110 An identifier indicating how a Data Value is to be interpreted as 111 specified in the IANA registry Media Types. 113 Data Value 115 The binary octet stream that is the input to the digest function used 116 to calculate a digest value. 118 Data Object 120 A Data Value and its associated Content Type 122 Digest Algorithm 124 A synonym for Cryptographic Digest Function 126 Digest Value 128 The output of a Cryptographic Digest Function 130 Data Digest Value 132 The output of a Cryptographic Digest Function for a given Data Value 133 input. 135 Fingerprint 137 A presentation of the digest value of a data value or data object. 139 Fingerprint Presentation 140 The representation of at least some part of a fingerprint value in 141 human or machine readable form. 143 Fingerprint Improvement 145 The practice of recording a higher precision presentation of a 146 fingerprint on successful validation. 148 Fingerprint Work Hardening 150 The practice of generating a sequence of fingerprints until one is 151 found that matches criteria that permit a compressed presentation 152 form to be used. The compressed fingerprint thus being shorter than 153 but presenting the same work factor as an uncompressed one. 155 Hash 157 A function which takes an input and returns a fixed-size output. 158 Ideally, the output of a hash function is unbiased and not correlated 159 to the outputs returned to similar inputs in any predictable fashion. 161 Precision 163 The number of significant bits provided by a Fingerprint 164 Presentation. 166 Work Factor 168 A measure of the computational effort required to perform an attack 169 against some security property. 171 1.1. Requirements Language 173 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 174 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 175 document are to be interpreted as described in RFC 2119 [RFC2119]. 177 2. Introduction 179 The use of cryptographic digest functions to produce identifiers is 180 well established as a means of generating a unique identifier for 181 fixed data without the need for a registration authority. 183 While the use of fingerprints of public keys was popularized by PGP, 184 they are employed in many other applications including OpenPGP, SSH, 185 BitCoin and PKIX. 187 A cryptographic digest is a particular form of hash function that has 188 the properties: 190 It is easy to compute the digest value for any given message 192 It is infeasible to generate a message from its digest value 194 It is infeasible to modify a message without changing the digest 195 value 197 It is infeasible to find two different messages with the same digest 198 value. 200 If these properties are met, the only way that two data objects that 201 map to the same digest value is by random chance. If the number of 202 possible digest values is sufficiently large (i.e. is a sufficiently 203 large number of bits in length), this chance is reduced to an 204 arbitrarily infinitesimal probability. Such values are described as 205 being probabilistically unique. 207 A fingerprint is a representation of a cryptographic digest value 208 optimized for purposes of verification and in some cases data entry. 210 2.1. Algorithm Identifier 212 Although a secure cryptographic digest algorithm has properties that 213 make it ideal for certain types of identifier use, several 214 cryptographic digest algorithms have found widespread use, some of 215 which have been demonstrated to be insecure. 217 For example the MD5 message digest algorithm [RFC1321], was widely 218 used in IETF protocols until it was demonstrated to be vulnerable to 219 collision attacks [TBS]. 221 The secure use of a fingerprint scheme therefore requires the digest 222 algorithm to either be fixed or otherwise determined by the 223 fingerprint value itself. Otherwise an attacker may be able to use a 224 weak, broken digest algorithm to generate a data object matching a 225 fingerprint value generated using a strong digest algorithm. 227 2.2. Content Type Identifier 229 A secure cryptographic digest algorithm provides a unique digest 230 value that is probabilistically unique for a particular byte sequence 231 but does not fix the context in which a byte sequence is interpreted. 232 While such ambiguity may be tolerated in a fingerprint format 233 designed for a single specific field of use, it is not acceptable in 234 a general purpose format. 236 For example, the SSH and OpenPGP applications both make use of 237 fingerprints as identifiers for the public keys used but using 238 different digest algorithms and data formats for representing the 239 public key data. While no such vulnerability has been demonstrated 240 to date, it is certainly conceivable that a crafty attacker might 241 construct an SSH key in such a fashion that OpenPGP interprets the 242 data in an insecure fashion. If the number of applications making 243 use of fingerprint format that permits such substitutions is 244 sufficiently large, the probability of a semantic substitution 245 vulnerability being possible becomes unacceptably large. 247 A simple control that defeats such attacks is to incorporate a 248 content type identifier within the scope of the data input to the 249 hash function. 251 2.3. Representation 253 The representation of a fingerprint is the format in which it is 254 presented to either an application or the user. 256 Base32 encoding is used to produce the preferred text representation 257 of a UDF fingerprint. This encoding uses only the letters of the 258 Latin alphabet with numbers chosen to minimize the risk of ambiguity 259 between numbers and letters (2, 3, 4, 5, 6 and 7). 261 To enhance readability and improve data entry, characters are grouped 262 into groups of five. 264 2.4. Truncation 266 Different applications of fingerprints demand different tradeoffs 267 between compactness of the representation and the number of 268 significant bits. A larger the number of significant bits reduces 269 the risk of collision but at a cost to convenience. 271 Modern cryptographic digest functions such as SHA-2 produce output 272 values of at least 256 bits in length. This is considerably larger 273 than most uses of fingerprints require and certainly greater than can 274 be represented in human readable form on a business card. 276 Since a strong cryptographic digest function produces an output value 277 in which every bit in the input value affects every bit in the output 278 value with equal probability, it follows that truncating the digest 279 value to produce a finger print is at least as strong as any other 280 mechanism if digest algorithm used is strong. 282 Using truncation to reduce the precision of the digest function has 283 the advantage that a lower precision fingerprint of some data content 284 is always a prefix of a higher prefix of the same content. This 285 allows higher precision fingerprints to be converted to a lower 286 precision without the need for special tools. 288 3. Encoding 290 A UDF fingerprint for a given data object is generated by calculating 291 the Binary Fingerprint Value for the given data object and type 292 identifier, truncating it to obtain the desired degree of precision 293 and then converting the truncated value to a representation. 295 3.1. Binary Fingerprint Value 297 The binary encoding of a fingerprint is calculated using the formula: 299 Fingerprint = < + H (< + ?:? + H(<)) 301 Where 303 H(x) is the cryptographic digest function 304 < is the fingerprint version and algorithm identifier. 305 < is the MIME Content-Type of the data. 306 < is the binary data. 308 The use of the nested hash function permits a fingerprint to be taken 309 of data for which a digest value is already known without the need to 310 calculate a new digest over the data. 312 The inclusion of a MIME content type prevents message substitution 313 attacks in which one content type is substituted for another. 315 3.1.1. Version ID 317 A Version Identifier consists of a single byte. The following digest 318 algorithm identifiers are specified in this document: 320 SHA-2-512 = 96 322 SHA-2-512 (compressed) = 97, 98, 99, 100 324 SHA-3-512 = 144 326 These algorithm identifiers have been chosen so that the first 327 character in a SHA-2-512 fingerprint will always be 'M' and the first 328 character in a SHA-3-512 fingerprint will always be 'S'. These 329 provide mnemonics for 'Merkle-Damgard' and 'Sponge' respectively. 331 3.2. Truncation 333 The Binary Fingerprint Value is truncated to an integer multiple of 334 25 bits regardless of the intended output presentation. 336 The output of the hash function is truncated to a sequence of n bits 337 by first selecting the first n/8 bytes of the output function. If n 338 is an integer multiple of 8, no additional bits are required and this 339 is the result. Otherwise the remaining bits are taken from the most 340 significant bits of the next byte and any unused bits set to 0. 342 For example, to truncate the byte sequence [a0, b1, c2, d3, e4] to 25 343 bits. 25/8 = 3 bytes with 1 bit remaining, the first three bytes of 344 the truncated sequence is [a0, b1, c2] and the final byte is e4 AND 345 80 = 80 which we add to the previous result to obtain the final 346 truncated sequence of [a0, b1, c2, 80] 348 3.3. Base32 Representation 350 A modified version of Base32 [RFC4648] encoding is used to present 351 the fingerprint in text form grouping the output text into groups of 352 five characters separated by a dash '-'. This representation 353 improves the accuracy of both data entry and verification. 355 3.4. Examples 357 In the following examples, is the UTF8 encoding of the 358 string "text/plain" and is the UTF8 encoding of the string "UDF Data 359 Value" 361 Data = 55 44 46 20 44 61 74 61 20 56 61 6c 75 65 363 3.4.1. Using SHA-2-512 Digest 365 H( ) = 366 48 da 47 cc ab fe a4 5c 76 61 d3 21 ba 34 3e 58 367 10 87 2a 03 b4 02 9d ab 84 7c ce d2 22 b6 9c ab 368 02 38 d4 e9 1e 2f 6b 36 a0 9e ed 11 09 8a ea ac 369 99 d9 e0 bd ea 47 93 15 bd 7a e9 e1 2e ad c4 15 370 H(H( ) + Content-ID>) = 371 45 e0 59 e0 39 34 ea b7 f6 5d 83 b2 d8 f9 b1 6d 372 2a 6b 08 63 d9 3c c1 02 86 7b 83 49 f2 d9 f0 8f 373 fe 07 87 30 c7 c9 05 74 ac a1 38 2b b3 14 4d c6 374 39 f9 8c 12 c0 4a 3e b5 05 0b 3e 67 df 52 4b 57 376 Text Presentation (100 bit)MB2GK-6DUF5-YGYYL-JNY5E 378 Text Presentation (125 bit)MB2GK-6DUF5-YGYYL-JNY5E-RWSHZ 379 Text Presentation (150bit)MB2GK-6DUF5-YGYYL-JNY5E-RWSHZ-SV75J 381 Text Presentation (250bit)MB2GK-6DUF5-YGYYL-JNY5E-RWSHZ-SV75J-C4OZQ- 382 5GIN2-GQ7FQ-EEHFI 384 3.5. Fingerprint Improvement 386 Since an application must always calculate the full fingerprint value 387 as part of the verification process, an application MAY record a 389 Applications are encouraged to make use of the practice of 390 fingerprint improvement wherever possible. 392 3.6. Compressed Presentation 394 Fingerprint compression permits the use of shorter fingerprint 395 presentation without a reduction in the attacker work factor by 396 requiring the fingerprint value to match a particular pattern. 398 UDF fingerprints MUST use compression if possible. A compressed 399 fingerprint uses a version identifier that specifies the form of 400 compression used as follows: 402 96 No compression 404 97 First 25 bits are zeros 406 98 First 40 bits are zeros 408 99 First 50 bits are zeros 410 100 First 55 bits are zeros 412 Thus the fingerprint that would be represented in uncompressed form 413 as MAAAA-AAWIY-LTMFTG-CZTRO is instead represented as MIWIY-LTMFTG- 414 CZTRO. 416 3.7. Identifiers formed using UDFs 418 UDF fingerprints MAY be used to form a part of another protocol 419 identifier. Such practice carries the implicit semantic that the 420 interpretation of the identifier formed is bound to the document 421 identified by the fingerprint. 423 3.7.1. URI Representation 425 Any UDF fingerprint MAY be encoded as a URI by prefixing the Base32 426 text representation of the fingerprint with the string 'udf:' 428 3.7.2. DNS Name 430 A UDF fingerprint MAY be encoded as a DNS label by prefixing the 431 Base32 text representation with the string 'zz--'. 433 A DNS name that includes a UDF fingerprint as a DNS label carries the 434 implicit assertion that the interpretation of the address MUST be 435 authorized by a security policy that is validated under a key that 436 matches the corresponding fingerprint. 438 Placing such a DNS label as the top level (rightmost) label in a DNS 439 address creates an address that is not legal and thus cannot be 440 resolved by the Internet DNS infrastructure. Thus ensuring that the 441 address is rejected by applications that are not capable of 442 performing the associated validation steps. 444 For example, Alice has the email security key with fingerprint MB2GK- 445 6DUF5-YGYYL-JNY5E. She uses the following email addresses: 447 alice@example.com 449 Alice publishes this email address when she does not want the other 450 party to use the secure email system. 452 alice@zz--mb2gk-6duf5-ygyyl-jny5e.example.com 454 Alice publishes this email address when she wants to give the other 455 party the option of using secure email if their system supports it. 457 The DNS server for example.com has been configured to redirect 458 requests to resolve zz--mb2gk-6duf5-ygyyl-jny5e.example.com to the 459 mail server example.com. 461 alice@example.com.zz--mb2gk-6duf5-ygyyl-jny5e 463 Alice uses this email address when she wants the other party to be 464 able to send her email if and only if their client supports use of 465 the secure messaging system. 467 While there should never be a DNS label of the form zz--* in the 468 authoritative DNS root, such labels MAY be introduced by a trusted 469 local resolver. This would allow attempts at making an untrusted 470 communication request to be transparently redirected through a 471 locally trusted security enhancing proxy. 473 4. Content Types 475 While a UDF fingerprint MAY be used to identify any form of static 476 data, the use of a UDF fingerprint to identify a public key signature 477 key provides a level of indirection and thus the ability to identify 478 dynamic data. The content types used to identify public keys are 479 thus of particular interest. 481 As described in the security considerations section, the use of 482 fingerprints to identify a bare public key and the use of 483 fingerprints to identify a public key and associated security policy 484 information are very different. 486 4.1. PKIX Certificates and Keys 488 UDF fingerprints MAY be used to identify PKIX certificates, CRLs and 489 public keys in the ASN.1 encoding used in PKIX certificates. 491 Since PKIX certificates and CLRs contain security policy information, 492 UDF fingerprints used to identify certificates or CRLs SHOULD be 493 presented with a minimum of 200 bits of precision. PKIX applications 494 MUST not accept UDF fingerprints specified with less than 200 bits of 495 precision for purposes of identifying trust anchors. 497 PKIX certificates, keys and related content data are identified by 498 the following content types: 500 application/pkix-cert 502 A PKIX Certificate 504 application/pkix-crl 506 A PKIX CRL 508 application/pkix-keyinfo 510 The KeyInfo structure defined in the PKIX certificate specification 512 4.2. OpenPGP Key 514 OpenPGPv5 keys and key set content data are identified by the 515 following content types: 517 application/pgp-key-v5 518 An OpenPGP key 520 application/pgp-keys 522 An OpenPGP key set. 524 4.3. DNSSEC 526 DNSSEC record data consists of DNS records which are identified by 527 the following content type: 529 application/dns 531 A DNS resource record in binary format 533 5. Additional UDF Renderings 535 By default, a UDF fingerprint is rendered in the Base32 encoding 536 described in this document. Additional renderings MAY be employed to 537 facilitate entry and/or verification of fingerprint values. 539 5.1. Machine Readable Rendering 541 The use of a machine-readable rendering such as a QR Code allows a 542 UDF value to be input directly using a smartphone or other device 543 equipped with a camera. 545 A QR code fixed to a network capable device might contain the 546 fingerprint of a machine readable description of the device. 548 5.2. Word Lists 550 The use of a Word List to encode fingerprint values was introduced by 551 Patrick Juola and Philip Zimmerman for the PGPfone application. The 552 PGP Word List is designed to facilitate exchange and verification of 553 fingerprint values in a voice application. To minimize the risk of 554 misinterpretation, two word lists of 256 values each are used to 555 encode alternative fingerprint bytes. The compact size of the lists 556 used allowed the compilers to curate them so as to maximize the 557 phonetic distance of the words selected. 559 The PGP Word List is designed to achieve a balance between ease of 560 entry and verification. Applications where only verification is 561 required may be better served by a much larger word list, permitting 562 shorter fingerprint encodings. 564 For example, a word list with 16384 entries permits 14 bits of the 565 fingerprint to be encoded at once, 65536 entries permits 16. These 566 encodings allow a 125 bit fingerprint to be encoded in 9 and 8 words 567 respectively. 569 5.3. Image List 571 An image list is used in the same manner as a word list affording 572 rapid visual verification of a fingerprint value. For obvious 573 reasons, this approach is not generally suited to data entry. 575 6. Security Considerations 577 6.1. Work Factor and Precision 579 A given UDF data object has a single fingerprint value that may be 580 presented at different precisions. The shortest legitimate precision 581 with which a UDF fingerprint may be presented has 96 significant bits 583 A UDF fingerprint presents the same work factor as any other 584 cryptographic digest function. The difficulty of finding a second 585 data item that matches a given fingerprint is 2^n and the difficulty 586 or finding two data items that have the same fingerprint is 2^(n/2). 587 Where n is the precision of the fingerprint. 589 For the algorithms specified in this document, n = 512 and thus the 590 work factor for finding collisions is 2^256, a value that is 591 generally considered to be computationally infeasible. 593 Since the use of 512 bit fingerprints is impractical in the type of 594 applications where fingerprints are generally used, truncation is a 595 practical necessity. The longer a fingerprint is, the less likely it 596 is that a user will check every character. It is therefore important 597 to consider carefully whether the security of an application depends 598 on second pre-image resistance or collision resistance. 600 In most fingerprint applications, such as the use of fingerprints to 601 identify public keys, the fact that a malicious party might generate 602 two keys that have the same fingerprint value is a minor concern. 603 Combined with a flawed protocol architecture, such a vulnerability 604 may permit an attacker to construct a document such that the 605 signature will be accepted as valid by some parties but not by 606 others. 608 For example, Alice generates keypairs until two are generated that 609 have the same 100 bit UDF presentation (typically 2^48 attempts). 610 She registers one keypair with a merchant and the other with her 611 bank. This allows Alice to create a payment instrument that will be 612 accepted as valid by one and rejected by the other. 614 The ability to generate of two PKIX certificates with the same 615 fingerprint and different certificate attributes raises very 616 different and more serious security concerns. For example, an 617 attacker might generate two certificates with the same key and 618 different use constraints. This might allow an attacker to present a 619 highly constrained certificate that does not present a security risk 620 to an application for purposes of gaining approval and an 621 unconstrained certificate to request a malicious action. 623 In general, any use of fingerprints to identify data that has 624 security policy semantics requires the risk of collision attacks to 625 be considered. For this reason the use of short, 'user friendly' 626 fingerprint presentations (Less than 200 bits) SHOULD only be used 627 for public key values. 629 6.2. Semantic Substitution 631 Many applications record the fact that a data item is trusted, rather 632 fewer record the circumstances in which the data item is trusted. 633 This results in a semantic substitution vulnerability which an 634 attacker may exploit by presenting the trusted data item in the wrong 635 context. 637 The UDF format provides protection against high level semantic 638 substitution attacks by incorporating the content type into the input 639 to the outermost fingerprint digest function. The work factor for 640 generating a UDF fingerprint that is valid in both contexts is thus 641 the same as the work factor for finding a second preimage in the 642 digest function (2^512 for the specified digest algorithms). 644 It is thus infeasible to generate a data item such that some 645 applications will interpret it as a PKIX key and others will accept 646 as an OpenPGP key. While attempting to parse a PKIX key as an 647 OpenPGP key is virtually certain to fail to return the correct key 648 parameters it cannot be assumed that the attempt is guaranteed to 649 fail with an error message. 651 The UDF format does not provide protection against semantic 652 substitution attacks that do not affect the content type. 654 7. IANA Considerations 656 [This will be extended later] 658 7.1. URI Registration 660 [Here a URI registration for the udf: scheme] 662 7.2. Content Type Registration 664 [application/pkix-keyinfo] 666 [application/pgp-key] 668 7.3. Version Registry 670 96 = SHA-2-512 672 97 = SHA-2-512 with 25 leading zeros 674 98 = SHA-2-512 with 40 leading zeros 676 99 = SHA-2-512 with 50 leading zeros 678 100 = SHA-2-512 with 55 leading zeros 680 144 = SHA-3-512 682 8. Normative References 684 [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, 685 DOI 10.17487/RFC1321, April 1992. 687 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 688 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006. 690 Author's Address 692 Phillip Hallam-Baker 693 Comodo Group Inc. 695 Email: philliph@comodo.com