INTERNET-DRAFT Additional XML Security URIs Donald E. Eastlake 3rd Motorola Laboratories Expires: August 2003 February 2003 Additional XML Security URIs ---------- --- -------- ---- Donald E. Eastlake 3rd Status of This Document This draft is intended to be become a Proposed Standard RFC. Distribution of this document is unlimited. Comments should be sent to the author and the XML Digital Signature mailing list . This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC 2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet- Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. Abstract A number of algorithm and keying information identifying URIs intended for use with XML Digital Signatures, Encryption, and Canonnicalization are defined. D. Eastlake 3rd [Page 1] INTERNET-DRAFT Additional XML Security URIs Acknowledgements Glenn Adams, Merlin Hughs, Gregor Karlinger, Brian LaMachia, Shiho Moriai, and Joseph Reagle. Table of Contents Status of This Document....................................1 Abstract...................................................1 Acknowledgements...........................................2 Table of Contents..........................................2 1. Introduction............................................3 2. Algorithms and Identifiers..............................4 2.1 DigestMethod Algorithms................................4 2.1.1 MD5..................................................4 2.1.2 SHA-384..............................................4 2.2 SignatureMethod Message Authentication Code Algorithms.5 2.2.1 HMAC-MD5.............................................5 2.2.2 HMAC SHA Variations..................................6 2.2.3 HMAC-RIPEMD160.......................................6 2.3 SignatureMethod Public Key Signature Algorithms........6 2.3.1 RSA-MD5..............................................7 2.3.2 RSA-SHA256...........................................8 2.3.3 RSA-SHA384...........................................8 2.3.4 RSA-SHA512...........................................8 2.3.5 RSA-RIPEMD160........................................8 2.3.6 ECDSA-SHA1...........................................9 2.3.7 ESIGN-SHA1...........................................9 2.4 Minimal Canonicalization...............................9 2.5 Transform Algorithms..................................10 2.5.1 XPointer............................................10 2.6 EncryptionMethod Algorithms...........................10 2.6.1 ARCFOUR Encryption Algorithm........................10 2.6.2 Camellia Block Encryption...........................11 2.6.3 Camellia Key Wrap...................................11 2.6.4 PSEC-KEM............................................12 3. KeyInfo................................................12 3.1 PKCS #7 Bag of Certificates and CRLs..................12 3.2 Additional RetrievalMethod Type Values................13 4. IANA Considerations....................................14 5. Security Considerations................................14 Normative References......................................15 Informative References....................................16 Author's Address..........................................17 Expiration and File Name..................................17 D. Eastlake 3rd [Page 2] INTERNET-DRAFT Additional XML Security URIs 1. Introduction XML Digital Signatures have been standardized by the joint IETF/W3C XMLDSIG working group. The Draft Standard is specified in [RFC 3275]. Canonical XML, which used by many digital signatures, have been standardized by the W3C and is documented in Informational [RFC 3076]. In addition, XML Encryption [XMLENC] and Exclusive XML Canonicalization [Exclusive] have being standardized by the W3C. All of these standards and recommendations use URIs to identify algorithms and keying information types. This document is intended to be a convenient reference list of URIs and descriptions for algorithms in which there is substantial interest but which can not or have not been included in the main documents for some reason. Note in particular that raising XML digital signature to Draft Standard in the IETF requires remove of any algorithms for which there is not demonstrated interoperability from the main standards document. This requires removal of the Minimal Canonicalization algorithm, in which there appears to be continued interest, to be dropped from the standards track specification. It is included here. D. Eastlake 3rd [Page 3] INTERNET-DRAFT Additional XML Security URIs 2. Algorithms and Identifiers The URI being dropped from the standard due to the transition from Proposed Standard to Draft Stanard is included herein with its original http://www.w3.org/2000/09/xmldsig# prefix so as to avoid changing the XMLDSIG standard's namespace. Additional algorithms, particularly those based on USA Government and W3C standards, are given URIs that start with http://www.w3.org/2001/04/xmldsig-more as are some URIs from the on-going XML Encryption standardization effort. An "xmldsig-more" URI does not imply any official W3C status for these algorithms or identifiers nor does it imply that they are only useful in digital signatures. Currently, dereferencing such URIs may or may not produce a temporary placeholder document. Permission to use these this URI prefix has been given by the W3C. 2.1 DigestMethod Algorithms These algorithms are usable wherever a DigestMethod element occurs. 2.1.1 MD5 Identifier: http://www.w3.org/2001/04/xmldsig-more#md5 The MD5 algorithm [RFC 1321] takes no explicit parameters. An example of an MD5 DigestAlgorithm element is: http://www.w3.org/2001/04/xmldsig-more#md5"/> An MD5 digest is a 128-bit string. The content of the DigestValue element shall be the base64 [RFC 2045] encoding of this bit string viewed as a 16-octet octet stream. 2.1.2 SHA-384 Identifier: http://www.w3.org/2001/04/xmldsig-more#sha384 D. Eastlake 3rd [Page 4] INTERNET-DRAFT Additional XML Security URIs The SHA-384 algorithm [FIPS 180-2] takes no explicit parameters. An example of a SHA-384 DigestAlforithm element is: http://www.w3.org/2001/04/xmldsig-more#sha384"/> A SHA-384 digest is a 384 bit string. The content of the DigestValue element shall be the base64 [RFC2045] encoding of this string viewed as a 48-octet stream. Because it takes roughly the same amount of effort to compute a SHA-384 message digest as a SHA-512 digest and terseness is usually not a criteria in XML application, consideration should be given to the use of SHA-512 as an alternative. 2.2 SignatureMethod Message Authentication Code Algorithms Some text in this section is duplicated from [RFC 3275] for the convenience of the reader. 2.2.1 HMAC-MD5 Identifier: http://www.w3.org/2001/04/xmldsig-more#hmac-md5 The HMAC algorithm [RFC 2104] takes the truncation length in bits as a parameter; if the parameter is not specified then all the bits of the hash are output. An example of an HMAC-MD5 SignatureMethod element is as follows: 112 The output of the HMAC algorithm is ultimately the output (possibly truncated) of the chosen digest algorithm. This value shall be base64 [RFC 2405] encoded in the same straightforward fashion as the output of the digest algorithms. Example: the SignatureValue element for the HMAC-MD5 digest 9294727A 3638BB1C 13F48EF8 158BFC9D from the test vectors in [RFC 2104] would be kpRyejY4uxwT9I74FYv8nQ== Schema Definition: D. Eastlake 3rd [Page 5] INTERNET-DRAFT Additional XML Security URIs DTD: The Schema Definition and DTD immediately above are copied from [RFC 3275]. Although some cryptographic suspicions have recently been cast on MD5 for use in signatures such as RSA-MD5 below, this does not effect use of MD5 in HMAC. 2.2.2 HMAC SHA Variations Identifiers: http://www.w3.org/2001/04/xmldsig-more#hmac-sha256 http://www.w3.org/2001/04/xmldsig-more#hmac-sha384 http://www.w3.org/2001/04/xmldsig-more#hmac-sha512 SHA-256, SHA-384, and SHA-512 [FIPS 180-2] can also be used in HMAC as described in section 2.2.1 above for HMAC-MD5. 2.2.3 HMAC-RIPEMD160 Identifier: http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160 RIPEMD-160 [RIPEMD-160] can also be used in HMAC as described in section 2.2.1 above for HMAC-MD5. 2.3 SignatureMethod Public Key Signature Algorithms These algorithms are distinguished from those in Section 2.2 above in that they use public key methods. That is to say, the verification key is different from and not practically derivable from the signing key. D. Eastlake 3rd [Page 6] INTERNET-DRAFT Additional XML Security URIs 2.3.1 RSA-MD5 Identifier: http://www.w3.org/2001/04/xmldsig-more#rsa-md5 This implies the PKCS#1 v1.5 padding algorithm described in [RFC 2437]. An example of use is The SignatureValue content for an RSA-MD5 signature is the base64 [RFC 2405] encoding of the octet string computed as per [RFC 2437], section 8.1.1. Signature generation for the RSASSA-PKCS1-v1_5 signature scheme. As specified in the EMSA-PKCS1-V1_5-ENCODE function in [RFC 2437, section 9.2.1], the value input to the signature function MUST contain a pre-pended algorithm object identifier for the hash function, but the availability of an ASN.1 parser and recognition of OIDs is not required of a signature verifier. The PKCS#1 v1.5 representation appears as: CRYPT (PAD (ASN.1 (OID, DIGEST (data)))) Note that the padded ASN.1 will be of the following form: 01 | FF* | 00 | prefix | hash where "|" is concatentation, "01", "FF", and "00" are fixed octets of the corresponding hexadecimal value, "hash" is the MD5 digest of the data, and "prefix" is the ASN.1 BER MD5 algorithm designator prefix required in PKCS #1 [RFC 2437], that is, hex 30 20 30 0c 06 08 2a 86 48 86 f7 0d 02 05 05 00 04 10 This prefix is included to make it easier to use standard cryptographic libraries. The FF octet MUST be repeated the maximum number of times such that the value of the quantity being CRYPTed is one octet shorter than the RSA modulus. Due to increases in computer processor power and advances in cryptography, use of RSA-MD5 is NOT RECOMMENDED. D. Eastlake 3rd [Page 7] INTERNET-DRAFT Additional XML Security URIs 2.3.2 RSA-SHA256 Identifier: http://www.w3.org/2001/04/xmldsig-more#rsa-sha256 An example of use is 2.3.3 RSA-SHA384 Identifier: ttp://www.w3.org/2001/04/xmldsig-more#rsa-sha384 An example of use is Because it takes about the same effort to calculate a SHA-384 message digest as it does a SHA-512 message digest, it is recommended that RSA-SHA512 be used in preference to RSA-SHA384 where possible. 2.3.4 RSA-SHA512 Identifier: http://www.w3.org/2001/04/xmldsig-more#rsa-sha512 An example of use is 2.3.5 RSA-RIPEMD160 Identifier: http://www.w3.org/2001/04/xmldsig-more/rsa-ripemd160 This siganture method uses PKCS#1 padding as described in section 2.3.1. An example of use is 2.3.6 ECDSA-SHA1 Identifier http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1 The Elliptic Curve Digital Signature Algorith (ECDSA) [FIPS 186-2] is the elliptic curve analogue of the DSA (DSS) signature method. For a detailed specification of how to use it with XML Digital Signature, please see [ECDSA]. 2.3.7 ESIGN-SHA1 Identifier http://www.w3.org/2001/04/xmldsig-more#esign-sha1 The ESIGN algorithm specified in [IEEE P1363a] is a signature scheme based on the integer factorization problem. It is much faster than previous digital signature schemes so ESIGN can be implemented on smart cards without special co-processors. An example of use is 2.4 Minimal Canonicalization Thus far two independent interoperable implementations of Minimal Canonicalization have not been announced. Therefore, when XML Digital Siganture was advanced from Proposed Standard [RFC 3075] to Draft Standard [RFC 3275], Minimal Canonicalization was dropped from the standard track documents. However, there is still interest and indicates of possible future use for Minimal Canonicalization. For its definition, see [RFC 3075], Section 6.5.1. For reference, it's identifier remains: http://www.w3.org/2000/09/xmldsig#minimal D. Eastlake 3rd [Page 9] INTERNET-DRAFT Additional XML Security URIs 2.5 Transform Algorithms Note that all CanonicalizationMethod algorithms can also be used as Transform algorithms. 2.5.1 XPointer Identifier: http://www.w3.org/2001/04/xmldsig-more/xptr This transform algorithm takes an [XPointer] as an explicit parameter. An example of use is: xpointer(id("foo")) xmlns(bar=urn:baz) xpointer(//bar:Zab[@Id="foo"]) Schema Definition: DTD: Input to this transfrom is an octet stream (which is then parsed into XML). Output from this transform is a node set; the results of the XPointer are processed as defined in the XMLDSIG specification [RFC 3275] for a same-document XPointer. 2.6 EncryptionMethod Algorithms 2.6.1 ARCFOUR Encryption Algorithm Identifier: http://www.w3.org/2001/04/xmldsgi-more#arcfour D. Eastlake 3rd [Page 10] INTERNET-DRAFT Additional XML Security URIs ARCFOUR is a fast, simple stream encryption algorithm that is compatible with RSA Security's RC4 algorithm. An example EncryptionMethod element using ARCFOUR is 40 2.6.2 Camellia Block Encryption Identifiers: http://www.w3.org/2001/04/xmldsig-more#camellia128-cbc http://www.w3.org/2001/04/xmldsig-more#camellia192-cbc http://www.w3.org/2001/04/xmldsig-more#camellia256-cbc Camellia is an efficient and secure block cipher with the same interface as the AES, that is 128-bit block size and 128, 192, and 256 bit key sizes. In XML Encryption Camellia is used in the same way as the AES: It is used in the Cipher Block Chaining (CBC) mode with a 128-bit initialization vector (IV). The resulting cipher text is prefixed by the IV. If included in XML output, it is then base64 encoded. An example Camellia EncryptionMethod is as follows: 2.6.3 Camellia Key Wrap Identifiers: http://www.w3.org/2001/04/xmldsig-more#kw-camellia128 http://www.w3.org/2001/04/xmldsig-more#kw-camellia192 http://www.w3.org/2001/04/xmldsig-more#kw-camellia256 Camellia key wrap is identical to the AES key wrap algorithm specified in the XML Encryption standard with "AES" replaced by "Camellia". The algorithm is the same whatever the size of the Camellia key used in wrapping, called the key encrypting key or KEK. The implementation of Camellia is OPTIONAL. However, if it is supported the same implementation guidelines as to which combinations of KEK size and wrapped key size are required to be supported and which are optional to be supported should be followed. That is to say, if Camellia key D. Eastlake 3rd [Page 11] INTERNET-DRAFT Additional XML Security URIs wrap is supported, they wrapping 128-bit keys with a 128-bit KEK and wrapping 256-bit keys with a 256-bit KEK are REQUIRED and all other combinations are OPTIONAL. 2.6.4 PSEC-KEM Identifier: http://www.w3.org/2001/04/xmldsgi-more#psec-kem The PSEC-KEM algorithm, specified in [ISO/IEC 18033-2], is a key encapsulation mechanism using elliptic curve encryption. An example of use is: version id curve base order cofactor 3. KeyInfo In section 3.1 below a new KeyInfo element child is specified while in section 3.2 additional KeyInfo Type values for use in RetrievalMethod are specified. 3.1 PKCS #7 Bag of Certificates and CRLs A PKCS #7 [RFC 2315] "signedData" can also be used as a bag of certificates and/or certificate revocation lists (CRLs). The PKCS7signedData element is defined to accomodate such structures within KeyInfo. The binary PKCS #7 strucuture is base64 [RFC 2405] encoded. Any signer information present is ignored. The following is a example, elliding the base64 data: ... D. Eastlake 3rd [Page 12] INTERNET-DRAFT Additional XML Security URIs 3.2 Additional RetrievalMethod Type Values The Type attribute of RetrievalMethod is an optional identifier for the type of data to be retrieved. The result of de-referencing a RetrievalMethod reference for all KeyInfo types with an XML structure is an XML element or document with that element as the root. The various "raw" key information types return a binary value. Thus they require a Type attibute because they are not unambiguously parseable. Identifiers: http://www.w3.org/2000/09/xmldsig-more#KeyValue http://www.w3.org/2000/09/xmldsig-more#RetrievalMethod http://www.w3.org/2000/09/xmldsig-more#KeyName http://www.w3.org/2000/09/xmldsig-more#rawX509CRL http://www.w3.org/2000/09/xmldsig-more#rawPGPKeyPacket http://www.w3.org/2000/09/xmldsig-more#rawSPKISexp http://www.w3.org/2000/09/xmldsig-more#PKCS7signedData http://www.w3.org/2000/09/xmldsig-more#rawPKCS7signedData D. Eastlake 3rd [Page 13] INTERNET-DRAFT Additional XML Security URIs 4. IANA Considerations None. As it is easy for people to construct their own unique URIs and, possible, if appropriate, to obtain a URI from the W3C, it is not intended that any additional "http://www.w3.org/2000/09/xmldsig- more#" URIs be created. 5. Security Considerations Due to computer speed and cryptographic advances, the use of MD5 as a DigestMethod or in the RSA-MD5 SigantureMethod is NOT RECOMMENDED. The cryrptographic advances concerned do not effect the security of HMAC-MD5; however, there is little reason not to go for one of the SHA series of algorithms. D. Eastlake 3rd [Page 14] INTERNET-DRAFT Additional XML Security URIs Normative References [Camellia] - - "A Description of the Camellia Encryption Algorithm", J. Nakajima, S. Moriai, July 2001. draft-nakajima-camellia-02.txt - "Camellia: A 128-bit Block Cipher Suitable for Multiple Platforms - Design and Analysis -", K. Aoki, T. Ichikawa, M. Matsui, S. Moriai, J. Nakajima, T. Tokita, In Selected Aras in Cryptography, 7th Annual International Workshop, SAC 2000, August 2000, Proceedings, Lecture Notes in Computer Science 2012, pp. 39-56, Springer-Verlag, 2001. [ECDSA] - "ECDSA with XML-Signature Syntax", S. Blake-Wilson, G. Karlinger, T. Kobayashi, Y. Want, March 2003. draft-blake-wilson- xmldsig-ecdsa-04.txt [FIPS 180-1] - "Secure Hash Standard", (SHA-1) US Federal Information Processing Standard, 17 April 1995. [FIPS 180-2] - "Secure Hash Standard", (SHA-1/256/384/512) US Federal Information Processing Standard, Draft, not yet issued. [FIPS 186-2] - "Digital Signature Standard", National Institute of Standards and Technology, 2000. [IEEE P1363a] - "Standard Specifications for Public Key Cryptography: Additional Techniques", October 2002. [ISO/IEC 18033-2] - "Information technology -- Security techniques -- Encryption algorithms -- Part 3: Asymmetric ciphers", CD, October 2002. [RFC 1321] - "The MD5 Message-Digest Algorithm", R. Rivest, April 1992. [RFC 2104] - "HMAC: Keyed-Hashing for Message Authentication", H. Krawczyk, M. Bellare, R. Canetti, February 1997. [RFC 2405] - "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", N. Freed, N. Borenstein, November 1996. [RFC 2437] - "PKCS #1: RSA Cryptography Specifications Version 2.0", B. Kaliski, J. Staddon, October 1998. [RFC 2315] - "PKCS #7: Cryptographic Message Syntax Version 1.5", B. Kaliski, March 1998. [RFC 3075] - "XML-Signature Syntax and Processing", D. Eastlake, J. Reagle, D. Solo, March 2001. (RFC 3075 was obsoleted by RFC 3275 but is referenced in this document for its description of Minimal D. Eastlake 3rd [Page 15] INTERNET-DRAFT Additional XML Security URIs Canonicalization which was dropped in RFC 3275.) [RFC 3275] - "XML-Signature Syntax and Processing", D. Eastlake, J. Reagle, D. Solo, March 2002. [RIPEMD-160] - ISO/IEC 10118-3:1998, "Information Technology - Security techniques - Hash-functions - Part3: Dedicated hash- functions", ISO, 1998. [XMLENC] - "XML Encryption Syntax and Processing", J. Reagle, D. Eastlake, October 2001. [XPointer] - "XML Pointer Language (XPointer) Version 1.0", W3C working draft, Steve DeRose, Eve Maler, Ron Daniel Jr., January 2001. Informative References [Exclusive] - "Exclusive XML Canonicalization Version 1.0", D. Eastlake, J. Reagle, 18 July 2002. , draft-ietf-xmldsig-xc14n-00.txt [RFC 3076] - "Canonical XML Version 1.0", J. Boyer, March 2001. [RFC 3092] - "Etymology of 'Foo'", D. Eastlake 3rd, C. Manros, E. Raymond, 1 April 2001. D. Eastlake 3rd [Page 16] INTERNET-DRAFT Additional XML Security URIs Author's Address Donald E. Eastlake 3rd Motorola Laboratories 155 Beaver Street Milford, MA 01757 USA Telephone: +1-508-851-8280 (w) +1-508-634-2066 (h) EMail: Donald.Eastlake@motorola.com Expiration and File Name This draft expires in August 2003. Its file name is draft-eastlake-xmldsig-uri-04.txt D. Eastlake 3rd [Page 17]