 1/draftietfsmimecmsrsakem00.txt 20060205 01:51:09.000000000 +0100
+++ 2/draftietfsmimecmsrsakem01.txt 20060205 01:51:09.000000000 +0100
@@ 1,18 +1,18 @@
S/MIME Working Group B. Kaliski
Internet Draft RSA Laboratories
Document: draftietfsmimecmsrsakem00.txt May 2003
+Document: draftietfsmimecmsrsakem01.txt October 2003
Category: Standards
Use of the RSAKEM Key Transport Algorithm in CMS

+
Status of this Memo
This document is an InternetDraft and is subject to all provisions
of Section 10 of RFC2026.
InternetDrafts 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.
@@ 26,93 +26,96 @@
http://www.ietf.org/1idabstracts.html
The list of InternetDraft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html
Comments or suggestions for improvement may be made on the "ietf
smime" mailing list, or directly to the author.
Abstract
 The RSAKEM Key Transport Algorithm is a onepass (storeand
 forward) mechanism for transporting keying data to a recipient using
 the recipient's RSA public key. This document specifies the
 conventions for using the RSAKEM Key Transport Algorithm with the
 Cryptographic Message Syntax (CMS).
+ The RSAKEM Key Transport Algorithm is a onepass (storeandforward)
+ mechanism for transporting keying data to a recipient using the
+ recipient's RSA public key. This document specifies the conventions
+ for using the RSAKEM Key Transport Algorithm with the Cryptographic
+ Message Syntax (CMS). This version (01) updates the ASN.1 syntax to
+ align with the latest drafts of ANS X9.44 and ISO/IEC 180332, and
+ adds material on certificate conventions and S/MIME capabilities.
Conventions Used in This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
this document are to be interpreted as described in RFC 2119
[STDWORDS].
1. Introduction
 The RSAKEM Key Transport Algorithm is a onepass (storeand
 forward) mechanism for transporting keying data to a recipient using
 the recipient's RSA public key.
+ The RSAKEM Key Transport Algorithm is a onepass (storeandforward)
+ mechanism for transporting keying data to a recipient using the
+ recipient's RSA public key.
Most previous key transport algorithms based on the RSA publickey
cryptosystem (e.g., the popular PKCS #1 v1.5 algorithm [PKCS1]) have
the following general form:
1. Format or "pad" the keying data to obtain an integer m.
2. Encrypt the integer m with the recipient's RSA public key:
c = m^e mod n
3. Output c as the encrypted keying data.
The RSAKEM Key Transport Algorithm takes a different approach that
provides higher security assurance, by encrypting a _random_ integer
 with the recipient's public key, and using a symmetric key wrapping
+ with the recipient's public key, and using a symmetric keywrapping
scheme to encrypt the keying data. It has the following form:
1. Generate a random integer z between 0 and n1.
2. Encrypt the integer z with the recipient's RSA public key:
c = z^e mod n.
3. Derive a keyencrypting key KEK from the integer z.
4. Wrap the keying data using KEK to obtain wrapped keying data
 KD.
+ WK.
 5. Output c and KD as the encrypted keying data.
+ 5. Output c and WK as the encrypted keying data.
This different approach provides higher security assurance because
the input to the underlying RSA operation is random and independent
of the message, and the keyencrypting key KEK is derived from it in
a strong way. As a result, the algorithm enjoys a "tight" security
proof in the random oracle model. It is also architecturally
convenient because the publickey operations are separate from the
symmetric operations on the keying data. One benefit is that the
 length of the keying data is bounded only by the symmetric key
+ length of the keying data is bounded only by the symmetric key
wrapping scheme, not the size of the RSA modulus.
 The RSAKEM Key Transport Algorithm in various forms is being
 adopted in several draft standards including ANSI X9.44 [ANSIX9.44]
 and ISO/IEC 180332 [ISOIEC180332]. It has also been recommended
 by the NESSIE project [NESSIE]. Although the other standards are
 still in development, the algorithm is fairly stable across the
 drafts. For completeness, a specification of the algorithm is given
 in Appendix A of this document; ASN.1 syntax is given in Appendix B.
+ The RSAKEM Key Transport Algorithm in various forms is being adopted
+ in several draft standards including the draft ANS X9.44 [ANSX9.44]
+ and the draft ISO/IEC 180332 [ISOIEC180332]. It has also been
+ recommended by the NESSIE project [NESSIE]. Although the other
+ standards are still in development, the algorithm is stable across
+ the drafts. For completeness, a specification of the algorithm is
+ given in Appendix A of this document; ASN.1 syntax is given in
+ Appendix B.
NOTE: The term KEM stands for "key encapsulation mechanism" and
refers to the first three steps of the process above. The
formalization of key transport algorithms (or more generally,
asymmetric encryption schemes) in terms of key encapsulation
 mechanisms is a result of research by Victor Shoup leading to the
 development of the ISO/IEC 180332 standard [SHOUP].
+ mechanisms is described further in research by Victor Shoup leading
+ to the development of the ISO/IEC 180332 standard [SHOUP].
2. Use in CMS
The RSAKEM Key Transport Algorithm MAY be employed for one or more
recipients in the CMS envelopeddata content type (Section 6 of
[CMS]), where the keying data processed by the algorithm is the CMS
contentencryption key.
The RSAKEM Key Transport Algorithm SHOULD be considered for new
CMSbased applications as a replacement for the widely implemented
@@ 122,305 +125,388 @@
has also been proposed as a replacement (see [PKCS1] and [CMS
OAEP]). RSAKEM has the advantage over RSAESOAEP of a tighter
security proof, but the disadvantage of slightly longer encrypted
keying data.
2.1 Underlying Components
A CMS implementation that supports the RSAKEM Key Transport
Algorithm MUST support at least the following underlying components:
 * For the key derivation function, KDF2 (see [ANSIX9.44][IEEE
 P1363a]) based on SHA1 (see [NISTSHA2]) (this function is
 also specified as the key derivation function in [ANSIX9.63])
+ * For the key derivation function, KDF2 (see [ANSX9.44][IEEE
+ P1363a]) based on SHA1 (see [FIPS1802]) (this function is
+ also specified as the key derivation function in [ANSX9.63])
 * For the key wrapping scheme, AESWrap128, i.e., the AES Key
+ * For the keywrapping scheme, AESWrap128, i.e., the AES Key
Wrap with a 128bit key encrypting key (see [AESWRAP])
An implementation SHOULD also support KDF2 based on SHA256 (see
 [NISTSHA2]), and the TripleDES Key Wrap (see [3DESWRAP]). It MAY
+ [FIPS1802]), and the TripleDES Key Wrap (see [3DESWRAP]). It MAY
support other underlying components.
2.2 RecipientInfo Conventions
 When the RSAKEM Key Transport Algorithm is employed for a
