 1/draftietfsmimeecc04.txt 20060205 01:51:45.000000000 +0100
+++ 2/draftietfsmimeecc05.txt 20060205 01:51:45.000000000 +0100
@@ 1,14 +1,14 @@
INTERNETDRAFT Simon BlakeWilson, Certicom Corp
draftietfsmimeecc04.txt Daniel R. L. Brown, Certicom Corp
+draftietfsmimeecc05.txt Daniel R. L. Brown, Certicom Corp
Paul Lambert, Cosine Communications
12 March, 2001 Expires: 12 September, 2001
+7 May, 2001 Expires: 6 November, 2001
Use of ECC Algorithms in CMS
Status of this Memo
This document is an InternetDraft and is in full conformance with
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 InternetDrafts.
@@ 25,22 +25,25 @@
The list of InternetDraft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
Abstract
This document describes how to use Elliptic Curve Cryptography
(ECC) publickey algorithms in the Cryptographic Message Syntax
(CMS). The ECC algorithms support the creation of digital
signatures and the exchange of keys to encrypt or authenticate
content. The definition of the algorithm processing is based on
 the ANSI X9.62 standard and the ANSI X9.63 draft, developed by the
 ANSI X9F1 working group.
+ the ANSI X9.62 standard, developed by the ANSI X9F1 working group,
+ and the IEEE 1363 standard and the SEC 1 standard.
+
+ The readers attention is called to the Intellectual Property Rights
+ section at the end of this document.
Table of Contents
1 Introduction ........................................ 3
1.1 Requirements terminology ....................... 3
2 SignedData using ECC ................................ 3
2.1 SignedData using ECDSA ......................... 3
2.1.1 Fields of the SignedData ................ 3
2.1.2 Actions of the sending agent ............ 4
2.1.3 Actions of the receiving agent .......... 4
@@ 173,24 +176,24 @@
3 EnvelopedData using ECC Algorithms
This section describes how to use ECC algorithms with the CMS
EnvelopedData format.
3.1 EnvelopedData using (ephemeralstatic) ECDH
This section describes how to use ephemeralstatic Elliptic Curve
DiffieHellman (ECDH) key agreement algorithm with EnvelopedData.
 Ephemeralstatic ECDH is specified in [X9.63]. Ephemeralstatic
 ECDH is the elliptic curve analog of the ephemeralstatic
 DiffieHellman key agreement algorithm specified jointly in the
 documents [CMS, Section 12.3.1.1] and [CMSDH].
