NetworkWorkingGroupS.Blake-WilsonRequestforComments:3278D.BrownCategory:InformationalCerticomCorpP.LambertCosineCommunicationsApril2002NetworkWorkingGroupS.Blake-WilsonRequestforComments:3278D.BrownCategory:InformationalCerticomCorpP.LambertCosineCommunicationsApril2002UseofEllipticCurveCryptography(ECC)AlgorithmsinCryptographicMessageSyntax(CMS)
椭圆曲线密码(ECC)算法在加密消息语法(CMS)中的应用
StatusofthisMemo
本备忘录的状况
ThismemoprovidesinformationfortheInternetcommunity.ItdoesnotspecifyanInternetstandardofanykind.Distributionofthismemoisunlimited.
本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。
Abstract
摘要
ThisdocumentdescribeshowtouseEllipticCurveCryptography(ECC)public-keyalgorithmsintheCryptographicMessageSyntax(CMS).TheECCalgorithmssupportthecreationofdigitalsignaturesandtheexchangeofkeystoencryptorauthenticatecontent.ThedefinitionofthealgorithmprocessingisbasedontheANSIX9.62standard,developedbytheANSIX9F1workinggroup,theIEEE1363standard,andtheSEC1standard.
本文档介绍如何在加密消息语法(CMS)中使用椭圆曲线加密(ECC)公钥算法。ECC算法支持创建数字签名和交换密钥以加密或验证内容。算法处理的定义基于ANSIX9.62标准,该标准由ANSIX9F1工作组、IEEE1363标准和SEC1标准制定。
ThereadersattentioniscalledtotheIntellectualPropertyRightssectionattheendofthisdocument.
读者请注意本文件末尾的知识产权部分。
TableofContents
目录
1导言
TheCryptographicMessageSyntax(CMS)iscryptographicalgorithmindependent.ThisspecificationdefinesaprofilefortheuseofEllipticCurveCryptography(ECC)publickeyalgorithmsintheCMS.TheECCalgorithmsareincorporatedintothefollowingCMScontenttypes:
加密消息语法(CMS)与加密算法无关。本规范定义了在CMS中使用椭圆曲线加密(ECC)公钥算法的配置文件。ECC算法包含在以下CMS内容类型中:
-“SignedData”支持基于ECC的数字签名方法(ECDSA)对内容进行签名
-“EnvelopedData”支持基于ECC的公钥协议方法(ECDH和ECMQV),以生成成对密钥加密密钥,对用于内容加密的内容加密密钥进行加密
-“AuthenticatedData”支持基于ECC的公钥协议方法(ECMQV),以生成成对密钥加密密钥,对用于内容认证和完整性的MAC密钥进行加密
CertificationofECpublickeysisalsodescribedtoprovidepublic-keydistributioninsupportofthespecifiedtechniques.
还描述了EC公钥的认证,以提供公钥分发以支持指定的技术。
本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照BCP14、RFC2119[必须]中的说明进行解释。
2SignedDatausingECC
2使用ECC的已签名数据
ThissectiondescribeshowtouseECCalgorithmswiththeCMSSignedDataformattosigndata.
本节介绍如何使用CMSSignedData格式的ECC算法对数据进行签名。
ThissectiondescribeshowtousetheEllipticCurveDigitalSignatureAlgorithm(ECDSA)withSignedData.ECDSAisspecifiedin[X9.62].ThemethodistheellipticcurveanalogoftheDigitalSignatureAlgorithm(DSA)[FIPS186-2].
本节介绍如何对SignedData使用椭圆曲线数字签名算法(ECDSA)。[X9.62]中规定了ECDSA。该方法是数字签名算法(DSA)的椭圆曲线模拟[FIPS186-2]。
InanimplementationthatusesECDSAwithCMSSignedData,thefollowingtechniquesandformatsMUSTbeused.
在使用ECDSA和CMSSignedData的实现中,必须使用以下技术和格式。
WhenusingECDSAwithSignedData,thefieldsofSignerInfoareasin[CMS],butwiththefollowingrestrictions:
将ECDSA与SignedData一起使用时,SignerInfo的字段与[CMS]中的字段相同,但有以下限制:
digestAlgorithmMUSTcontainthealgorithmidentifiersha-1(seeSection8.1)whichidentifiestheSHA-1hashalgorithm.
digestAlgorithm必须包含识别sha-1哈希算法的算法标识符sha-1(见第8.1节)。
signatureAlgorithmcontainsthealgorithmidentifierecdsa-with-SHA1(seeSection8.1)whichidentifiestheECDSAsignaturealgorithm.
signatureAlgorithm包含识别ecdsa签名算法的算法标识符ecdsa-with-SHA1(参见第8.1节)。
signatureMUSTcontaintheDERencoding(asanoctetstring)ofavalueoftheASN.1typeECDSA-Sig-Value(seeSection8.2).
签名必须包含ASN.1类型ECDSASig值的DER编码(作为八位字节字符串)(参见第8.2节)。
WhenusingECDSA,theSignedDatacertificatesfieldMAYincludethecertificate(s)fortheECpublickey(s)usedinthegenerationoftheECDSAsignaturesinSignedData.ECCcertificatesarediscussedinSection6.
使用ECDSA时,SignedDatacertificates字段可能包括用于生成SignedData中ECDSA签名的EC公钥的证书。第6节讨论了ECC证书。
WhenusingECDSAwithSignedData,thesendingagentusesthemessagedigestcalculationprocessandsignaturegenerationprocessforSignedDatathatarespecifiedin[CMS].Tosigndata,thesendingagentusesthesignaturemethodspecifiedin[X9.62,Section5.3]withthefollowingexceptions:
将ECDSA与SignedData一起使用时,发送代理使用[CMS]中指定的消息摘要计算过程和SignedData的签名生成过程。为了对数据进行签名,发送代理使用[X9.62,第5.3节]中规定的签名方法,但以下情况除外:
-在[X9.62,第5.3.1节]中,整数“e”是通过使用[X9.62,第4.3.2节]中的数据转换方法将根据[CMS,第5.4节]生成的消息摘要转换为整数来确定的。
ThesendingagentencodestheresultingsignatureusingtheECDSA-Sig-Valuesyntax(seeSection8.2)andplacesitintheSignerInfosignaturefield.
发送代理使用ECDSASigValue语法(参见第8.2节)对生成的签名进行编码,并将其放置在SignerInfo签名字段中。
WhenusingECDSAwithSignedData,thereceivingagentusesthemessagedigestcalculationprocessandsignatureverificationprocessforSignedDatathatarespecifiedin[CMS].ToverifySignedData,thereceivingagentusesthesignatureverificationmethodspecifiedin[X9.62,Section5.4]withthefollowingexceptions:
将ECDSA与SignedData一起使用时,接收代理使用[CMS]中指定的SignedData的消息摘要计算过程和签名验证过程。为验证签名数据,接收代理使用[X9.62,第5.4节]中规定的签名验证方法,但以下情况除外:
-在[X9.62,第5.4.1节]中,整数“e”是通过使用[X9.62,第4.3.2节]中的数据转换方法将根据[CMS,第5.4节]生成的消息摘要转换为整数来确定的。
Inordertoverifythesignature,thereceivingagentretrievestheintegersrandsfromtheSignerInfosignaturefieldofthereceivedmessage.
为了验证签名,接收代理从接收到的消息的SignerInfo签名字段中检索整数r和s。
3EnvelopedDatausingECCAlgorithms
使用ECC算法的3信封数据
ThissectiondescribeshowtouseECCalgorithmswiththeCMSEnvelopedDataformat.
本节介绍如何将ECC算法与CMSEnvelopedData格式结合使用。
Thissectiondescribeshowtousetheephemeral-staticEllipticCurveDiffie-Hellman(ECDH)keyagreementalgorithmwithEnvelopedData.Ephemeral-staticECDHisspecifiedin[SEC1]and[IEEE1363].Ephemeral-staticECDHisthetheellipticcurveanalogoftheephemeral-staticDiffie-Hellmankeyagreementalgorithmspecifiedjointlyinthedocuments[CMS,Section12.3.1.1]and[CMS-DH].
本节描述了如何将临时静态椭圆曲线Diffie-Hellman(ECDH)密钥协商算法与EnvelopedData结合使用。[SEC1]和[IEEE1363]中规定了瞬时静态ECDH。临时静态ECDH是文件[CMS,第12.3.1.1节]和[CMS-DH]中联合规定的临时静态Diffie-Hellman密钥协商算法的椭圆曲线模拟。
InanimplementationthatusesECDHwithCMSEnvelopedDatawithkeyagreement,thefollowingtechniquesandformatsMUSTbeused.
在使用ECDH和CMSEnvelopedData以及密钥协议的实现中,必须使用以下技术和格式。
Whenusingephemeral-staticECDHwithEnvelopedData,thefieldsofKeyAgreeRecipientInfoareasin[CMS],butwiththefollowingrestrictions:
当对EnvelopedData使用临时静态ECDH时,KeyAgreeRecipientInfo字段与[CMS]中的字段相同,但有以下限制:
发起人必须是备选发起人。OriginateWorkey算法字段必须包含idecPublicKey对象标识符(见第8.1节),且参数为空。OriginateWorkey公钥字段必须包含ASN.1类型ECPoint值的DER编码(参见第8.2节),该值表示发送代理的临时EC公钥。
keyEncryptionAlgorithmMUSTcontainthedhSinglePass-stdDH-sha1kdf-schemeobjectidentifier(seeSection8.1)ifstandardECDHprimitiveisused,orthedhSinglePass-cofactorDH-sha1kdf-schemeobjectidentifier(seeSection8.1)ifthecofactorECDHprimitiveisused.TheparametersfieldcontainsKeyWrapAlgorithm.TheKeyWrapAlgorithmisthealgorithmidentifierthatindicatesthesymmetricencryptionalgorithmusedtoencryptthecontent-encryptionkey(CEK)withthekey-encryptionkey(KEK).
如果使用标准ECDH原语,则keyEncryptionAlgorithm必须包含dhSinglePass-stdDH-sha1kdf-scheme对象标识符(参见第8.1节);如果使用辅因子ECDH原语,则必须包含dhSinglePass-cofactorDH-sha1kdf-scheme对象标识符(参见第8.1节)。参数字段包含KeyWrapAlgorithm。KeyWrapAlgorithm是算法标识符,指示用于使用密钥加密密钥(KEK)加密内容加密密钥(CEK)的对称加密算法。
当使用带有EnvelopedData的临时静态ECDH时,发送代理首先获取收件人的EC公钥和域参数(例如,从收件人的证书)。然后,发送代理确定一个整数“keydatalen”,它是以位为单位的KeyWrapAlgorithm对称密钥大小,以及一个位字符串“SharedInfo”,它是ECCCMSSharedInfo的DER编码(见第8.2节)。然后,发送代理执行[SEC1,第6.1节]中规定的椭圆曲线Diffie-Hellman方案的密钥部署和密钥协商操作。因此,发送代理获得:
-anephemeralpublickey,whichisrepresentedasavalueofthetypeECPoint(seeSection8.2),encapsulatedinabitstringandplacedintheKeyAgreeRecipientInfooriginatorfield,and
-临时公钥,表示为ECPoint类型的值(参见第8.2节),封装在位字符串中,并放置在KeyAgreeRecipientInfo发起人字段中,以及
-一个共享秘密位字符串“K”,用作该接收者的成对密钥加密密钥,如[CMS]中所述。
当使用带有EnvelopedData的临时静态ECDH时,接收代理确定位字符串“SharedInfo”,这是ECCCMSSharedInfo的DER编码(参见第8.2节),以及KeyWrapAlgorithm的密钥大小(以位为单位)中的整数“keydatalen”。接收代理从位字符串KeyAgreeRecipientInfo发起者检索临时EC公钥,其值类型为ECPoint(见第8.2节),封装为位字符串。接收代理执行[SEC1,第6.1节]中规定的椭圆曲线Diffie-Hellman方案的密钥协商操作。结果,接收代理获得共享秘密比特串“K”,该比特串用作成对密钥加密密钥以打开CEK。
Thissectiondescribeshowtousethe1-PassellipticcurveMQV(ECMQV)keyagreementalgorithmwithEnvelopedData.ECMQVisspecifiedin[SEC1]and[IEEE1363].LiketheKEAalgorithm[CMS-KEA],1-PassECMQVusesthreekeypairs:anephemeralkeypair,astatickeypairofthesendingagent,andastatickeypairofthereceivingagent.Anadvantageofusing1-PassECMQVisthatitcanbeusedwithbothEnvelopedDataandAuthenticatedData.
本节介绍如何在EnvelopedData中使用单通椭圆曲线MQV(ECMQV)密钥协商算法。[SEC1]和[IEEE1363]中规定了ECMQV。与KEA算法[CMS-KEA]一样,1-PassECMQV使用三个密钥对:临时密钥对、发送代理的静态密钥对和接收代理的静态密钥对。使用1-PassECMQV的一个优点是,它可以与EnvelopedData和AuthenticatedData一起使用。
Inanimplementationthatuses1-PassECMQVwithCMSEnvelopedDatawithkeyagreement,thefollowingtechniquesandformatsMUSTbeused.
在使用具有密钥协议的CMSEnvelopedData的1-PassECMQV的实现中,必须使用以下技术和格式。
Whenusing1-PassECMQVwithEnvelopedData,thefieldsofKeyAgreeRecipientInfoare:
将1-PassECMQV与EnvelopedData一起使用时,KeyAgreeRecipientInfo的字段为:
发起者识别发送者的静态EC公钥。它应该是备选方案之一,issuerAndSerialNumber或subjectKeyIdentifier,并指向发送代理的证书之一。
ukmMUSTbepresent.TheukmfieldMUSTcontainanoctetstringwhichistheDERencodingofthetypeMQVuserKeyingMaterial(seeSection8.2).TheMQVuserKeyingMaterialephemeralPublicKey
ukm必须在场。ukm字段必须包含八位字节字符串,该字符串是MQVuserKeyingMaterial类型的DER编码(见第8.2节)。MQVuserKeyingMaterial临时发布
算法字段必须包含idecPublicKey对象标识符(见第8.1节)和空参数字段。MQVuserKeyingMaterialephemeralPublicKey字段必须包含代表发送代理的ephemeralEC公钥的ASN.1类型ECPoint的DER编码(请参见第8.2节)。MQVuserKeyingMaterialaddedukm字段(如果存在)应包含发送代理的附加用户密钥材料的八位字节字符串。
keyEncryptionAlgorithmMUSTbethemqvSinglePass-sha1kdf-schemealgorithmidentifier(seeSection8.1),withtheparametersfieldKeyWrapAlgorithm.TheKeyWrapAlgorithmindicatesthesymmetricencryptionalgorithmusedtoencrypttheCEKwiththeKEKgeneratedusingthe1-PassECMQValgorithm.
keyEncryptionAlgorithm必须是mqvSinglePass-sha1kdf-scheme算法标识符(参见第8.1节),参数字段为KeyWrapAlgorithm。KeyWrapAlgorithm表示对称加密算法,用于使用使用1-PassECMQV算法生成的KEK对CEK进行加密。
将1-PassECMQV与EnvelopedData一起使用时,发送代理首先获取收件人的EC公钥和域参数(例如,从收件人的证书),并检查域参数是否相同。然后,发送代理确定一个整数“keydatalen”,它是以位为单位的KeyWrapAlgorithm对称密钥大小,以及一个位字符串“SharedInfo”,它是ECCCMSSharedInfo的DER编码(见第8.2节)。然后,发送代理执行[SEC1,第6.2节]中指定的椭圆曲线MQV方案的密钥部署和密钥协商操作。结果,发送代理获得:
-anephemeralpublickey,whichisrepresentedasavalueoftypeECPoint(seeSection8.2),encapsulatedinabitstring,placedinanMQVuserKeyingMaterialephemeralPublicKeypublicKeyfield(seeSection8.2),and
-临时公钥,表示为ECPoint类型的值(参见第8.2节),封装在位字符串中,放置在MQVuserKeyingMaterial临时公钥字段中(参见第8.2节),以及
Theephemeralpublickeycanbere-usedwithanAuthenticatedDataforgreaterefficiency.
临时公钥可以与AuthenticatedData一起重新使用,以提高效率。
当将1-PassECMQV与EnvelopedData一起使用时,接收代理确定位字符串“SharedInfo”,这是ECCCMSSharedInfo的DER编码(参见第8.2节),并根据KeyWrapAlgorithm的密钥大小(以位为单位)确定整数“keydatalen”。然后,接收代理从第3.2.1节所述的发起人和ukm字段中检索发起人的静态和临时EC公钥,以及rid中标识的静态EC公钥
字段并检查域参数是否相同。然后,接收代理执行椭圆曲线MQV方案的密钥协商操作[SEC1,第6.2节]。结果,接收代理获得共享秘密比特串“K”,其用作成对密钥加密密钥以打开CEK。
4AuthenticatedDatausingECC
4使用ECC验证的数据
ThissectiondescribeshowtouseECCalgorithmswiththeCMSAuthenticatedDataformat.AuthenticatedDatalacksnon-repudiation,andsoinsomeinstancesispreferabletoSignedData.(Forexample,thesendingagentmightnotwantthemessagetobeauthenticatedwhenforwarded.)
本节介绍如何将ECC算法与CMSAuthenticatedData格式结合使用。AuthenticatedData缺乏不可否认性,因此在某些情况下比SignedData更可取。(例如,发送代理可能不希望在转发消息时对其进行身份验证。)
Thissectiondescribeshowtousethe1-PassellipticcurveMQV(ECMQV)keyagreementalgorithmwithAuthenticatedData.ECMQVisspecifiedin[SEC1].Anadvantageofusing1-PassECMQVisthatitcanbeusedwithbothEnvelopedDataandAuthenticatedData.
本节介绍如何对AuthenticatedData使用单通道椭圆曲线MQV(ECMQV)密钥协商算法。ECMQV在[SEC1]中指定。使用1-PassECMQV的一个优点是,它可以与EnvelopedData和AuthenticatedData一起使用。
TheAuthenticatedDataKeyAgreeRecipientInfofieldsareusedinthesamemannerasthefieldsforthecorrespondingEnvelopedDataKeyAgreeRecipientInfofieldsofSection3.2.1ofthisdocument.
AuthenticatedDataKeyAgreentRecipientInfo字段的使用方式与本文件第3.2.1节中相应EnvelopedDataKeyAgreentRecipientInfo字段的使用方式相同。
ThesendingagentusesthesameactionsasforEnvelopedDatawith1-PassECMQV,asspecifiedinSection3.2.2ofthisdocument.
如本文档第3.2.2节所述,发送代理使用与具有1-PassECMQV的EnvelopedData相同的操作。
Theephemeralpublickeycanbere-usedwithanEnvelopedDataforgreaterefficiency.
临时公钥可以与信封数据一起重新使用,以提高效率。
Note:iftherearemultiplerecipients,anattackispossiblewhereonerecipientmodifiesthecontentwithoutotherrecipientsnoticing[BON].AsendingagentwhoisconcernedwithsuchanattackSHOULDuseaseparateAuthenticatedDataforeachrecipient.
注意:如果有多个收件人,一个收件人修改内容而其他收件人没有注意到[BON]的情况下,可能会发生攻击。与此类攻击有关的发送代理应为每个收件人使用单独的AuthenticatedData。
ThereceivingagentusesthesameactionsasforEnvelopedDatawith1-PassECMQV,asspecifiedinSection3.2.3ofthisdocument.
按照本文件第3.2.3节的规定,接收代理使用与具有1-PassECMQV的EnvelopedData相同的操作。
Note:seeNoteinSection4.1.2.
注:见第4.1.2节中的注释。
5RecommendedAlgorithmsandEllipticCurves
5推荐算法和椭圆曲线
ImplementationsofthisspecificationMUSTimplementeitherSignedDatawithECDSAorEnvelopedDatawithephemeral-staticECDH.ImplementationsofthisspecificationSHOULDimplementbothSignedDatawithECDSAandEnvelopedDatawithephemeral-staticECDH.ImplementationsMAYimplementtheothertechniquesspecified,suchasAuthenticatedDataand1-PassECMQV.
本规范的实现必须使用ECDSA实现SignedData,或使用临时静态ECDH实现EnvelopedData。本规范的实现应使用ECDSA实现SignedData,使用临时静态ECDH实现EnvelopedData。实现可以实现指定的其他技术,例如AuthenticatedData和1-PassECMQV。
Furthermore,inordertoencourageinteroperability,implementationsSHOULDusetheellipticcurvedomainparametersspecifiedbyANSI[X9.62],NIST[FIPS-186-2]andSECG[SEC2].
此外,为了鼓励互操作性,实现应使用ANSI[X9.62]、NIST[FIPS-186-2]和SECG[SEC2]指定的椭圆曲线域参数。
6CertificatesusingECC
6使用ECC的证书
InternetX.509证书[PKI]可与本规范一起用于分发代理的公钥。[PKI-ALG]中规定了X.509证书中ECC算法和密钥的使用。
7SMIMECapabilitiesAttributeandECC
7SMIMECapabilities属性和ECC
AsendingagentMAYannouncetoreceivingagentsthatitsupportsoneormoreoftheECCalgorithmsinthisdocumentbyusingtheSMIMECapabilitiessignedattribute[MSG,Section2.5.2].
发送代理可以使用SMIMECapabilitiessigned属性[MSG,第2.5.2节]向接收代理宣布其支持本文档中的一个或多个ECC算法。
TheSMIMECapabilityvaluetoindicatesupportfortheECDSAsignaturealgorithmistheSEQUENCEwiththecapabilityIDfieldcontainingtheobjectidentifierecdsa-with-SHA1withNULLparameters.TheDERencodingis:
表示支持ECDSA签名算法的SMIMECapability值是capabilityID字段中包含对象标识符ECDSA-with-SHA1且参数为空的序列。DER编码是:
300b06072a8648ce3d04010500
TheSMIMECapabilitycapabilityIDobjectidentifiersforthesupportedkeyagreementalgorithmsinthisdocumentaredhSinglePass-stdDH-sha1kdf-scheme,dhSinglePass-cofactorDH-sha1kdf-scheme,andmqvSinglePass-sha1kdf-scheme.ForeachoftheseSMIMECapabilitySEQUENCEs,theparametersfieldispresentandindicatesthesupportedkey-encryptionalgorithmwiththeKeyWrapAlgorithmalgorithmidentifier.TheDERencodingsthatindicatecapabilityofthethreekeyagreementalgorithmswithCMSTriple-DESkeywrapare:
本文档中支持的密钥协商算法的SMIMECapabilityCapabilityID对象标识符为dhSinglePass-stdDH-sha1kdf-scheme、dhSinglePass-cofactorDH-sha1kdf-scheme和mqvSinglePass-sha1kdf-scheme。对于这些SMIMECapability序列中的每一个,参数字段都存在,并用KeyWrapAlgorithm算法标识符指示支持的密钥加密算法。表明三种密钥协商算法与CMS三重DES密钥包的能力的DER编码为:
301c06092b81051086483f0002300f060b2a864886f70d01091003060500
forephemeral-staticECDH,
对于短暂静态ECDH,
301c06092b81051086483f0003300f060b2a864886f70d01091003060500
forephemeral-staticECDHwithcofactormethod,and
对于带有辅助因子方法的短暂静态ECDH,以及
301c06092b81051086483f0010300f060b2a864886f70d01091003060500
forECMQV.
对于ECMQV。
8ASN.1Syntax
8ASN.1语法
TheASN.1syntaxusedinthisdocumentisgatheredinthissectionforreferencepurposes.
本节收集了本文档中使用的ASN.1语法,以供参考。
Thealgorithmidentifiersusedinthisdocumentaretakenfrom[X9.62],[SEC1]and[SEC2].
本文档中使用的算法标识符取自[X9.62]、[SEC1]和[SEC2]。
Thefollowingobjectidentifierindicatesthehashalgorithmusedinthisdocument:
以下对象标识符表示本文档中使用的哈希算法:
sha-1OBJECTIDENTIFIER::={iso(1)identified-organization(3)oiw(14)secsig(3)algorithm(2)26}sha-1OBJECTIDENTIFIER::={iso(1)identified-organization(3)oiw(14)secsig(3)algorithm(2)26}Thefollowingobjectidentifierisusedinthisdocumenttoindicateanellipticcurvepublickey:
本文档中使用以下对象标识符来表示椭圆曲线公钥:
id-ecPublicKeyOBJECTIDENTIFIER::={ansi-x9-62keyType(2)1}id-ecPublicKeyOBJECTIDENTIFIER::={ansi-x9-62keyType(2)1}where
哪里
ansi-x9-62OBJECTIDENTIFIER::={iso(1)member-body(2)us(840)10045}ansi-x9-62OBJECTIDENTIFIER::={iso(1)member-body(2)us(840)10045}Whentheobjectidentifierid-ecPublicKeyisusedherewithanalgorithmidentifier,theassociatedparameterscontainNULL.
当对象标识符idecPublicKey在这里与算法标识符一起使用时,关联的参数包含NULL。
Thefollowingobjectidentifierindicatesthedigitalsignaturealgorithmusedinthisdocument:
以下对象标识符表示本文档中使用的数字签名算法:
ecdsa-with-SHA1OBJECTIDENTIFIER::={ansi-x9-62signatures(4)1}ecdsa-with-SHA1OBJECTIDENTIFIER::={ansi-x9-62signatures(4)1}Whentheobjectidentifierecdsa-with-SHA1isusedwithinanalgorithmidentifier,theassociatedparametersfieldcontainsNULL.
当在算法标识符中使用对象标识符ecdsa-with-SHA1时,关联的参数字段包含NULL。
Thefollowingobjectidentifiersindicatethekeyagreementalgorithmsusedinthisdocument:
以下对象标识符表示本文档中使用的密钥协商算法:
dhSinglePass-stdDH-sha1kdf-schemeOBJECTIDENTIFIER::={x9-63-scheme2}dhSinglePass-stdDH-sha1kdf-schemeOBJECTIDENTIFIER::={x9-63-scheme2}dhSinglePass-cofactorDH-sha1kdf-schemeOBJECTIDENTIFIER::={x9-63-scheme3}dhSinglePass-cofactorDH-sha1kdf-schemeOBJECTIDENTIFIER::={x9-63-scheme3}mqvSinglePass-sha1kdf-schemeOBJECTIDENTIFIER::={x9-63-scheme16}mqvSinglePass-sha1kdf-schemeOBJECTIDENTIFIER::={x9-63-scheme16}where
x9-63-schemeOBJECTIDENTIFIER::={iso(1)identified-organization(3)tc68(133)country(16)x9(840)x9-63(63)schemes(0)}x9-63-schemeOBJECTIDENTIFIER::={iso(1)identified-organization(3)tc68(133)country(16)x9(840)x9-63(63)schemes(0)}Whentheobjectidentifiersareusedherewithinanalgorithmidentifier,theassociatedparametersfieldcontainstheCMSKeyWrapAlgorithmalgorithmidentifier.
当在算法标识符中使用对象标识符时,关联参数字段包含CMSKeyWrapAlgorithm算法标识符。
Thefollowingadditionalsyntaxisusedhere.
这里使用以下附加语法。
WhenusingECDSAwithSignedData,ECDSAsignaturesareencodedusingthetype:
将ECDSA与SignedData一起使用时,ECDSA签名使用以下类型进行编码:
ECDSA-Sig-Value::=SEQUENCE{rINTEGER,sINTEGER}ECDSA-Sig-Value::=SEQUENCE{rINTEGER,sINTEGER}ECDSA-Sig-Valueisspecifiedin[X9.62].WithinCMS,ECDSA-Sig-ValueisDER-encodedandplacedwithinasignaturefieldofSignedData.
[X9.62]中规定了ECDSASig值。在CMS中,ECDSASig值被DER编码并放置在SignedData的签名字段中。
WhenusingECDHandECMQVwithEnvelopedDataandAuthenticatedData,ephemeralandstaticpublickeysareencodedusingthetypeECPoint.
在将ECDH和ECMQV与EnvelopedData和AuthenticatedData一起使用时,使用ECPoint类型对临时公钥和静态公钥进行编码。
将ECMQV与EnvelopedData和AuthenticatedData一起使用时,发送代理的临时公钥和其他密钥资料将使用以下类型进行编码:
MQVuserKeyingMaterial::=SEQUENCE{ephemeralPublicKeyOriginatorPublicKey,addedukm[0]EXPLICITUserKeyingMaterialOPTIONAL}MQVuserKeyingMaterial::=SEQUENCE{ephemeralPublicKeyOriginatorPublicKey,addedukm[0]EXPLICITUserKeyingMaterialOPTIONAL}TheECPointsyntaxinusedtorepresenttheephemeralpublickeyandplacedintheephemeralPublicKeyfield.Theadditionaluserkeyingmaterialisplacedintheaddedukmfield.ThentheMQVuserKeyingMaterialvalueisDER-encodedandplacedwithinaukmfieldofEnvelopedDataorAuthenticatedData.
中的ECPoint语法用于表示临时公钥,并放置在临时公钥字段中。附加的用户关键点材质放置在addedukm字段中。然后对MQVuserKeyingMaterial值进行DER编码,并将其放置在EnvelopedData或AuthenticatedData的ukm字段中。
WhenusingECDHorECMQVwithEnvelopedDataorAuthenticatedData,thekey-encryptionkeysarederivedbyusingthetype:
将ECDH或ECMQV与EnvelopedData或AuthenticatedData一起使用时,密钥加密密钥通过以下类型派生:
ECC-CMS-SharedInfo::=SEQUENCE{keyInfoAlgorithmIdentifier,entityUInfo[0]EXPLICITOCTETSTRINGOPTIONAL,suppPubInfo[2]EXPLICITOCTETSTRING}ECC-CMS-SharedInfo::=SEQUENCE{keyInfoAlgorithmIdentifier,entityUInfo[0]EXPLICITOCTETSTRINGOPTIONAL,suppPubInfo[2]EXPLICITOCTETSTRING}ThefieldsofECC-CMS-SharedInfoareasfollows:
ECCCMSSharedInfo的字段如下:
keyInfocontainstheobjectidentifierofthekey-encryptionalgorithm(usedtowraptheCEK)andNULLparameters.
keyInfo包含密钥加密算法的对象标识符(用于包装CEK)和空参数。
entityUInfooptionallycontainsadditionalkeyingmaterialsuppliedbythesendingagent.WhenusedwithECDHandCMS,theentityUInfofieldcontainstheoctetstringukm.WhenusedwithECMQVandCMS,theentityUInfocontainstheoctetstringaddedukm(encodedinMQVuserKeyingMaterial).
entityUInfo可选地包含发送代理提供的其他键控材料。当与ECDH和CMS一起使用时,entityUInfo字段包含八位字节字符串ukm。当与ECMQV和CMS一起使用时,entityUInfo包含八位字节字符串addedukm(以MQVuserKeyingMaterial编码)。
suppPubInfocontainsthelengthofthegeneratedKEK,inbits,representedasa32bitnumber,asin[CMS-DH].(E.g.for3DESitwouldbe000000c0.)
suppPubInfo包含生成的KEK的长度,以位为单位,表示为32位数字,如[CMS-DH]中所示。(例如,对于3DES,它将是00c0。)
WithinCMS,ECC-CMS-SharedInfoisDER-encodedandusedasinputtothekeyderivationfunction,asspecifiedin[SEC1,Section3.6.1].NotethatECC-CMS-SharedInfodiffersfromtheOtherInfospecifiedin[CMS-DH].Here,acountervalueisnotincludedinthekeyInfofieldbecausethekeyderivationfunctionspecifiedin[SEC1,Section3.6.1]ensuresthatsufficientkeyingdataisprovided.
在CMS中,ECCCMSSharedInfo按照[SEC1,第3.6.1节]的规定进行顺序编码并用作密钥派生函数的输入。请注意,ECCCMSSharedInfo与[CMS-DH]中指定的其他信息不同。此处,由于[SEC1,第3.6.1节]中规定的密钥派生函数确保提供足够的密钥数据,因此keyInfo字段中不包括计数器值。
9Summary
9摘要
ThisdocumentspecifieshowtouseECCalgorithmswiththeS/MIMECMS.UseofECCalgorithmwithinCMScanresultinreducedprocessingrequirementsforS/MIMEagents,andreducedbandwidthforCMSmessages.
本文档指定了如何在S/MIMECMS中使用ECC算法。在CMS中使用ECC算法可以降低S/MIME代理的处理要求,并降低CMS消息的带宽。
References
工具书类
[X9.62]ANSIX9.62-1998,“金融服务业的公钥加密:椭圆曲线数字签名算法(ECDSA)”,美国国家标准协会,1999年。
[PKI-ALG]Bassham,L.,HousleyR.和W.Polk,“互联网X.509公钥基础设施证书和CRL配置文件的算法和标识符”,RFC3279,2002年4月。
[必须]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP14,RFC21192997年3月。
[FIPS-180]FIPS180-1,“安全哈希标准”,国家标准与技术研究所,1995年4月17日。
[FIPS-186-2]FIPS186-2,“数字签名标准”,国家标准与技术研究所,2000年2月15日。
[PKI]Housley,R.,Polk,W.,Ford,W.和D.Solo,“互联网X.509公钥基础设施证书和证书撤销列表(CRL)简介”,RFC32802002年4月。
[CMS]Housley,R.,“加密消息语法”,RFC2630,1999年6月。
[IEEE1363]IEEEP1363,“公开密钥加密的标准规范”,电气和电子工程师协会,2000年。
[K]B.Kaliski,“MQV漏洞”,发布到ANSIX9F1和IEEEP1363新闻组,1998年。
[LMQSv]L.Law,A.Menezes,M.Qu,J.Solinas和S.Vanstone,“一个有效的认证密钥协议协议”,技术报告CORR98-05,滑铁卢大学,1998。
[CMS-KEA]Pawling,J.,“CMS-KEA和SKIPJACK公约”,RFC28762000年7月。
[MSG]Ramsdell,B.,“S/MIME版本3消息规范”,RFC2633,1999年6月。
[CMS-DH]Rescorla,E.“Diffie-Hellman密钥协商方法”,RFC26311999年6月。
[SEC1]SECG,“椭圆曲线密码术”,高效密码组标准,2000年。可从www.secg.org/collateral/sec1.pdf获取。
[SEC2]SECG,“建议的椭圆曲线域参数”,高效密码组标准,2000年。可从www.secg.org/collateral/sec2.pdf获取。
SecurityConsiderations
安全考虑
Thisspecificationisbasedon[CMS],[X9.62]and[SEC1]andtheappropriatesecurityconsiderationsofthosedocumentsapply.
本规范以[CMS]、[X9.62]和[SEC1]为基础,适用这些文件的适当安全注意事项。
Inaddition,implementorsofAuthenticatedDatashouldbeawareoftheconcernsexpressedin[BON]whenusingAuthenticatedDatatosendmessagestomorethanonerecipient.Also,usersofMQVshouldbeawareofthevulnerabilityin[K].
此外,当使用AuthenticatedData向多个收件人发送消息时,AuthenticatedData的实现者应该知道[BON]中表达的问题。此外,MQV的用户应该知道[K]中的漏洞。
When256,384,and512bithashfunctionssucceedSHA-1infuturerevisionsof[FIPS],[FIPS-186-2],[X9.62]and[SEC1],thentheycansimilarlysucceedSHA-1inafuturerevisionofthisdocument.
当256、384和512位哈希函数在[FIPS]、[FIPS-186-2]、[X9.62]和[SEC1]的未来版本中继承SHA-1时,它们也可以在本文档的未来版本中继承SHA-1。
IntellectualPropertyRights
知识产权
obtainagenerallicenseorpermissionfortheuseofsuchproprietaryrightsbyimplementorsorusersofthisspecificationcanbeobtainedfromtheIETFSecretariat.
可从IETF秘书处获得本规范实施者或用户使用此类专有权利的一般许可或许可。
Acknowledgments
致谢
ThemethodsdescribedinthisdocumentarebasedonworkdonebytheANSIX9F1workinggroup.TheauthorswishtoextendtheirthankstoANSIX9F1fortheirassistance.TheauthorsalsowishtothankPeterdeRooijforhispatientassistance.ThetechnicalcommentsofFrancoisRousseauwerevaluablecontributions.
作者地址
SimonBlake-WilsonCerticomCorp5520ExplorerDrive#400Mississauga,ONL4W5L1
SimonBlakeWilsonCerticomCorp5520ExplorerDrive#400Missisauga,位于L4W5L1
EMail:sblakewi@certicom.comEMail:sblakewi@certicom.comDanielR.L.BrownpCerticomCorp5520ExplorerDrive#400Mississauga,ONL4W5L1
DanielR.L.BrownpCerticom公司位于密西西比索加400号探索者大道5520号,L4W5L1
EMail:dbrown@certicom.comEMail:dbrown@certicom.comPaulLambert
保罗·兰伯特
Thisdocumentandtranslationsofitmaybecopiedandfurnishedtoothers,andderivativeworksthatcommentonorotherwiseexplainitorassistinitsimplementationmaybeprepared,copied,publishedanddistributed,inwholeorinpart,withoutrestrictionofanykind,providedthattheabovecopyrightnoticeandthisparagraphareincludedonallsuchcopiesandderivativeworks.However,thisdocumentitselfmaynotbemodifiedinanyway,suchasbyremovingthecopyrightnoticeorreferencestotheInternetSocietyorotherInternetorganizations,exceptasneededforthepurposeofdevelopingInternetstandardsinwhichcasetheproceduresforcopyrightsdefinedintheInternetStandardsprocessmustbefollowed,orasrequiredtotranslateitintolanguagesotherthanEnglish.
ThelimitedpermissionsgrantedaboveareperpetualandwillnotberevokedbytheInternetSocietyoritssuccessorsorassigns.
上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。
本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。
Acknowledgement
确认
FundingfortheRFCEditorfunctioniscurrentlyprovidedbytheInternetSociety.