+ When the RSAKEM Key Transport Algorithm is employed for a recipient,
recipient, the RecipientInfo alternative for that recipient MUST be
KeyTransRecipientInfo. The algorithmspecific fields of the
KeyTransRecipientInfo value MUST have the following values:
 * keyEncryptionAlgorithm.algorithm MUST be idkts2basic (see
 Appendix B)
+ * keyEncryptionAlgorithm.algorithm MUST be idacgenerichybrid
+ (see Appendix B)
* keyEncryptionAlgorithm.parameters MUST be a value of type
 KTS2Parms (see Appendix B)
+ GenericHybridParameters, identifying the RSAKEM key
+ encapsulation mechanism (see Appendix B)
* encryptedKey MUST be the encrypted keying data output by the
algorithm (see Appendix A)
2.3 Certificate Conventions
+ The conventions specified in this section augment RFC 3280 [PROFILE].
+
A recipient who employs the RSAKEM Key Transport Algorithm MAY
identify the public key in a certificate by the same
AlgorithmIdentifier as for the PKCS #1 v1.5 algorithm, i.e., using
the rsaEncryption object identifier [PKCS1].
If the recipient wishes only to employ the RSAKEM Key Transport
Algorithm with a given public key, the recipient MUST identify the
 public key in the certificate using the idkts2basic object
 identifier (see Appendix B) where the KTS2Params value indicates
 the underlying components with which the algorithm is to be
 employed.
+ public key in the certificate using the idacgenerichybrid object
+ identifier (see Appendix B) where the associated
+ GenericHybridParameters value indicates the underlying components
+ with which the algorithm is to be employed. The certificate user MUST
+ perform the RSAKEM Key Transport algorithm using only those
+ components.
 [[matching rules to be added]]
+ Regardless of the AlgorithmIdentifier used, the RSA public key is
+ encoded in the same manner in the subject public key information.
+ The RSA public key MUST be encoded using the type RSAPublicKey type:
+
+ RSAPublicKey ::= SEQUENCE {
+ modulus INTEGER,  n
+ publicExponent INTEGER  e
+ }
+
+ Here, the modulus is the modulus n, and publicExponent is the public
+ exponent e. The DER encoded RSAPublicKey is carried in the
+ subjectPublicKey BIT STRING within the subject public key
+ information.
+
+ The intended application for the key MAY be indicated in the key
+ usage certificate extension (see [PROFILE], Section 4.2.1.3). If the
+ keyUsage extension is present in a certificate that conveys an RSA
+ public key with the idacgenerichybrid object identifier as
+ discussed above, then the key usage extension MUST contain the
+ following value:
+
+ keyEncipherment.
+
+ dataEncipherment SHOULD NOT be present. That is, a key intended to be
+ employed only with the RSAKEM Key Transport Algorithm SHOULD NOT
+ also be employed for data encryption.
2.4 SMIMECapabilities Attribute Conventions
 [[to be added]]
+ RFC 2633 [MSG], Section 2.5.2 defines the SMIMECapabilities signed
+ attribute (defined as a SEQUENCE of SMIMECapability SEQUENCEs) to be
+ used to specify a partial list of algorithms that the software
+ announcing the SMIMECapabilities can support. When constructing a
+ signedData object, compliant software MAY include the
+ SMIMECapabilities signed attribute announcing that it supports the
+ RSAKEM Key Transport algorithm.
+
+ The SMIMECapability SEQUENCE representing the RSAKEM Key Transport
+ Algorithm MUST include the idacgenerichybrid object identifier
+ (see Appendix B) in the capabilityID field and MUST include a
+ GenericHybridParameters value in the parameters field identifying the
+ components with which the algorithm is to be employed.
+
+ The DER encoding of a SMIMECapability SEQUENCE is the same as the DER
+ encoding of an AlgorithmIdentifier. Example DER encodings for typical
+ sets of components are given in Appendix B.4.
3. Security Considerations
The security of the RSAKEM Key Transport Algorithm described in
 this document has been shown to be tightly related to the difficulty
+ this document can be shown to be tightly related to the difficulty
of either solving the RSA problem or breaking the underlying
 symmetric key wrapping scheme, if the underlying key derivation
 function is modeled as a random oracle [SHOUP]. While in practice a
 randomoracle result does not provide an actual security proof for
 any particular key derivation function, the result does provide
 assurance that the general construction is reasonable; a key
 derivation function would need to be particularly weak to lead to an
 attack that is not possible in the random oracle model.
+ symmetric keywrapping scheme, if the underlying key derivation
+ function is modeled as a random oracle, and assuming that the
+ symmetric keywrapping scheme satisfies the properties of a data
+ encapsulation mechanism [SHOUP]. While in practice a randomoracle
+ result does not provide an actual security proof for any particular
+ key derivation function, the result does provide assurance that the
+ general construction is reasonable; a key derivation function would
+ need to be particularly weak to lead to an attack that is not
+ possible in the random oracle model.
The RSA key size and the underlying components should be selected
consistent with the desired symmetric security level for an
application. Several security levels have been identified in [NIST
 GUIDELINES]. For brevity, the first three levels are mentioned here:
+ GUIDELINE]. For brevity, the first three levels are mentioned here:
 * 80bit security. The RSA key size SHOULD be at least 1024
 bits, the hash function underlying KDF2 SHOULD be SHA1 or
 above, and the symmetric keywrapping scheme SHOULD be AES Key
 Wrap or TripleDES Key Wrap.
