在使用ASN.1和解码PKCS #15令牌时,我发现我不理解为什么PKCS15Object的标记[0]和[1]是显式的而不是隐式的,因为它声明了with DEFINITIONS IMPLICIT TAGS子句。
PKCS-15 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
pkcs-15(15) modules(1) pkcs-15(1)}
-- $Revision: 1.7 $ --
DEFINITIONS IMPLICIT TAGS ::=
...
PKCS15Object {ClassAttributes, SubClassAttributes, TypeAttributes}
::= SEQUENCE {
commonObjectAttributes CommonObjectAttributes,
classAttributes ClassAttributes,
subClassAttributes [0] SubClassAttributes OPTIONAL <<--- explicit?,
typeAttributes [1] TypeAttributes <<--- explicit?
}
PrivateKeyObject {KeyAttributes} ::= PKCS15Object {
CommonKeyAttributes, CommonPrivateKeyAttributes, KeyAttributes}
PrivateKeys ::= PathOrObjects {PrivateKeyType}
PrivateKeyType ::= CHOICE {
privateRSAKey PrivateKeyObject {PrivateRSAKeyAttributes},
privateECKey [0] PrivateKeyObject {PrivateECKeyAttributes},
... -- For future extensions
}
PrivateRSAKeyAttributes ::= SEQUENCE {
value ObjectValue {RSAPrivateKeyObject},
modulusLength INTEGER, -- modulus length in bits, e.g. 1024
keyInfo KeyInfo {NULL, PublicKeyOperations} OPTIONAL,
... -- For future extensions
} 拜托,谁给我解释一下。
发布于 2014-12-04 21:36:01
其原因是X.680的细则31.2.7 (c)。您有一个正在标记的无标记DummyReference,因此您的标记是显式的。
https://stackoverflow.com/questions/27282247
复制相似问题