+ Ephemeralstatic ECDH is specified in [SEC1] and [IEEE1363].
+ Ephemeralstatic ECDH is the the elliptic curve analog of the
+ ephemeralstatic DiffieHellman key agreement algorithm specified
+ jointly in the documents [CMS, Section 12.3.1.1] and [CMSDH].
In an implementation that uses ECDH with CMS EnvelopedData with key
agreement, the following techniques and formats MUST be used.
3.1.1 Fields of KeyAgreeRecipientInfo
When using ephemeralstatic ECDH with EnvelopedData, the fields of
KeyAgreeRecipientInfo are as in [CMS], but with the following
restrictions:
@@ 211,56 +214,58 @@
symmetric encryption algorithm used to encrypt the CEK with the
KEK.
3.1.2 Actions of the sending agent
When using ephemeralstatic ECDH with EnvelopedData, the sending
agent first obtains the recipient's EC public key and domain
parameters (e.g. from the recipient's certificate). The sending
agent then determines an integer "keydatalen", which is the
KeyWrapAlgorithm symmetric keysize in bits, and also a bit string
 "SharedData", which is the DER encoding of ECCCMSSharedInfo (see
 Section 8.2). The sending agent then performs the initiator
 transformation of the 1Pass DiffieHellman scheme specified in
 [X9.63, Section 6.2.1]. As a result the sending agent obtains:
+ "SharedInfo", which is the DER encoding of ECCCMSSharedInfo (see
+ Section 8.2). The sending agent then performs the key deployment
+ and the key agreement operation of the Elliptic Curve
+ DiffieHellman Scheme specified in [SEC1, Section 6.1]. As a
+ result the sending agent obtains:
 an ephemeral public key, which is represented as a value of
the type ECPoint (see Section 8.2), encapsulated in a bit
string and placed in the KeyAgreeRecipientInfo originator
field, and
  a shared secret bit string "KeyData" which is used as the
 pairwise keyencryption key for that recipient.
+  a shared secret bit string "K" which is used as the pairwise
+ keyencryption key for that recipient, as specified in [CMS].
3.1.3 Actions of the receiving agent
When using ephemeralstatic ECDH with EnvelopedData, the receiving
 agent determines the bit string "SharedData", which is the DER
+ agent determines the bit string "SharedInfo", which is the DER
encoding of ECCCMSSharedInfo (see Section 8.2), and the integer
"keydatalen" from the keysize, in bits, of the KeyWrapAlgorithm.
The receiving agent retrieves the ephemeral EC public key from the
bit string KeyAgreeRecipientInfo originator, which an value of the
type ECPoint (see Section 8.2) encapsulated as a bit string. The
 receiving agent completes the responder transformation of the
 1Pass DiffieHellman scheme [X9.63, Section 6.2.2]. As a result
 the receiving agent obtains a shared secret bit string "KeyData"
 which is used as the pairwise keyencryption key to unwrap the CEK.
+ receiving agent performs the key agreement operation of the
+ Elliptic Curve DiffieHellman Scheme specified in [SEC1, Section
+ 6.1]. As a result the receiving agent obtains a shared secret bit
+ string "K" which is used as the pairwise keyencryption key to
+ unwrap the CEK.
3.2 EnvelopedData using 1Pass ECMQV
This section describes how to use the 1Pass elliptic curve MQV
 (ECMQV) key agreement algorithm with EnvelopedData. 1Pass ECMQV
 is specified in [X9.63]. Like the KEA algorithm [CMSKEA], 1Pass
 ECMQV uses three key pairs: an ephemeral key pair, a static key
 pair of the sending agent, and a static key pair of the receiving
 agent. An advantage of using 1Pass ECMQV is that it can be used
 with both EnvelopedData and AuthenticatedData.
+ (ECMQV) key agreement algorithm with EnvelopedData. ECMQV is
+ specified in [SEC1] and [IEEE1363]. Like the KEA algorithm
+ [CMSKEA], 1Pass ECMQV uses three key pairs: an ephemeral key
+ pair, a static key pair of the sending agent, and a static key pair
+ of the receiving agent. An advantage of using 1Pass ECMQV is that
+ it can be used with both EnvelopedData and AuthenticatedData.
In an implementation that uses 1Pass ECMQV with CMS EnvelopedData
with key agreement, the following techniques and formats MUST be
used.
3.2.1 Fields of KeyAgreeRecipientInfo
When using 1Pass ECMQV with EnvelopedData the fields of
KeyAgreeRecipientInfo are:
@@ 287,69 +292,66 @@
encryption algorithm used to encrypt the CEK with the KEK
generated using the 1Pass ECMQV algorithm.
3.2.2 Actions of the sending agent
When using 1Pass ECMQV with EnvelopedData, the sending agent first
obtains the recipient's EC public key and domain parameters,
(e.g. from the recipient's certificate) and checks that the domain
parameters are the same. The sending agent then determines an
integer "keydatalen", which is the KeyWrapAlgorithm symmetric
 keysize in bits, and also a bit string "SharedData", which is the
+ keysize in bits, and also a bit string "SharedInfo", which is the
DER encoding of ECCCMSSharedInfo (see Section 8.2). The sending
 agent then performs the initiator transformation of the 1Pass
 ECMQV scheme specified in [X9.63, Section 6.9.1]. As a result the
 sending agent obtains
+ agent then performs the key deployment and key agreement operations
+ of the Elliptic Curve MQV Scheme specified in [SEC1, Section 6.2].
+ As a result the sending agent obtains
 an ephemeral public key, which is represented as a value of
type ECPoint (see Section 8.2), encapsulated in a bit string,
placed in an MQVuserKeyingMaterial ephemeralPublicKey
publicKey field (see Section 8.2), and
  a shared secret bit string "KeyData" which is used as the
 pairwise keyencryption key for that recipient. Parity bits
 are adjusted according to the key wrap algorithm.
+  a shared secret bit string "K" which is used as the pairwise
+ keyencryption key for that recipient, as specified in [CMS].
The ephemeral public key can be reused with an AuthenticatedData
for greater efficiency.
3.2.3 Actions of the receiving agent
When using 1Pass ECMQV with EnvelopedData, the receiving agent
 determines the bit string "SharedData", which is the DER encoding
 of ECCCMSSharedInfo (see Section 8.2), and the
 integer "keydatalen" from the keysize, in bits, of the
 KeyWrapAlgorithm. The receiving agent then retrieves the static
 and ephemeral EC public keys of the originator, from the originator
 and ukm fields as described in Section 3.2.1, and its static EC
 public key identified in the rid field and checks that the domain
 parameters are the same. The receiving agent then performs the
 responder transformation of the 1Pass ECMQV scheme [X9.63, Section
 6.9.2]. As a result the receiving agent obtains a shared secret
 bit string "KeyData" which is used as the pairwise keyencryption
 key to unwrap the CEK.
+ determines the bit string "SharedInfo", which is the DER encoding
+ of ECCCMSSharedInfo (see Section 8.2), and the integer
+ "keydatalen" from the keysize, in bits, of the KeyWrapAlgorithm.
+ The receiving agent then retrieves the static and ephemeral EC
+ public keys of the originator, from the originator and ukm fields
+ as described in Section 3.2.1, and its static EC public key
+ identified in the rid field and checks that the domain parameters
+ are the same. The receiving agent then performs the key agreement
+ operation of the Elliptic Curve MQV Scheme [SEC1, Section 6.2]. As
+ a result the receiving agent obtains a shared secret bit string "K"
+ which is used as the pairwise keyencryption key to unwrap the CEK.
4 AuthenticatedData using ECC
This section describes how to use ECC algorithms with the CMS
AuthenticatedData format. AuthenticatedData lacks nonrepudiation,
and so in some instances is preferable to SignedData. (For
example, the sending agent might not want the message to be
authenticated when forwarded.)
4.1 AuthenticatedData using 1pass ECMQV
This section describes how to use the 1Pass elliptic curve MQV
 (ECMQV) key agreement algorithm with AuthenticatedData. 1Pass
 ECMQV is specified in [X9.63]. An advantage of using 1Pass ECMQV
 is that it can be used with both EnvelopedData and
 AuthenticatedData.
+ (ECMQV) key agreement algorithm with AuthenticatedData. ECMQV is
+ specified in [SEC1]. An advantage of using 1Pass ECMQV is that it
+ can be used with both EnvelopedData and AuthenticatedData.
4.1.1 Fields of the KeyAgreeRecipientInfo
The AuthenticatedData KeyAgreeRecipientInfo fields are used in the
same manner as the fields for the corresponding EnvelopedData
KeyAgreeRecipientInfo fields of Section 3.2.1 of this document.
4.1.2 Actions of the sending agent
The sending agent uses the same actions as for EnvelopedData
@@ 374,22 +376,21 @@
Implementations of this specification MUST implement either
SignedData with ECDSA or EnvelopedData with ephemeralstatic ECDH.
Implementations of this specification SHOULD implement both
SignedData with ECDSA and EnvelopedData with ephemeralstatic ECDH.
Implementations MAY implement the other techniques specified, such
as AuthenticatedData and 1Pass ECMQV.
Furthermore, in order to encourage interoperability,
implementations SHOULD use the elliptic curve domain parameters
 specified by ANSI [X9.62, X9.63], NIST [FIPS1862] and SECG
 [SEC2].
+ specified by ANSI [X9.62], NIST [FIPS1862] and SECG [SEC2].
6 Certificates using ECC
Internet X.509 certificates [PKI] can be used in conjunction with
this specification to distribute agents' public keys. The use of
ECC algorithms and keys within X.509 certificates is specified in
[PKIALG]. More details can be found in [SEC3].
7 SMIMECapabilities Attribute and ECC
@@ 430,21 +431,21 @@
for ECMQV.
8 ASN.1 Syntax
The ASN.1 syntax that is used in this document is gathered together
in this section for reference purposes.
8.1 Algorithm identifiers
The algorithm identifiers used in this document are taken from
 [X9.62] and [X9.63].
+ [X9.62], [SEC1] and [SEC2].
The following object identifier indicates the hash algorithm used
in this document:
sha1 OBJECT IDENTIFIER ::= { iso(1) identifiedorganization(3)
oiw(14) secsig(3) algorithm(2) 26 }
The following object identifier is used in this document to
indicate an elliptic curve public key:
@@ 539,59 +540,50 @@
entityUInfo optionally contains additional keying material
supplied by the sending agent. When used with ECDH and CMS, the
entityUInfo field contains the octet string ukm. When used with
ECMQV and CMS, the entityUInfo contains the octet string
addedukm (encoded in MQVuserKeyingMaterial).
suppPubInfo contains the length of the generated KEK, in bits,
represented as a 32 bit number, as in [CMSDH]. (E.g. for 3DES
it would be 00 00 00 c0.)
Within CMS, ECCCMSSharedInfo is DERencoded and used as input to
 the key derivation function, as specified in [X9.63, Section
 5.6.3]. Note that ECCCMSSharedInfo differs from the OtherInfo
 specified in [CMSDH]. Here a counter value is not included in the
 keyInfo field because the key derivation function specified in
 [X9.63, Section 5.6.3] ensures that sufficient keying data is
 provided.
+ the key derivation function, as specified in [SEC1, Section 3.6.1].
+ Note that ECCCMSSharedInfo differs from the OtherInfo specified
+ in [CMSDH]. Here a counter value is not included in the keyInfo
+ field because the key derivation function specified in [SEC1,
+ Section 3.6.1] ensures that sufficient keying data is provided.
9 Summary
This document specifies how to use ECC algorithms with the S/MIME
CMS. Use of ECC algorithm within CMS can result in reduced
processing requirements for S/MIME agents, and reduced bandwidth
for CMS messages.
References
 [X9.42] ANSI X9.422001, "Agreement Of Symmetric Keys Using
 DiffieHellman and MQV Algorithms", American National
 Standards Institute, 2001, Approved draft.

[X9.62] ANSI X9.621998, "Public Key Cryptography For The
Financial Services Industry: The Elliptic Curve
Digital Signature Algorithm (ECDSA)", American
National Standards Institute, 1999.
 [X9.63] ANSI X9.63xxxx, "Public Key Cryptography For The
 Financial Services Industry: Key Agreement and Key
 Transport Using Elliptic Curve Cryptography", American
 National Standards Institute, 2000, Working draft.

[PKIALG] L. Bassham, R. Housley and W. Polk, "Algorithms and
Identifiers for the Internet X.509 Public Key
Infrastructure Certificate and CRL profile", PKIX
Working Group InternetDraft, November 2000.
[BON] D. Boneh, "The Security of Multicast MAC",
Presentation at Selected Areas of Cryptography 2000,
Center for Applied Cryptographic Research, University
 of Waterloo, 2000
+ of Waterloo, 2000. Paper version available from
+ http://crypto.stanford.edu/~dabo/papers/mmac.ps
[MUST] S. Bradner, "Key Words for Use in RFCs to Indicate
Requirement Levels", RFC 2119, March 1997.
[FIPS180] FIPS 1801, "Secure Hash Standard", National Institute
of Standards and Technology, April 17, 1995.
[FIPS1862] FIPS 1862, "Digital Signature Standard", National
Institute of Standards and Technology, 15 February
2000.
@@ 601,51 +593,56 @@
Profile", PKIX Working Group InternetDraft, January
2001.
[CMS] R. Housley, "Cryptographic Message Syntax", RFC 2630,
June 1999.
[IEEE1363] IEEE P1363, "Standard Specifications for Public Key
Cryptography", Institute of Electrical and Electronics
Engineers, 2000.
+ [K] B. Kaliski, "MQV Vulnerabilty", Posting to ANSI X9F1
+ and IEEE P1363 newsgroups, 1998.
+
[LMQSV] L. Law, A. Menezes, M. Qu, J. Solinas and S. Vanstone,
"An efficient protocol for authenticated key agreement",
Technical report CORR 9805, University of Waterloo,
1998.
[CMSKEA] J. Pawling, "CMS KEA and SKIPJACK Conventions", RFC
2876, July 2000.
[MSG] B. Ramsdell, "S/MIME Version 3 Message Specification",
RFC 2633, June 1999.
[CMSDH] E. Rescorla, "DiffieHellman Key Agreement Method",
RFC 2631, June 1999.
[SEC1] SECG, "Elliptic Curve Cryptography", Standards for
Efficient Cryptography Group, 2000.
[SEC2] SECG, "Recommended Elliptic Curve Domain Parameters",
Standards for Efficient Cryptography Group, 2000.
 [SEC3] SECG, "ECC in X.509", Standards for Efficient
 Cryptography Group, Working Draft, 2000.

Security Considerations
 This specification is based on [CMS], [X9.62] and [X9.63] and the
+ This specification is based on [CMS], [X9.62] and [SEC1] and the
appropriate security considerations of those documents apply.
In addition, implementors of AuthenticatedData should be aware of
the concerns expressed in [BON] when using AuthenticatedData to
 send messages to more than one recipient.
+ send messages to more than one recipient. Also, users of MQV
+ should be aware of the vulnerability in [K].
+
+ When 256, 384, and 512 bit hash functions succeed SHA1 in future
+ revisions of [FIPS], [FIPS1862], [X9.62] and [SEC1], then they
+ can similarly succeed SHA1 in a future revision of this document.
Intellectual Property Rights
The IETF has been notified of intellectual property rights claimed
in regard to the specification contained in this document. For
more information, consult the online list of claimed rights
(http://www.ietf.org/ipr.html).
The IETF takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to