+ * 80bit security. The RSA key size SHOULD be at least 1024 bits,
+ the hash function underlying KDF2 SHOULD be SHA1 or above, and
+ the symmetric keywrapping scheme SHOULD be AES Key Wrap or
+ TripleDES Key Wrap.
* 112bit security. The RSA key size SHOULD be at least 2048
bits, the hash function underlying KDF2 SHOULD be SHA224 or
above, and the symmetric keywrapping scheme SHOULD be AES Key
Wrap or TripleDES Key Wrap.
* 128bit security. The RSA key size SHOULD be at least 3072
bits, the hash function underlying KDF2 SHOULD be SHA256 or
above, and the symmetric keywrapping scheme SHOULD be AES Key
Wrap.
Note that the AES Key Wrap MAY be used at all three of these levels;
the use of AES does not require a 128bit security level for other
components.
+ Implementations MUST protect the RSA private key and the content
+ encryption key. Compromise of the RSA private key may result in the
+ disclosure of all messages protected with that key. Compromise of the
+ contentencryption key may result in disclosure of the associated
+ encrypted content.
+
+ Additional considerations related to key management may be found in
+ [NISTGUIDELINE].
+
The security of the algorithm also depends on the strength of the
random number generator, which SHOULD have a comparable security
level. For further discussion on random number generation, please
see [RANDOM].
Implementations SHOULD NOT reveal information about intermediate
values or calculations, whether by timing or other "side channels",
or otherwise an opponent may be able to determine information about
the keying data and/or the recipient's private key. Although not all
intermediate information may be useful to an opponent, it is
 preferable to conceal as much information as is it practical to,
 unless analysis specifically indicates that the information would
 not be useful.
+ preferable to conceal as much information as is practical, unless
+ analysis specifically indicates that the information would not be
+ useful.
+
+ Generally, good cryptographic practice employs a given RSA key pair
+ in only one scheme. This practice avoids the risk that vulnerability
+ in one scheme may compromise the security of the other, and may be
+ essential to maintain provable security. While RSA public keys have
+ often been employed for multiple purposes such as key transport and
+ digital signature without any known bad interactions, for increased
+ security assurance, such combined use of an RSA key pair is NOT
+ RECOMMENDED in the future (unless the different schemes are
+ specifically designed to be used together).
+
+ Accordingly, an RSA key pair used for the RSAKEM Key Transport
+ Algorithm SHOULD NOT also be used for digital signatures. (Indeed,
+ ASC X9 requires such a separation between key establishment key pairs
+ and digital signature key pairs.) Continuing this principle of key
+ separation, a key pair used for the RSAKEM Key Transport Algorithm
+ SHOULD NOT be used with other key establishment schemes, or for data
+ encryption, or with more than one set of underlying algorithm
+ components.
Parties MAY wish to formalize the assurance that one another's
implementations are correct through implementation validation, e.g.
NIST's Cryptographic Module Validation Program (CMVP).
4. References
4.1 Normative References
3DESWRAP Housley, R. TripleDES and RC2 Key Wrapping. RFC
3217. December 2001.
AESWRAP Schaad, J. and R. Housley. Advanced Encryption
Standard (AES) Key Wrap Algorithm. RFC 3394.
September 2002.
 ANSIX9.63 American National Standard X9.632002: Public Key
+ ANSX9.63 American National Standard X9.632002: Public Key
Cryptography for the Financial Services Industry:
Key Agreement and Key Transport Using Elliptic
Curve Cryptography.
CMS Housley, R. Cryptographic Message Syntax. RFC
3369. August 2002.
CMSALGS Housley, R. Cryptographic Message Syntax (CMS)
Algorithms. RFC 3370. August 2002.
 NISTSHA2 National Institute of Standards and Technology
+ FIPS1802 National Institute of Standards and Technology
(NIST). FIPS 1802: Secure Hash Standard. August
2002.
+ MSG Ramsdell, B. S/MIME Version 3 Message
+ Specification. RFC 2633. June 1999.
+
+ PROFILE Housley, R., Polk, W., Ford, W. and D. Solo.
+ Internet X.509 Public Key Infrastructure:
+ Certificate and Certificate Revocation List (CRL)
+ Profile. RFC 3280. April 2002.
+
STDWORDS Bradner, S. Key Words for Use in RFCs to Indicate
Requirement Levels. RFC 2119. March 1997.
4.2 Informative References
 ANSIX9.44 ANSI X9F1 Working Group. ANSI X9.44: Public Key
 Cryptography for the Financial Services Industry 
  Key Establishment Using Integer Factorization
 Cryptography. Draft D4.1, April 1, 2003.
+ ANSX9.44 ASC X9F1 Working Group. Draft American National
+ Standard X9.44: Public Key Cryptography for the
+ Financial Services Industry  Key Establishment
+ Using Integer Factorization Cryptography. Draft D6,
+ October 15, 2003.
CMSOAEP Housley, R. Use of the RSAESOAEP Key Transport
 Algorithm in CMS. Internet Draft . December 2002.
+ Algorithm in the Cryptographic Message Syntax
+ (CMS). RFC 3560. July 2003.
IEEEP1363a IEEE P1363 Working Group. IEEE P1363a: Standard
Specifications for Public Key Cryptography:
Additional Techniques. Draft D12, May 12, 2003.
Available via http://grouper.ieee.org/groups/1363.
 ISOIEC180332 ISO/IEC 180332: Information technology 
 Security techniques  Encryption algorithms 
 Part 2: Asymmetric Ciphers. Committee Draft,
 December 18, 2002.
+ ISOIEC180332 ISO/IEC 180332: Information technology  Security
+ techniques  Encryption algorithms – Part 2:
+ Asymmetric Ciphers. 2nd Committee Draft, July 10,
+ 2003.
NESSIE NESSIE Consortium. Portfolio of Recommended
Cryptographic Primitives. February 27, 2003.
Available via http://www.cryptonessie.org/.
 NISTGUIDELINES National Institute of Standards and Technology.
+ NISTGUIDELINE National Institute of Standards and Technology.
Special Publication 80057: Recommendation for Key
Management. Part 1: General Guideline. Draft,
January 2003. Available via
http://csrc.nist.gov/CryptoToolkit/tkkeymgmt.html.
 NISTSCHEMES National Institute of Standards and Technology.
 Special Publication 80056: Recommendation on Key
 Establishment Schemes. Draft 2.0, January 2003.
 Available via
 http://csrc.nist.gov/CryptoToolkit/tkkeymgmt.html.

