X.509证书请求消息格式( 六 )
SHA1(DER-encoded-subjectNameKecDER-encoded-issuerName),这里‘’的意
思是级连 。假如在CA证书中subjectName为空,则替代使用
DER-encoded-subjectAltName 。假如CA证书中issuerName为空,则替代使用
DER-encoded-issuerAltName 。
d) 按照RFC2104来用数据"text"计算HMAC-SHA1,SHA1(KXORopad,SHA1(K
ORipad,text)),此处opad=0x36重复64次,ipad=0x5C重复64次 。也就是
说,
(1) 在K的末端填充0,来生成一个64字节的串(例如,若K为16字节长,
就要填充48个0字节) 。
(2) XOR(异或)第1步生成的64字节K和ipad 。
(3) 把‘text’加到第2步生成的64字节串上 。
(4) 对第3步生成的字节串应用SHA1算法 。
(5) XOR第1步生成的64字节K和opad 。
(6) 把第4步中SHA1生成的结果加到第5步生成的64字节串上 。
(7) 使用SHA1算法计算第6步中的产生值,最后输出结果 。
例子代码在RFC2104,RFC2202中有 。
e)d)的输出被编码为位串("dhMAC") 。
3验证拥有私钥(proof-of-possession)的进程需要CA执行
执行从a)到d),然后比较d)步的结果和CA收到的"dhMAC"值 。假如它们匹配,则
有如下结论:
1) 终端拥有与证书请求中的公钥对应的私钥(因为终端需要私钥来计算sharedsecret) 。
2) 只有CA能验证请求(CA需要自己的私钥来计算同样的sharedsecret) 。这有助于防止
CA受骗 。
参考文献
[RFC2104]Krawczyk,H.,Bellare,M.andR.Canetti,"HMAC:Keyed
HashingforMessageAuthentication",RFC2104,February
1997.
[RFC2202]Cheng,P.andR.Glenn,"TestCasesforHMAC-MD5andHMAC-
SHA-1",RFC2202,September1997.
谢词
此附录的细节由HemmaPrafullchandra所提供
AppendixB.UseofRegInfoforName-ValuePairs
The"value"fieldoftheid-regInfo-utf8PairsOCTETSTRING(with
"tag"fieldequalto12andappropriate"length"field)willcontain
aseriesofUTF8name/valuepairs.
ThisAppendixlistssomecommonexamplesofsuchpairsforthe
purposeofpromotinginteroperabilityamongindependent
implementationsofthisspecification.Itisrecognizedthatthis
listisnotexhaustiveandwillgrowwithtimeandimplementation
experience.
B.1.ExampleName/ValuePairs
WhenregInfoisusedtoconveyoneormorename-valuepairs(viaid-
regInfo-utf8Pairs),thefirstandsubsequentpairsSHALLbe
structuredasfollows:
[name?value][%name?value]*%
ThisstringisthenencodedintoanOCTETSTRINGandplacedintothe
regInfoSEQUENCE.
Reservedcharactersareencodedusingthe%xxmechanismof[RFC1738],
unlesstheyareusedfortheirreservedpurposes.
Thefollowingtabledefinesarecommendedsetofnamedelements.
Thevalueinthecolumn"NameValue"istheexacttextstringthat
willappearintheregInfo.
NameValue
----------
version--versionofthisvariationofregInfouse
corp_company--companyaffiliationofsubscriber
org_unit--organizationalunit
mail_firstName--personalnamecomponent
mail_middleName--personalnamecomponent
mail_lastName--personalnamecomponent
mail_email--subscriber"semailaddress
joBTitle--jobtitleofsubscriber
employeeID--employeeidentificationnumberorstring
mailStop--mailstop
issuerName--nameofCA
subjectName--nameofSubject
validity--validityinterval
Forexample:
version?1%corp_company?Acme,Inc.%org_unit?Engineering%
mail_firstName?John%mail_lastName?Smith%jobTitle?TeamLeader%
mail_email?john@acme.com%
B.1.1.IssuerName,SubjectNameandValidityValueEncoding
Whentheyappearinid-regInfo-utf8Pairssyntaxasnamedelements,
theencodingofvaluesforissuerName,subjectNameandvaliditySHALL
usethefollowingsyntax.Thecharacters[]indicateanoptional
field,::=andhavetheirusualBNFmeanings,andallothersymbols
(exceptspaceswhichareinsignificant)outsidenon-terminalnames
推荐阅读
- win7系统中提示未授予用户在此计算机上的请求登录类型的具体处理方法
- 升级iOS8一直显示已请求更新解决方法
- 学历证书是毕业证吗 学历证书是不是毕业证
- 消防员需要考应急救援员证书吗
- 一建报考条件有哪些
- 中级职业资格证书有什么用
- 辅修专业证书有用吗
- 作品登记证书是版权吗
- 请求注解 RFC介绍
- 如何考取cpr证书