PKCS1 Jonsson, J. and B. Kaliski. PKCS #1: RSA
Cryptography Specifications Version 2.1. RFC 3447.
February 2003.
RANDOM Eastlake, D., S. Crocker, and J. Schiller.
Randomness Recommendations for Security. RFC 1750.
December 1994.
SHOUP Shoup, V. A Proposal for an ISO Standard for
Public Key Encryption. Version 2.1, December 20,
2001. Available via http://www.shoup.net/papers/.
5. IANA Considerations
Within the CMS, algorithms are identified by object identifiers
 (OIDs). All of the OIDs used in this document were assigned in
 PublicKey Cryptography Standards (PKCS) documents, Accredited
 Standards Committee (ASC) X9 documents, or by the National Institute
 of Standards and Technology (NIST). No further action by the IANA is
+ (OIDs). With one exception, all of the OIDs used in this document
+ were assigned in other IETF documents, in ISO/IEC standards
+ documents, by the National Institute of Standards and Technology
+ (NIST), and in PublicKey Cryptography Standards (PKCS) documents.
+ The one exception is that the ASN.1 module's identifier (see Appendix
+ B.3) is assigned in this document. No further action by the IANA is
necessary for this document or any anticipated updates.
6. Acknowledgments
This document is one part of a strategy to align algorithm standards
produced by ASC X9, ISO/IEC JTC1 SC27, NIST, and the IETF. I would
 like to thank the members of the ANSI X9F1 working group for their
 contributions to drafts of ANSI X9.44 which led to this
 specification. My thanks as well to Russ Housley as well for his
 guidance and encouragement.
+ like to thank the members of the ASC X9F1 working group for their
+ contributions to drafts of ANS X9.44 which led to this specification.
+ My thanks as well to Russ Housley as well for his guidance and
+ encouragement. I also appreciate the helpful direction I've received
+ from Blake Ramsdell and Jim Schaad in bringing this document to
+ fruition.
7. Author Address
+7. Author's Address
Burt Kaliski
RSA Laboratories
174 Middlesex Turnpike
Bedford, MA 01730
USA
bkaliski@rsasecurity.com
Appendix A. RSAKEM Key Transport Algorithm
 The RSAKEM Key Transport Algorithm is a onepass (storeand
 forward) mechanism for transporting keying data to a recipient using
 the recipient's RSA public key.
+ The RSAKEM Key Transport Algorithm is a onepass (storeandforward)
+ mechanism for transporting keying data to a recipient using the
+ recipient's RSA public key.
With this type of algorithm, a sender encrypts the keying data using
the recipient's public key to obtain encrypted keying data. The
recipient decrypts the encrypted keying data using the recipient's
private key to recover the keying data.
A.1 Underlying Components
The algorithm has the following underlying components:
* KDF, a key derivation function, which derives keying data of a
specified length from a shared secret value
 * Wrap, a symmetric key wrapping scheme, which encrypts keying
+ * Wrap, a symmetric keywrapping scheme, which encrypts keying
data using a keyencrypting key
In the following, kekLen denotes the length in bytes of the key
encrypting key for the underlying symmetric keywrapping scheme.
In this scheme, the length of the keying data to be transported MUST
 be among the lengths supported by the underlying symmetric key
 wrapping scheme. (The AES Key Wrap, for instance, requires the
 length of the keying data to be a multiple of 8 bytes, and at least
 16 bytes.) Usage and formatting of the keying data (e.g., parity
+ be among the lengths supported by the underlying symmetric key
+ wrapping scheme. (The AES Key Wrap, for instance, requires the length
+ of the keying data to be a multiple of 8 bytes, and at least 16
+ bytes.) Usage and formatting of the keying data (e.g., parity
adjustment for TripleDES keys) is outside the scope of this
algorithm.
With some key derivation functions, it is possible to include other
information besides the shared secret value in the input to the
 function. Also, with some symmetric key wrapping schemes, it is
+ function. Also, with some symmetric keywrapping schemes, it is
possible to associate a label with the keying data. Such uses are
outside the scope of this document, as they are not directly
supported by CMS.
A.2 Sender's Operations
 Let (n,e) be the recipient's RSA public key (see [PKCS1] for
 details) and let K be the keying data to be transported.
+ Let (n,e) be the recipient's RSA public key (see [PKCS1] for details)
+ and let K be the keying data to be transported.
 Let nLen denote the length in bytes of the modulus n, i.e., the
 least integer such that 2^{8*nLen} > n.
+ Let nLen denote the length in bytes of the modulus n, i.e., the least
+ integer such that 2^{8*nLen} > n.
The sender performs the following operations:
1. Generate a random integer z between 0 and n1 (see Note), and
convert z to a byte string Z of length nLen, most significant
byte first:
z = RandomInteger (0, n1)
Z = IntegerToString (z, nLen)
2. Encrypt the random integer z using the recipient's public key
(n,e) and convert the resulting integer c to a ciphertext C, a
byte string of length nLen:
c = z^e mod n
C = IntegerToString (c, nLen)
 3. Derive a keyencrypting key KEK of length kekLen bytes from
 the byte string Z using the underlying key derivation
 function:
+ 3. Derive a keyencrypting key KEK of length kekLen bytes from the
+ byte string Z using the underlying key derivation function:
KEK = KDF (Z, kekLen)
 4. Wrap the keying data K using the underlying key wrapping
 scheme with the keyencrypting key KEK to obtain wrapped
 keying data WK:
+ 4. Wrap the keying data K with the keyencrypting key KEK using
+ the underlying keywrapping scheme to obtain wrapped keying
+ data WK:
WK = Wrap (KEK, K)
5. Concatenate the ciphertext C and the wrapped keying data WK to
obtain the encrypted keying data EK:
EK = C  WK
+
6. Output the encrypted keying data EK.
NOTE: The random integer z MUST be generated independently at random
for different encryption operations, whether for the same or
different recipients.
A.3 Recipient's Operations
Let (n,d) be the recipient's RSA private key (see [PKCS1]; other
private key formats are allowed) and let EK be the encrypted keying
@@ 452,285 +538,474 @@
significant byte first (see Note):
Z = IntegerToString (z, nLen)
4. Derive a keyencrypting key KEK of length kekLen bytes from
the byte string Z using the underlying key derivation function
(see Note):
KEK = KDF (Z, kekLen)
 5. Unwrap the wrapped keying data WK using the underlying key
 wrapping scheme with the keyencrypting key KEK to recover the

+ 5. Unwrap the wrapped keying data WK with the keyencrypting key
+ KEK using the underlying keywrapping scheme to recover the
keying data K:
K = Unwrap (KEK, WK)
+
If the unwrapping operation outputs an error, output
"decryption error" and stop.
6. Output the keying data K.
 NOTE: Implementations SHOULD NOT reveal information about the
 integer z and the string Z, nor about the calculation of the
 exponentiation in Step 2, the conversion in Step 3, or the key
 derivation in Step 4, whether by timing or other "side channels".
 The observable behavior of the implementation SHOULD be the same at
 these steps for all ciphertexts C that are in range. (For example,
 IntegerToString conversion should take the same amount of time
 regardless of the actual value of the integer z.) The integer z, the
 string Z and other intemediate results MUST be securely deleted when
 they are no longer needed.
+ NOTE: Implementations SHOULD NOT reveal information about the integer
+ z and the string Z, nor about the calculation of the exponentiation
+ in Step 2, the conversion in Step 3, or the key derivation in Step 4,
+ whether by timing or other "side channels". The observable behavior
+ of the implementation SHOULD be the same at these steps for all
+ ciphertexts C that are in range. (For example, IntegerToString
+ conversion should take the same amount of time regardless of the
+ actual value of the integer z.) The integer z, the string Z and other
+ intermediate results MUST be securely deleted when they are no longer
+ needed.
Appendix B. ASN.1 Syntax
The ASN.1 syntax for identifying the RSAKEM Key Transport Algorithm
 is a special case of the syntax for Key Transport Scheme 2 (KTS2) in
 the draft ANSI X9.44 [ANSIX9.44]. The syntax for the scheme is
+ is an extension of the syntax for the "generic hybrid cipher" in the
+ draft ISO/IEC 180332 [ISOIEC180332], and is the same as employed
+ in the draft ANS X9.44 [ANSX9.44]. The syntax for the scheme is
given in Section B.1. The syntax for selected underlying components
including those mentioned above is given in B.2.
The following object identifier prefixes are used in the definitions
below:
 x944 OID ::= {
 iso(1) identifiedorganization(3) tc68(133) country(16)
 x9(840) x9Standards(9) x944(44)
+ is180332 OID ::= { iso(1) standard(0) is18033(18033) part2(2) }
+
+ nistAlgorithm OID ::= {
+ jointisoitut(2) country(16) us(840) organization(1)
+ gov(101) csor(3) nistAlgorithm(4)
}
pkcs1 OID ::= {
iso(1) memberbody(2) us(840) rsadsi(113549) pkcs(1) pkcs1(1)
}
 nistAlgorithm OID ::= {
 jointisoitut(2) country(16) us(840) organization(1)
 gov(101) csor(3) nistAlgorithm(4)
 }
+ NullParms is a more descriptive synonym for NULL when an algorithm
+ identifier has null parameters:
+
+ NullParms ::= NULL
The material in this Appendix is based on a draft standard and is
SUBJECT TO CHANGE as that standard is developed.
B.1 RSAKEM Key Transport Algorithm
The object identifier for the RSAKEM Key Transport Algorithm is the
 same as for the basic KTS2 scheme in the draft ANSI X9.44, idkts2
 basic, which is defined in the draft as

 idkts2basic OID ::= { x944 schemes(2) kts2basic(7) }
 The associated parameters for idkts2basic have type KTS2Parms:
+ same as for the "generic hybrid cipher" in the draft ANS ISO/IEC
+ 180332, idacgenerichybrid, which is defined in the draft as
 KTS2Parms ::= SEQUENCE {
 kas [0] KTS2KeyAgreementScheme,
 kws [1] KTS2SymmetricKeyWrappingScheme,
 labelMethod [2] KTS2LabelMethod
+ idacgenerichybrid OID ::= {
+ is180332 asymmetriccipher(1) generichybrid(2)
}
 The fields of type KTS2Parms have the following meanings:

 * kas identifies the underlying key agreement scheme. For the
 RSAKEM Key Transport Algorithm, the scheme is the basic Key
 Agreement Scheme 1 (KAS1) from the draft ANSI X9.44.

 The object identifier for the basic KAS1 is idkas1basic,
 which is defined in the draft ANSI X9.44 as

 idkas1basic OID ::= { x944 schemes(2) kas1basic(1) }

 The associated parameters for idkas1basic have type KAS1
 Parms:
+ The associated parameters for idacgenerichybrid have type
+ GenericHybridParameters:
 KAS1Parms ::= SEQUENCE {
 sves [0] KAS1SecretValueEncapsulationScheme,
 kdf [1] KAS1KeyDerivationFunction,
 otherInfoMethod [2] KAS1OtherInfoMethod
+ GenericHybridParameters ::= {
+ kem KeyEncapsulationMechanism,
+ dem DataEncapsulationMechanism
}
 The fields of type KAS1Parms have the following meanings:
+ The fields of type GenericHybridParameters have the following
+ meanings:
 * sves identifies the underlying secretvalue
 encapsulation mechanism. (In the draft ANSI X9.44, the
 term "Secret Value Encapsulation Scheme" refers to the
 first _two_ steps of the RSAKEM Key Transport
 Algorithm, which are separated from the key derivation
 function for architectural reasons.) For the RSAKEM Key
 Transport Algorithm, the mechanism is RSASVES1 from the
 draft ANSI X9.44.
+ * kem identifies the underlying key encapsulation mechanism. For
+ the RSAKEM Key Transport Algorithm, the scheme is RSAKEM from
+ the draft ISO/IEC 180332.
 The object identifier for RSASVES1 is idrsasves1, which
 is defined in the draft ANSI X9.44 as
+ The object identifier for RSAKEM (as a key encapsulation
+ mechanism) is idkemrsa, which is defined in the draft ISO/IEC
+ 180332 as
 idrsasves1 OID ::= {
 x944 components(1) rsasves1(2)
+ idkemrsa OID ::= {
+ is180332 keyencapsulationmechanism(2) rsa(4)
}
 This object identifier has no associated parameters.

 * kdf identifies the underlying key derivation function.
 For alignment with the draft ANSI X9.44, it MUST be
 KDF2. However, other key derivation functions MAY be
 used with CMS. Please see B.2.1 for the syntax for KDF2.

 KAS1KeyDerivationFunction ::= AlgorithmIdentifier
+ The associated parameters for idkemrsa have type
+ RsaKemParameters:
 * otherInfoMethod specifies the method for formatting
 other information to be included in the input to the key
 derivation function. For this version of the document,
 the method MUST be the "specified other information"
 method.
+ RsaKemParameters ::= {
+ keyDerivationFunction KeyDerivationFunction,
+ keyLength KeyLength
+ }
 KAS1OtherInfoMethod ::= AlgorithmIdentifier
+ The fields of type RsaKemParameters have the following
+ meanings:
 The object identifier for the "specified other
 information" method is idspecifiedOtherInfo:
+ * keyDerivationFunction identifies the underlying key
+ derivation function. For alignment with the draft ANS
+ X9.44, it MUST be KDF2. However, other key derivation
+ functions MAY be used with CMS. Please see B.2.1 for the
+ syntax for KDF2.
 idspecifiedOtherInfo OID ::= [[to be defined]]
+ KeyDerivationFunction ::=
+ AlgorithmIdentifier {{KDFAlgorithms}}
 The associated parameters for idspecifiedOtherInfo have
 type SpecifiedOtherInfo:
+ KDFAlgorithms ALGORITHMS ::= {
+ kdf2,
+ ...  implementations may define other methods
+ }
 SpecifiedOtherInfo ::= OCTET STRING SIZE((0..MAX))
+ * keyLength is the length in bytes of the keyencrypting
+ key, which depends on the underlying symmetric key
+ wrapping scheme.
 For this version of the document, the value of the other
 information MUST be the empty string.
+ KeyLength ::= INTEGER (1..MAX)
 * kws identifies the underlying symmetric keywrapping scheme.
 For alignment with the draft ANSI X9.44, it MUST be an X9
+ * dem identifies the underlying data encapsulation mechanism.
+ For alignment with the draft ANS X9.44, it MUST be an X9
approved symmetric keywrapping scheme. (See Note.) However,
 other schemes MAY be used with CMS. Please see B.2.2 for the
 syntax for the AES and TripleDES Key Wraps.

 KTS2SymmetricKeyWrappingScheme ::= AlgorithmIdentifier

 * labelMethod specifies the method for formatting a label to be
 associated with the keying data. For this version of the
 document, the method MUST be the "specified label" method.

 KTS2LabelMethod ::= AlgorithmIdentifier

 The object identifier for the "specified label" method is id
 specifiedLabel, which is defined in the draft ANSI X9.44 as

 idspecifiedLabel OID ::= { pkcs1 specifiedLabel(9) }

 The associated parameters for idspecifiedLabel have type
 SpecifiedLabel:

 SpecifiedLabel ::= OCTET STRING SIZE((0..MAX))
+ other symmetric keywrapping schemes MAY be used with CMS.
+ Please see B.2.2 for the syntax for the AES and TripleDES Key
+ Wraps.
 For this version of the document, the value of the label MUST
 be the empty string.
+ DataEncapsulationMechanism ::=
+ AlgorithmIdentifier {{DEMAlgorithms}}
 NOTE: As of this writing, the AES Key Wrap and the TripleDES Key
 Wrap are in the process of being approved by X9.
+ DEMAlgorithms ALGORITHM ::= {
+ X9SymmetricKeyWrappingSchemes,
+ ...  implementations may define other methods
+ }
+ X9SymmetricKeyWrappingSchemes ALGORITHM ::= {
+ aes128Wrap  aes192Wrap  aes256Wrap  tdesWrap,
+ ...  allows for future expansion
+ }
 DISCUSSION TOPIC: In NIST's key establishment schemes recommendation
 [NISTSCHEMES], the parties' names are included in the "other
 information" for key derivation. Should they be included here as
 well?
+ NOTE: The generic hybrid cipher in the draft ISO/IEC 180332 can
+ encrypt arbitrary data, hence the term "data encapsulation
+ mechanism". The symmetric keywrapping schemes take the role of data
+ encapsulation mechanisms in the RSAKEM Key Transport Algorithm. The
+ draft ISO/IEC 180332 currently allows only three particular data
+ encapsulation mechanisms, not including any of these symmetric key
+ wrapping schemes. However, the ASN.1 syntax in that document expects
+ that additional algorithms will be allowed.
B.2 Selected Underlying Components
B.2.1 Key Derivation Functions
 The object identifier for KDF2 (see [ANSIX9.44]) is
+ The object identifier for KDF2 (see [ISOIEC180332]) is
 idkdf2 OID ::= { x944 components(1) kdf2(1) }
+ idkdfkdf2 OID ::= {
+ is180332 keyderivationfunctions(5) kdf2(2)
+ }
The associated parameters identify the underlying hash function. For
 alignment with the draft ANSI X9.44, the hash function MUST be an
+ alignment with the draft ANS X9.44, the hash function MUST be an ASC
X9approved hash function. (See Note.) However, other hash functions
MAY be used with CMS.
 KDF2Parms ::= AlgorithmIdentifier
+ kdf2 ALGORITHM ::= {{ OID idkdfkdf2 PARMS KDF2HashFunction }}
+
+ KDF2HashFunction ::= AlgorithmIdentifier {{KDF2HashFunctions}}
+
+ KDF2HashFunctions ALGORITHM ::= {
+ X9HashFunctions,
+ ...  implementations may define other methods
+ }
+
+ X9HashFunctions ALGORITHM ::= {
+ sha1  sha224  sha256  sha384  sha512,
+ ...  allows for future expansion
+ }
The object identifier for SHA1 is
idsha1 OID ::= {
iso(1) identifiedorganization(3) oiw(14) secsig(3)
algorithms(2) sha1(26)
}
The object identifiers for SHA256, SHA384 and SHA512 are
idsha256 OID ::= { nistAlgorithm hashAlgs(2) sha256(1) }
idsha384 OID ::= { nistAlgorithm hashAlgs(2) sha384(2) }
idsha512 OID ::= { nistAlgorithm hashAlgs(2) sha512(3) }
There has been some confusion over whether the various SHA object
identifiers have a NULL parameter, or no associated parameters. As
also discussed in [PKCS1], implementations SHOULD generate algorithm
 identifiers without parameters, and MUST accept algorithm
 identifiers either without parameters, or with NULL parameters.
+ identifiers without parameters, and MUST accept algorithm identifiers
+ either without parameters, or with NULL parameters.
 NOTE: As of this writing, only SHA1 is an X9approved hash
 function; SHA224 and above are in the process of being approved.
 The object identifier for SHA224 has not yet been assigned.
+ sha1 ALGORITHM ::= {{ OID idsha1 }}  NULLParms MUST be
+ sha224 ALGORITHM ::= {{ OID idsha224 }}  accepted for these
+ sha256 ALGORITHM ::= {{ OID idsha256 }}  OIDs
+ sha384 ALGORITHM ::= {{ OID idsha384 }} – ""
+ sha512 ALGORITHM ::= {{ OID idsha512 }} – ""
B.2.2 Symmetric Key Wrapping Schemes
+ NOTE: As of this writing, only SHA1 is an ASC X9approved hash
+ function; SHA224 and above are in the process of being approved. The
+ object identifier for SHA224 has not yet been assigned.
 The object identifier for the AES Key Wrap depends on the size of
+B.2.2 Symmetric KeyWrapping Schemes
+
+ The object identifiers for the AES Key Wrap depends on the size of
the key encrypting key. There are three object identifiers (see
[AESWRAP]):
idaes128Wrap OID ::= { nistAlgorithm aes(1) aes128Wrap(5) }
idaes192Wrap OID ::= { nistAlgorithm aes(1) aes192Wrap(25) }
idaes256Wrap OID ::= { nistAlgorithm aes(1) aes256Wrap(45) }
+
These object identifiers have no associated parameters.
+ aes128Wrap ALGORITHM ::= {{ OID idaes128wrap }}
+ aes192Wrap ALGORITHM ::= {{ OID idaes192wrap }}
+ aes256Wrap ALGORITHM ::= {{ OID idaes256wrap }}
+
The object identifier for the TripleDES Key Wrap (see [3DESWRAP])
is
idalgCMS3DESwrap OBJECT IDENTIFIER ::= {
iso(1) memberbody(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) alg(3) 6
}
This object identifier has a NULL parameter.
B.3 Example
+ tdesWrap ALGORITHM ::=
+ {{ OID idalgCMS3DESwrap PARMS NullParms }}
 As an example, if the key derivation function is KDF2 based on SHA1
 and the symmetric key wrapping scheme is the AES Key Wrap with a
 128bit KEK, the AlgorithmIdentifier for the RSAKEM Key Transport
 Algorithm will have the following value:
+ NOTE: As of this writing, the AES Key Wrap and the TripleDES Key
+ Wrap are in the process of being approved by ASC X9.
 SEQUENCE {
 idkts2basic,  basic KTS2
 SEQUENCE {  KTS2Parms
 [0] SEQUENCE {  key agreement scheme
 idkas1basic,  basic KAS1
 SEQUENCE {  KAS1Parms
 [0] SEQUENCE {  secret value encapsulation scheme
 idrsasves1  RSASVES1; no parameters
 },
 [1] SEQUENCE {  key derivation function
 idkdf2,  KDF2
 SEQUENCE {  KDF2Parms
 idsha1  no parameters (preferred)
+B.3 ASN.1 module
+
+ CMSRSAKEM
+ { iso(1) memberbody(2) us(840) rsadsi(113549) pkcs(1)
+ pkcs9(9) smime(16) modules(0) cmsrsakem(21) } [[check]]
+
+ BEGIN
+
+  EXPORTS ALL
+
+  IMPORTS None
+
+  Useful types and definitions
+
+ OID ::= OBJECT IDENTIFIER  alias
+
+  Unless otherwise stated, if an object identifier has associated
+  parameters (i.e., the PARMS element is specified), the parameters
+  field shall be included in algorithm identifier values. The
+  parameters field shall be omitted if and only if the object
+  identifier does not have associated parameters (i.e., the PARMS
+  element is omitted), unless otherwise stated.
+
+ ALGORITHM ::= CLASS {
+ &id OBJECT IDENTIFIER UNIQUE,
+ &Type OPTIONAL
}
 },
 [2] SEQUENCE {  other information method
 idspecifiedOtherInfo,  specified other info.
 ''H  empty string
+ WITH SYNTAX { OID &id [PARMS &Type] }
+
+ AlgorithmIdentifier { ALGORITHM:IOSet } ::= SEQUENCE {
+ algorithm ALGORITHM.&id( {IOSet} ),
+ parameters ALGORITHM.&Type( {IOSet}{@algorithm} ) OPTIONAL
}
+
+ NullParms ::= NULL
+
+  ISO/IEC 180332 arc
+
+ is180332 OID ::= { iso(1) standard(0) is18033(18033) part2(2) }
+
+  NIST algorithm arc
+
+ nistAlgorithm OID ::= {
+ jointisoitut(2) country(16) us(840) organization(1)
+ gov(101) csor(3) nistAlgorithm(4)
+ }
+
+  PKCS #1 arc
+
+ pkcs1 OID ::= {
+ iso(1) memberbody(2) us(840) rsadsi(113549) pkcs(1) pkcs1(1)
+ }
+  RSAKEM Key Transport Algorithm, based on Generic Hybrid Cipher
+
+ idacgenerichybrid OID ::= {
+ is180332 asymmetriccipher(1) generichybrid(2)
+ }
+
+ GenericHybridParameters ::= {
+ kem KeyEncapsulationMechanism,
+ dem DataEncapsulationMechanism
+ }
+
+ idkemrsa OID ::= {
+ is180332 keyencapsulationmechanism(2) rsa(4)
+ }
+
+ RsaKemParameters ::= {
+ keyDerivationFunction KeyDerivationFunction,
+ keyLength KeyLength
+ }
+
+ KeyDerivationFunction ::= AlgorithmIdentifier {{KDFAlgorithms}}
+
+ KDFAlgorithms ALGORITHMS ::= {
+ kdf2,
+ ...  implementations may define other methods
+ }
+
+ KeyLength ::= INTEGER (1..MAX)
+
+ DataEncapsulationMechanism ::= AlgorithmIdentifier {{DEMAlgorithms}}
+
+ DEMAlgorithms ALGORITHM ::= {
+ X9SymmetricKeyWrappingSchemes,
+ ...  implementations may define other methods
+ }
+
+ X9SymmetricKeyWrappingSchemes ALGORITHM ::= {
+ aes128Wrap  aes192Wrap  aes256Wrap  tdesWrap,
+ ...  allows for future expansion
+ }
+
+  Key Derivation Functions
+
+ idkdfkdf2 OID ::= { is180332 keyderivationfunctions(5) kdf2(2) }
+
+ kdf2 ALGORITHM ::= {{ OID idkdfkdf2 PARMS KDF2HashFunction }}
+
+ KDF2HashFunction ::= AlgorithmIdentifier {{KDF2HashFunctions}}
+
+ KDF2HashFunctions ALGORITHM ::= {
+ X9HashFunctions,
+ ...  implementations may define other methods
+ }
+  Hash Functions
+
+ X9HashFunctions ALGORITHM ::= {
+ sha1  sha224  sha256  sha384  sha512,
+ ...  allows for future expansion
+ }
+
+ idsha1 OID ::= {
+ iso(1) identifiedorganization(3) oiw(14) secsig(3)
+ algorithms(2) sha1(26)
+ }
+
+ idsha256 OID ::= { nistAlgorithm hashAlgs(2) sha256(1) }
+ idsha384 OID ::= { nistAlgorithm hashAlgs(2) sha384(2) }
+ idsha512 OID ::= { nistAlgorithm hashAlgs(2) sha512(3) }
+
+ sha1 ALGORITHM ::= {{ OID idsha1 }}  NullParms MUST be
+ sha224 ALGORITHM ::= {{ OID idsha224 }}  accepted for these
+ sha256 ALGORITHM ::= {{ OID idsha256 }}  OIDs
+ sha384 ALGORITHM ::= {{ OID idsha384 }} – ""
+ sha512 ALGORITHM ::= {{ OID idsha512 }} – ""
+
+  Symmetric KeyWrapping Schemes
+
+ idaes128Wrap OID ::= { nistAlgorithm aes(1) aes128Wrap(5) }
+ idaes192Wrap OID ::= { nistAlgorithm aes(1) aes192Wrap(25) }
+ idaes256Wrap OID ::= { nistAlgorithm aes(1) aes256Wrap(45) }
+
+ aes128Wrap ALGORITHM ::= {{ OID idaes128wrap }}
+ aes192Wrap ALGORITHM ::= {{ OID idaes192wrap }}
+ aes256Wrap ALGORITHM ::= {{ OID idaes256wrap }}
+
+ idalgCMS3DESwrap OBJECT IDENTIFIER ::= {
+ iso(1) memberbody(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) alg(3) 6
}
+
+ tdesWrap ALGORITHM ::= {{ OID idalgCMS3DESwrap PARMS NullParms }}
+
+B.4 Examples
+
+ As an example, if the key derivation function is KDF2 based on
+ SHA256 and the symmetric keywrapping scheme is the AES Key Wrap
+ with a 128bit KEK, the AlgorithmIdentifier for the RSAKEM Key
+ Transport Algorithm will have the following value:
+
+ SEQUENCE {
+ idacgenerichybrid,  generic cipher
+ SEQUENCE {  GenericHybridParameters
+ SEQUENCE {  key encapsulation mechanism
+ idkemrsa,  RSAKEM
+ SEQUENCE {  RsaKemParameters
+ SEQUENCE {  key derivation function
+ idkdfkdf2,  KDF2
+ SEQUENCE {  KDF2HashFunction
+ idsha256  SHA256; no parameters (preferred)
},
 [1] SEQUENCE {  symmetric key wrapping scheme
 idaes128Wrap  AES128 Wrap; no parameters
+ 16  KEK length in bytes
},
 [2] SEQUENCE {  label method
 idspecifiedLabel,  specified label
 ''H  empty string
+ SEQUENCE {  data encapsulation mechanism
+ idaes128Wrap  AES128 Wrap; no parameters
}
}
}
+ This AlgorithmIdentifier value has the following DER encoding:
+
+ 30 4f
+ 06 07 28 81 8c 71 02 01 02  idacgenerichybrid
+ 30 44
+ 30 25
+ 06 07 28 81 8c 71 02 02 04  idkemrsa
+ 30 1a
+ 30 16
+ 06 07 28 81 8c 71 02 05 02  idkdfkdf2
+ 30 0b
+ 06 09 60 86 48 01 65 03 04 02 01  idsha256
+ 02 10  16 bytes
+ 30 0b
+ 06 09 60 86 48 01 65 03 04 01 05  idaes128Wrap
+
+ The DER encodings for other typical sets of underlying components are
+ as follows:
+
+ * KDF2 based on SHA384, AES Key Wrap with a 192bit KEK
+
+ 30 4f 06 07 28 81 8c 71 02 01 02 30 44 30 25 06
+ 07 28 81 8c 71 02 02 04 30 1a 30 16 06 07 28 81
+ 8c 71 02 05 02 30 0b 06 09 60 86 48 01 65 03 04
+ 02 02 02 18 30 0b 06 09 60 86 48 01 65 03 04 01
+ 19
+
+ * KDF2 based on SHA512, AES Key Wrap with a 256bit KEK
+
+ 30 4f 06 07 28 81 8c 71 02 01 02 30 44 30 25 06
+ 07 28 81 8c 71 02 02 04 30 1a 30 16 06 07 28 81
+ 8c 71 02 05 02 30 0b 06 09 60 86 48 01 65 03 04
+ 02 03 02 20 30 0b 06 09 60 86 48 01 65 03 04 01
+ 2d
+
+ * KDF2 based on SHA1, TripleDES Key Wrap with a 128bit KEK
+ (twokey tripleDES)
+
+ 30 4f 06 07 28 81 8c 71 02 01 02 30 44 30 21 06
+ 07 28 81 8c 71 02 02 04 30 16 30 12 06 07 28 81
+ 8c 71 02 05 02 30 07 06 05 2b 0e 03 02 1a 02 10
+ 30 0f 06 0b 2a 86 48 86 f7 0d 01 09 10 03 06 05
+ 00
+
+ * KDF2 based on SHA224, TripleDES Key Wrap with a 192bit
+ KEK (threekey tripleDES)
+
+ [[to be defined, awaiting OID for SHA224]]
+
Full Copyright Statement
Copyright (C) The Internet Society (2003). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph
are included on all such copies and derivative works. However, this