home *** CD-ROM | disk | FTP | other *** search
/ ftp.rsa.com / 2014.05.ftp.rsa.com.tar / ftp.rsa.com / pub / pkcs / pkcs-15 / pkcs-15v1_1.asn < prev    next >
Text File  |  2014-05-02  |  28KB  |  870 lines

  1. PKCS-15 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
  2.          pkcs-15(15) modules(1) pkcs-15(1)} 
  3.  
  4. -- $Revision: 1.7 $ --
  5.  
  6. DEFINITIONS IMPLICIT TAGS ::=
  7.  
  8. BEGIN
  9.  
  10. IMPORTS
  11.  
  12. informationFramework, authenticationFramework, certificateExtensions
  13.         FROM UsefulDefinitions {joint-iso-itu-t(2) ds(5) module(1)
  14.                                 usefulDefinitions(0) 3} 
  15.  
  16. Name, Attribute
  17.         FROM InformationFramework informationFramework
  18.  
  19. Certificate, AttributeCertificate, CertificateSerialNumber,
  20.         SubjectPublicKeyInfo
  21.         FROM AuthenticationFramework authenticationFramework
  22.  
  23. GeneralNames, KeyUsage
  24.         FROM CertificateExtensions certificateExtensions
  25.  
  26. RecipientInfos, RecipientInfo, OriginatorInfo, sha-1,
  27.     id-alg-CMS3DESwrap, id-alg-CMSRC2wrap, hMAC-SHA1, des-ede3-cbc
  28.     FROM CryptographicMessageSyntax {iso(1) member-body(2)
  29.     us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) modules(0)
  30.     cms(1)}
  31.  
  32. RSAPublicKey
  33.     FROM PKCS-1 {iso(1) member-body(2) us(840) rsadsi(113549)
  34.     pkcs(1) pkcs-1(1) modules(0) pkcs-1(1)} 
  35.  
  36. AlgorithmIdentifier, SupportingAlgorithms, PBKDF2Algorithms,
  37.     ALGORITHM-IDENTIFIER, id-hmacWithSHA1
  38.     FROM PKCS-5 {iso(1) member-body(2) us(840) rsadsi(113549)
  39.     pkcs(1) pkcs-5(5) modules(16) pkcs-5(1)} 
  40.  
  41. ECPoint, Parameters
  42.         FROM ANSI-X9-62 {iso(1) member-body(2) us(840)
  43.         ansi-x962(10045) module(4) 1} 
  44.  
  45. DiffieHellmanPublicNumber, DomainParameters
  46.         FROM ANSI-X9-42 {iso(1) member-body(2) us(840)
  47.         ansi-x942(10046) module(5) 1}
  48.  
  49. OOBCertHash
  50.         FROM PKIXCMP {iso(1) identified-organization(3) dod(6)
  51.         internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
  52.         id-mod-cmp(9)};
  53.  
  54. -- Constants
  55.  
  56. pkcs15-ub-identifier          INTEGER ::= 255
  57. pkcs15-ub-reference           INTEGER ::= 255
  58. pkcs15-ub-index               INTEGER ::= 65535
  59. pkcs15-ub-label               INTEGER ::= pkcs15-ub-identifier
  60. pkcs15-lb-minPinLength        INTEGER ::= 4
  61. pkcs15-ub-minPinLength        INTEGER ::= 8
  62. pkcs15-ub-storedPinLength     INTEGER ::= 64
  63. pkcs15-ub-recordLength        INTEGER ::= 16383
  64. pkcs15-ub-userConsent         INTEGER ::= 15
  65. pkcs15-ub-securityConditions  INTEGER ::= 255
  66. pkcs15-ub-seInfo              INTEGER ::= 255
  67.  
  68. -- Object Identifiers
  69.  
  70. pkcs15 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
  71.                                rsadsi(113549) pkcs(1) pkcs-15(15)}
  72. pkcs15-mo OBJECT IDENTIFIER ::= {pkcs15 1} -- Modules branch
  73. pkcs15-at OBJECT IDENTIFIER ::= {pkcs15 2} -- Attribute branch
  74. pkcs15-ct OBJECT IDENTIFIER ::= {pkcs15 3} -- Content type branch
  75.  
  76. -- Content Types
  77.  
  78. pkcs15-ct-PKCS15Token OBJECT IDENTIFIER ::= {pkcs15-ct 1}
  79.  
  80. -- Basic types
  81.  
  82. Identifier ::= OCTET STRING (SIZE (0..pkcs15-ub-identifier))
  83.  
  84. Reference ::= INTEGER (0..pkcs15-ub-reference)
  85.  
  86. Label ::= UTF8String (SIZE(0..pkcs15-ub-label))
  87.  
  88. KEY-IDENTIFIER ::= CLASS {
  89.     &id  INTEGER UNIQUE,
  90.     &Value
  91. } WITH SYNTAX {
  92.     SYNTAX &Value IDENTIFIED BY &id
  93. }
  94.  
  95. CredentialIdentifier {KEY-IDENTIFIER : IdentifierSet} ::= SEQUENCE {
  96.     idType  KEY-IDENTIFIER.&id ({IdentifierSet}),
  97.     idValue KEY-IDENTIFIER.&Value ({IdentifierSet}{@idType})
  98. }
  99.  
  100. KeyIdentifiers KEY-IDENTIFIER ::= {
  101.     issuerAndSerialNumber|
  102.     issuerAndSerialNumberHash|
  103.     subjectKeyId|
  104.     subjectKeyHash |
  105.     issuerKeyHash |
  106.     issuerNameHash |
  107.     subjectNameHash,
  108.     ...
  109. }
  110.  
  111. issuerAndSerialNumber KEY-IDENTIFIER::= 
  112.         {SYNTAX PKCS15-OPAQUE.&Type IDENTIFIED BY 1}
  113.         -- As defined in RFC 2630
  114. subjectKeyId KEY-IDENTIFIER ::= 
  115.         {SYNTAX OCTET STRING IDENTIFIED BY 2}
  116.         -- From x509v3 certificate extension
  117. issuerAndSerialNumberHash KEY-IDENTIFIER ::= 
  118.         {SYNTAX OCTET STRING IDENTIFIED BY 3}
  119.         -- Assumes SHA-1 hash of DER encoding of IssuerAndSerialNumber
  120. subjectKeyHash KEY-IDENTIFIER ::= 
  121.         {SYNTAX OCTET STRING IDENTIFIED BY 4}
  122. issuerKeyHash KEY-IDENTIFIER ::= 
  123.         {SYNTAX OCTET STRING IDENTIFIED BY 5}
  124. issuerNameHash KEY-IDENTIFIER ::=
  125.     {SYNTAX OCTET STRING IDENTIFIED BY 6}
  126.     -- SHA-1 hash of DER-encoded issuer name
  127. subjectNameHash KEY-IDENTIFIER ::=
  128.         {SYNTAX OCTET STRING IDENTIFIED BY 7}
  129.     -- SHA-1 hash of DER-encoded subject name
  130.  
  131. ReferencedValue {Type} ::= CHOICE {
  132.     path    Path,
  133.     url        URL
  134. } (CONSTRAINED BY {-- 'path' or 'url' shall point to an object of
  135.    -- type -- Type}) 
  136.  
  137. URL ::= CHOICE {
  138.     url        PrintableString,
  139.     urlWithDigest [3] SEQUENCE {
  140.         url    IA5String,
  141.         digest    DigestInfoWithDefault
  142.         }
  143. }
  144.  
  145. alg-id-sha1 AlgorithmIdentifier {{DigestAlgorithms}} ::= {
  146.     algorithm  sha-1, 
  147.     parameters SHA1Parameters : NULL} 
  148.  
  149. SHA1Parameters ::= NULL
  150.  
  151. DigestInfoWithDefault ::= SEQUENCE {
  152.     digestAlg    AlgorithmIdentifier {{DigestAlgorithms}} DEFAULT alg-id-sha1,
  153.     digest    OCTET STRING (SIZE(8..128))
  154. }
  155.  
  156. Path ::= SEQUENCE {
  157.     path     OCTET STRING,
  158.     index      INTEGER (0..pkcs15-ub-index) OPTIONAL,
  159.     length     [0] INTEGER (0..pkcs15-ub-index) OPTIONAL
  160.     }( WITH COMPONENTS {..., index PRESENT, length PRESENT}| 
  161.        WITH COMPONENTS {..., index ABSENT, length ABSENT})
  162.  
  163. ObjectValue { Type } ::= CHOICE {
  164.     indirect             ReferencedValue {Type},
  165.     direct             [0] Type,
  166.     indirect-protected    [1] ReferencedValue {EnvelopedData {Type}},
  167.     direct-protected    [2] EnvelopedData {Type}
  168.     }(CONSTRAINED BY {-- if indirection is being used, then it is
  169.     -- expected that the reference points either to a (possibly
  170.     -- enveloped) object of type -- Type -- or (key case) to a card- 
  171.     -- specific key file --})
  172.  
  173. PathOrObjects {ObjectType} ::= CHOICE {
  174.     path      Path,
  175.     objects      [0] SEQUENCE OF ObjectType,
  176.     ...,
  177.     indirect-protected [1] ReferencedValue {EnvelopedData {SEQUENCE OF ObjectType}},
  178.     direct-protected [2] EnvelopedData {SEQUENCE OF ObjectType}
  179.     }
  180.  
  181. CommonObjectAttributes ::= SEQUENCE {
  182.     label        Label OPTIONAL,
  183.     flags          CommonObjectFlags OPTIONAL,
  184.     authId         Identifier OPTIONAL,
  185.     ...,
  186.     userConsent     INTEGER (1..pkcs15-ub-userConsent) OPTIONAL,
  187.     accessControlRules    SEQUENCE SIZE (1..MAX) OF AccessControlRule OPTIONAL
  188. } (CONSTRAINED BY {-- authId should be present in the IC card case if
  189.     -- flags.private is set. It must equal an authID in one AuthRecord
  190.     -- in the AODF -- }) 
  191.  
  192. CommonObjectFlags ::= BIT STRING {
  193.     private    (0),
  194.     modifiable     (1)
  195. }
  196.  
  197. AccessControlRule ::= SEQUENCE {
  198.     accessMode        AccessMode,
  199.     securityCondition     SecurityCondition,
  200.     ... -- For future extensions
  201. }
  202.  
  203. AccessMode ::= BIT STRING {
  204.     read    (0),
  205.     update    (1),
  206.     execute    (2)
  207. }
  208.  
  209. SecurityCondition ::= CHOICE {
  210.     authId    Identifier,
  211.     not        [0] SecurityCondition,
  212.     and        [1] SEQUENCE SIZE (2..pkcs15-ub-securityConditions)
  213.                 OF SecurityCondition, 
  214.     or         [2] SEQUENCE SIZE (2..pkcs15-ub-securityConditions)
  215.                 OF SecurityCondition, 
  216.     ... -- For future extensions
  217. }
  218.  
  219. CommonKeyAttributes ::= SEQUENCE {
  220.     iD          Identifier,
  221.     usage      KeyUsageFlags,
  222.     native     BOOLEAN DEFAULT TRUE,
  223.     accessFlags     KeyAccessFlags OPTIONAL,
  224.     keyReference Reference OPTIONAL,
  225.     startDate      GeneralizedTime OPTIONAL,
  226.     endDate       [0] GeneralizedTime OPTIONAL,
  227.     ... -- For future extensions
  228. }
  229.  
  230. KeyUsageFlags ::= BIT STRING {
  231.     encrypt             (0),
  232.     decrypt             (1),
  233.     sign             (2),
  234.     signRecover         (3),
  235.     wrap             (4),
  236.     unwrap             (5),
  237.     verify             (6),
  238.     verifyRecover          (7),
  239.     derive             (8),
  240.     nonRepudiation        (9)
  241. }
  242.  
  243. KeyAccessFlags ::= BIT STRING {
  244.     sensitive          (0),
  245.     extractable     (1),
  246.     alwaysSensitive     (2),
  247.     neverExtractable    (3),
  248.     local        (4)
  249. }
  250.  
  251. CommonPrivateKeyAttributes ::= SEQUENCE {
  252.     subjectName    Name OPTIONAL,
  253.     keyIdentifiers     [0] SEQUENCE OF CredentialIdentifier
  254.                         {{KeyIdentifiers}} OPTIONAL, 
  255.     ... -- For future extensions
  256. }
  257.  
  258. CommonPublicKeyAttributes ::= SEQUENCE {
  259.     subjectName     Name OPTIONAL,
  260.     ...,
  261.     trustedUsage [0] Usage OPTIONAL
  262. }
  263.  
  264. CommonSecretKeyAttributes ::= SEQUENCE {
  265.     keyLen    INTEGER OPTIONAL, -- keylength (in bits)
  266.     ... -- For future extensions
  267. }
  268.  
  269. KeyInfo {ParameterType, OperationsType} ::= CHOICE {
  270.     reference        Reference,
  271.     paramsAndOps     SEQUENCE {
  272.         parameters         ParameterType,
  273.         supportedOperations     OperationsType OPTIONAL
  274.     }
  275. }
  276.  
  277. CommonCertificateAttributes ::= SEQUENCE {
  278.     iD         Identifier, 
  279.     authority    BOOLEAN DEFAULT FALSE,
  280.     identifier     CredentialIdentifier {{KeyIdentifiers}} OPTIONAL,
  281.     certHash    [0] OOBCertHash OPTIONAL,
  282.     ...,
  283.     trustedUsage [1] Usage OPTIONAL,
  284.     identifiers    [2] SEQUENCE OF CredentialIdentifier{{KeyIdentifiers}} OPTIONAL, 
  285.     implicitTrust [3] BOOLEAN DEFAULT FALSE
  286. }
  287.  
  288. Usage ::= SEQUENCE {
  289.     keyUsage    KeyUsage OPTIONAL,
  290.     extKeyUsage    SEQUENCE SIZE (1..MAX) OF OBJECT IDENTIFIER OPTIONAL
  291.     }(WITH COMPONENTS {..., keyUsage PRESENT} |
  292.       WITH COMPONENTS {..., extKeyUsage PRESENT})
  293.  
  294. CommonDataObjectAttributes ::= SEQUENCE {
  295.     applicationName    Label OPTIONAL,
  296.     applicationOID     OBJECT IDENTIFIER OPTIONAL,
  297.     ... -- For future extensions
  298.     } (WITH COMPONENTS {..., applicationName PRESENT}| 
  299.        WITH COMPONENTS {..., applicationOID PRESENT})
  300.  
  301. CommonAuthenticationObjectAttributes ::= SEQUENCE {
  302.     authId Identifier,
  303.     ... -- For future extensions
  304. }
  305.  
  306. PKCS15Object {ClassAttributes, SubClassAttributes, TypeAttributes}
  307.     ::= SEQUENCE {
  308.     commonObjectAttributes    CommonObjectAttributes,
  309.     classAttributes        ClassAttributes,
  310.     subClassAttributes         [0] SubClassAttributes OPTIONAL,
  311.     typeAttributes        [1] TypeAttributes
  312. }
  313.  
  314. PKCS15Objects ::= CHOICE {
  315.     privateKeys     [0] PrivateKeys,
  316.     publicKeys         [1] PublicKeys,
  317.     trustedPublicKeys      [2] PublicKeys,
  318.     secretKeys         [3] SecretKeys,
  319.     certificates    [4] Certificates,
  320.     trustedCertificates [5] Certificates,
  321.     usefulCertificates     [6] Certificates,
  322.     dataObjects     [7] DataObjects,
  323.     authObjects     [8] AuthObjects,
  324.     ... -- For future extensions
  325. }
  326.  
  327. PrivateKeys  ::= PathOrObjects {PrivateKeyType}
  328.  
  329. SecretKeys   ::= PathOrObjects {SecretKeyType}
  330.  
  331. PublicKeys   ::= PathOrObjects {PublicKeyType}
  332.  
  333. Certificates ::= PathOrObjects {CertificateType}
  334.  
  335. DataObjects  ::= PathOrObjects {DataType}
  336.  
  337. AuthObjects  ::= PathOrObjects {AuthenticationType}
  338.  
  339. PrivateKeyType ::= CHOICE {
  340.     privateRSAKey    PrivateKeyObject {PrivateRSAKeyAttributes},
  341.     privateECKey     [0] PrivateKeyObject {PrivateECKeyAttributes},
  342.     privateDHKey     [1] PrivateKeyObject {PrivateDHKeyAttributes},
  343.     privateDSAKey    [2] PrivateKeyObject {PrivateDSAKeyAttributes},
  344.     privateKEAKey    [3] PrivateKeyObject {PrivateKEAKeyAttributes},
  345.     ... -- For future extensions
  346. }
  347.  
  348. PrivateKeyObject {KeyAttributes} ::= PKCS15Object { 
  349.     CommonKeyAttributes, CommonPrivateKeyAttributes, KeyAttributes}
  350.  
  351. PrivateRSAKeyAttributes ::= SEQUENCE {
  352.     value         ObjectValue {RSAPrivateKeyObject},
  353.     modulusLength     INTEGER, -- modulus length in bits, e.g. 1024
  354.     keyInfo          KeyInfo {NULL, PublicKeyOperations} OPTIONAL,
  355.     ... -- For future extensions
  356.  
  357. RSAPrivateKeyObject ::= SEQUENCE {
  358.     modulus         [0] INTEGER OPTIONAL, -- n
  359.     publicExponent     [1] INTEGER OPTIONAL, -- e
  360.     privateExponent     [2] INTEGER OPTIONAL, -- d
  361.     prime1         [3] INTEGER OPTIONAL, -- p
  362.     prime2         [4] INTEGER OPTIONAL, -- q
  363.     exponent1          [5] INTEGER OPTIONAL, -- d mod (p-1)
  364.     exponent2          [6] INTEGER OPTIONAL, -- d mod (q-1)
  365.     coefficient     [7] INTEGER OPTIONAL -- inv(q) mod p
  366. } (CONSTRAINED BY {-- must be possible to reconstruct modulus and
  367.    -- privateExponent from selected fields --}) 
  368.  
  369. PrivateECKeyAttributes ::= SEQUENCE {
  370.     value      ObjectValue {ECPrivateKey},
  371.     keyInfo     KeyInfo {Parameters, PublicKeyOperations} OPTIONAL,
  372.     ... -- For future extensions
  373. }
  374.  
  375. ECPrivateKey ::= INTEGER
  376.  
  377. PrivateDHKeyAttributes ::= SEQUENCE {
  378.     value      ObjectValue {DHPrivateKey},
  379.     keyInfo     KeyInfo {DomainParameters, PublicKeyOperations} OPTIONAL,
  380.     ... -- For future extensions
  381. }
  382.  
  383. DHPrivateKey ::= INTEGER -- Diffie-Hellman exponent
  384.  
  385. PrivateDSAKeyAttributes ::= SEQUENCE {
  386.     value      ObjectValue {DSAPrivateKey},
  387.     keyInfo     KeyInfo {DomainParameters, PublicKeyOperations} OPTIONAL,
  388.     ... -- For future extensions
  389. }
  390.  
  391. DSAPrivateKey ::= INTEGER
  392.  
  393. PrivateKEAKeyAttributes ::= SEQUENCE {
  394.     value      ObjectValue {KEAPrivateKey},
  395.     keyInfo     KeyInfo {DomainParameters, PublicKeyOperations} OPTIONAL,
  396.     ... -- For future extensions
  397. }
  398.  
  399. KEAPrivateKey ::= INTEGER
  400.  
  401. PublicKeyType ::= CHOICE {
  402.     publicRSAKey     PublicKeyObject {PublicRSAKeyAttributes},
  403.     publicECKey     [0] PublicKeyObject {PublicECKeyAttributes},
  404.     publicDHKey     [1] PublicKeyObject {PublicDHKeyAttributes},
  405.     publicDSAKey     [2] PublicKeyObject {PublicDSAKeyAttributes},
  406.     publicKEAKey     [3] PublicKeyObject {PublicKEAKeyAttributes},
  407.     ... -- For future extensions
  408. }
  409.  
  410. PublicKeyObject {KeyAttributes} ::= PKCS15Object { 
  411.     CommonKeyAttributes, CommonPublicKeyAttributes, KeyAttributes}
  412.  
  413. PublicRSAKeyAttributes ::= SEQUENCE {
  414.     value        ObjectValue {RSAPublicKeyChoice},
  415.     modulusLength     INTEGER, -- modulus length in bits, e.g. 1024
  416.     keyInfo        KeyInfo {NULL, PublicKeyOperations} OPTIONAL,
  417.     ... -- For future extensions
  418.  
  419. RSAPublicKeyChoice ::= CHOICE {
  420.     raw     RSAPublicKey,
  421.     spki [1] SubjectPublicKeyInfo, -- See X.509. Must contain a
  422.     -- public RSA key 
  423.     ...
  424. }
  425.  
  426. PublicECKeyAttributes ::= SEQUENCE {
  427.     value      ObjectValue {ECPublicKeyChoice},
  428.     keyInfo     KeyInfo {Parameters, PublicKeyOperations} OPTIONAL,
  429.     ... -- For future extensions
  430. }
  431.  
  432. ECPublicKeyChoice ::= CHOICE {
  433.     raw     ECPoint,
  434.     spki SubjectPublicKeyInfo, -- See X.509. Must contain a public EC key
  435.     ...
  436. }
  437.  
  438. PublicDHKeyAttributes ::= SEQUENCE {
  439.     value      ObjectValue {DHPublicKeyChoice},
  440.     keyInfo     KeyInfo {DomainParameters, PublicKeyOperations} OPTIONAL,
  441.     ... -- For future extensions
  442. }
  443.  
  444. DHPublicKeyChoice ::= CHOICE {
  445.     raw     DiffieHellmanPublicNumber,
  446.     spki SubjectPublicKeyInfo, -- See X.509. Must contain a public D-H key
  447.     ...
  448. }
  449.  
  450. PublicDSAKeyAttributes ::= SEQUENCE {
  451.     value      ObjectValue {DSAPublicKeyChoice},
  452.     keyInfo     KeyInfo {DomainParameters, PublicKeyOperations} OPTIONAL,
  453.     ... -- For future extensions
  454. }
  455.  
  456. DSAPublicKeyChoice ::= CHOICE {
  457.     raw     INTEGER,
  458.     spki SubjectPublicKeyInfo, -- See X.509. Must contain a public DSA key.
  459.     ...
  460. }
  461.  
  462. PublicKEAKeyAttributes ::= SEQUENCE {
  463.     value      ObjectValue {KEAPublicKeyChoice},
  464.     keyInfo     KeyInfo {DomainParameters, PublicKeyOperations} OPTIONAL,
  465.     ... -- For future extensions
  466. }
  467.  
  468. KEAPublicKeyChoice ::= CHOICE {
  469.     raw     INTEGER,
  470.     spki SubjectPublicKeyInfo, -- See X.509. Must contain a public KEA key
  471.     ...
  472. }
  473.  
  474. SecretKeyType ::= CHOICE {
  475.     genericSecretKey    SecretKeyObject {GenericSecretKeyAttributes},
  476.     rc2key         [0] SecretKeyObject {GenericSecretKeyAttributes},
  477.     rc4key         [1] SecretKeyObject {GenericSecretKeyAttributes},
  478.     desKey         [2] SecretKeyObject {GenericSecretKeyAttributes},
  479.     des2Key        [3] SecretKeyObject {GenericSecretKeyAttributes},
  480.     des3Key                [4] SecretKeyObject {GenericSecretKeyAttributes}, 
  481.     castKey         [5] SecretKeyObject {GenericSecretKeyAttributes},
  482.     cast3Key         [6] SecretKeyObject {GenericSecretKeyAttributes},
  483.     cast128Key      [7] SecretKeyObject {GenericSecretKeyAttributes},
  484.     rc5Key          [8] SecretKeyObject {GenericSecretKeyAttributes},
  485.     ideaKey         [9] SecretKeyObject {GenericSecretKeyAttributes},
  486.     skipjackKey     [10] SecretKeyObject {GenericSecretKeyAttributes},
  487.     batonKey        [11] SecretKeyObject {GenericSecretKeyAttributes},
  488.     juniperKey      [12] SecretKeyObject {GenericSecretKeyAttributes},
  489.     rc6Key         [13] SecretKeyObject {GenericSecretKeyAttributes},
  490.     otherKey        [14] OtherKey,
  491. ... -- For future extensions
  492. }
  493.  
  494. SecretKeyObject {KeyAttributes} ::= PKCS15Object { 
  495.      CommonKeyAttributes, CommonSecretKeyAttributes, KeyAttributes}
  496.  
  497. OtherKey ::= SEQUENCE {
  498.     keyType    OBJECT IDENTIFIER,
  499.     keyAttr    SecretKeyObject {GenericSecretKeyAttributes}
  500. }
  501.  
  502. GenericSecretKeyAttributes ::= SEQUENCE {
  503.     value    ObjectValue { OCTET STRING },
  504.     ... -- For future extensions
  505. }
  506.  
  507. CertificateType ::= CHOICE {
  508.     x509Certificate      CertificateObject { X509CertificateAttributes},
  509.     x509AttributeCertificate [0] CertificateObject
  510.                         {X509AttributeCertificateAttributes}, 
  511.     spkiCertificate     [1] CertificateObject {SPKICertificateAttributes},
  512.     pgpCertificate      [2] CertificateObject {PGPCertificateAttributes},
  513.     wtlsCertificate     [3] CertificateObject {WTLSCertificateAttributes},
  514.     x9-68Certificate     [4] CertificateObject {X9-68CertificateAttributes},
  515.     ...,
  516.     cvCertificate    [5] CertificateObject {CVCertificateAttributes}
  517. }
  518.  
  519. CertificateObject {CertAttributes} ::= PKCS15Object { 
  520.     CommonCertificateAttributes, NULL, CertAttributes}
  521.  
  522. X509CertificateAttributes ::= SEQUENCE {
  523.     value        ObjectValue { Certificate },
  524.     subject          Name OPTIONAL,
  525.     issuer         [0] Name OPTIONAL,
  526.     serialNumber     CertificateSerialNumber OPTIONAL,
  527.     ... -- For future extensions
  528. }
  529.  
  530. X509AttributeCertificateAttributes ::= SEQUENCE {
  531.     value    ObjectValue { AttributeCertificate },
  532.     issuer    GeneralNames OPTIONAL,
  533.     serialNumber CertificateSerialNumber OPTIONAL,
  534.     attrTypes     [0] SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
  535.     ... -- For future extensions
  536. }
  537.  
  538. SPKICertificateAttributes ::= SEQUENCE {
  539.     value    ObjectValue { PKCS15-OPAQUE.&Type },
  540.     ... -- For future extensions
  541. }
  542.  
  543. PGPCertificateAttributes ::= SEQUENCE {
  544.     value    ObjectValue { PKCS15-OPAQUE.&Type },
  545.     ... -- For future extensions
  546. }
  547.  
  548. WTLSCertificateAttributes ::= SEQUENCE {
  549.     value    ObjectValue { PKCS15-OPAQUE.&Type },
  550.     ... -- For future extensions
  551. }
  552.  
  553. X9-68CertificateAttributes ::= SEQUENCE {
  554.     value    ObjectValue { PKCS15-OPAQUE.&Type },
  555.     ... -- For future extensions
  556. }
  557. CVCertificateAttributes ::= SEQUENCE {
  558.     value    ObjectValue { PKCS15-OPAQUE.&Type},
  559.     ... -- For future extensions
  560. }
  561.  
  562. DataType ::= CHOICE {
  563.     opaqueDO    DataObject {Opaque},
  564.     externalIDO    [0] DataObject {ExternalIDO},
  565.     oidDO      [1] DataObject {OidDO},
  566.     ... -- For future extensions
  567. }
  568.  
  569. DataObject {DataObjectAttributes} ::= PKCS15Object { 
  570.     CommonDataObjectAttributes, NULL, DataObjectAttributes}
  571.  
  572. Opaque ::= ObjectValue {PKCS15-OPAQUE.&Type}
  573.  
  574. ExternalIDO ::= ObjectValue {PKCS15-OPAQUE.&Type}
  575.     (CONSTRAINED BY {-- All data objects must be defined in
  576.     -- accordance with ISO/IEC 7816-6 --}) 
  577.  
  578. OidDO ::= SEQUENCE {
  579.     id        OBJECT IDENTIFIER,
  580.     value     ObjectValue {PKCS15-OPAQUE.&Type}
  581. }
  582.  
  583. AuthenticationType ::= CHOICE {
  584.     pin    AuthenticationObject { PinAttributes },
  585.     ...,
  586.     biometricTemplate [0] AuthenticationObject {BiometricAttributes},
  587.     authKey  [1] AuthenticationObject {AuthKeyAttributes},
  588.     external [2] AuthenticationObject {ExternalAuthObjectAttributes}
  589. }
  590.  
  591. AuthenticationObject {AuthObjectAttributes} ::= PKCS15Object { 
  592.     CommonAuthenticationObjectAttributes, NULL, AuthObjectAttributes}
  593.  
  594. PinAttributes ::= SEQUENCE {
  595.     pinFlags        PinFlags,
  596.     pinType        PinType,
  597.     minLength       INTEGER (pkcs15-lb-minPinLength..pkcs15-ub-minPinLength),
  598.     storedLength  INTEGER (0..pkcs15-ub-storedPinLength),
  599.     maxLength       INTEGER OPTIONAL,
  600.     pinReference  [0] Reference DEFAULT 0,
  601.     padChar        OCTET STRING (SIZE(1)) OPTIONAL,
  602.     lastPinChange GeneralizedTime OPTIONAL,
  603.     path       Path OPTIONAL,
  604.     ... -- For future extensions
  605. }
  606.  
  607. PinFlags ::= BIT STRING {
  608.     case-sensitive        (0),
  609.     local             (1),
  610.     change-disabled         (2),
  611.     unblock-disabled         (3),
  612.     initialized          (4),
  613.     needs-padding         (5),
  614.     unblockingPin         (6),
  615.     soPin             (7),
  616.     disable-allowed         (8),
  617.     integrity-protected        (9),
  618.     confidentiality-protected    (10),
  619.     exchangeRefData        (11)
  620. } (CONSTRAINED BY { -- 'unblockingPin' and 'soPIN' cannot both be set -- })
  621.  
  622. PinType ::= ENUMERATED {bcd, ascii-numeric, utf8, ...,
  623.     half-nibble-bcd, iso9564-1}
  624.  
  625. BiometricAttributes ::= SEQUENCE {
  626.     bioFlags        BiometricFlags,
  627.     templateId        OBJECT IDENTIFIER,
  628.     bioType        BiometricType,
  629.     bioReference    Reference DEFAULT 0,
  630.     lastChange        GeneralizedTime OPTIONAL,
  631.     path        Path OPTIONAL,
  632. ... -- For future extensions
  633. }
  634.  
  635. BiometricFlags ::= BIT STRING {
  636.     local        (1),
  637.     change-disabled    (2),
  638.     unblock-disabled    (3),
  639.     initialized        (4),
  640.     disable-allowed    (8),
  641.     integrity-protected    (9),
  642.     confidentiality-protected    (10)
  643.     } -- Note: bits 0, 5, 6, and 7 are reserved for future use
  644.  
  645. BiometricType ::= CHOICE {
  646.     fingerPrint        FingerPrint,
  647.     irisScan        [0] IrisScan,
  648.     -- Possible extensions:
  649.     -- voiceScan    VoiceScan,
  650.     -- faceScan        FaceScan,
  651.     -- retinaScan    Retinascan,
  652.     -- handGeometry    HandGeometry,
  653.     -- writeDynamics    WriteDynamics,
  654.     -- keyStrokeDynamicsKeyStrokeDynamics,
  655.     -- lipDynamics    LipDynamics,
  656.     ... -- For future extensions
  657. }
  658.  
  659. FingerPrint ::= SEQUENCE {
  660.     hand    ENUMERATED {left, right},
  661.     finger    ENUMERATED {thumb, pointerFinger, middleFinger,
  662.                     ringFinger, littleFinger}, 
  663.     ...
  664. }
  665.  
  666. IrisScan ::= SEQUENCE {
  667.     eye    ENUMERATED {left, right},
  668.     ...
  669. }
  670.  
  671. ExternalAuthObjectAttributes ::= CHOICE {
  672.     authKeyAttributes    AuthKeyAttributes,
  673.     certBasedAttributes    [0] CertBasedAuthenticationAttributes,
  674.     ... -- For future extensions
  675. }
  676.  
  677. AuthKeyAttributes ::= SEQUENCE {
  678.     derivedKey    BOOLEAN DEFAULT TRUE,
  679.     authKeyId    Identifier,
  680.     ... -- For future extensions
  681. }
  682.  
  683. CertBasedAuthenticationAttributes ::= SEQUENCE {
  684.     cha    OCTET STRING,
  685.     ...
  686. }
  687.  
  688. TokenInfo ::= SEQUENCE {
  689.     version        INTEGER {v1(0)} (v1,...),
  690.     serialNumber    OCTET STRING,
  691.     manufacturerID     Label OPTIONAL,
  692.     label         [0] Label OPTIONAL,
  693.     tokenflags         TokenFlags,
  694.     seInfo         SEQUENCE OF SecurityEnvironmentInfo OPTIONAL,
  695.     recordInfo         [1] RecordInfo OPTIONAL,
  696.     supportedAlgorithms    [2] SEQUENCE OF AlgorithmInfo OPTIONAL,
  697.     ...,
  698.     issuerId        [3] Label OPTIONAL,
  699.     holderId        [4] Label OPTIONAL,
  700.     lastUpdate        [5] LastUpdate OPTIONAL,
  701.     preferredLanguage    PrintableString OPTIONAL -- In accordance with
  702.     -- IETF RFC 1766 
  703. } (CONSTRAINED BY { -- Each AlgorithmInfo.reference value must be unique --})
  704.  
  705. TokenFlags ::= BIT STRING {
  706.     readonly        (0),
  707.     loginRequired     (1),
  708.     prnGeneration     (2),
  709.     eidCompliant      (3)
  710. }
  711.  
  712. SecurityEnvironmentInfo ::= SEQUENCE {
  713.     se        INTEGER (0..pkcs15-ub-seInfo),
  714.     owner     OBJECT IDENTIFIER,
  715.     ... -- For future extensions
  716. }
  717.  
  718. RecordInfo ::= SEQUENCE {
  719.     oDFRecordLength      [0] INTEGER (0..pkcs15-ub-recordLength) OPTIONAL,
  720.     prKDFRecordLength     [1] INTEGER (0..pkcs15-ub-recordLength) OPTIONAL,
  721.     puKDFRecordLength    [2] INTEGER (0..pkcs15-ub-recordLength) OPTIONAL,
  722.     sKDFRecordLength     [3] INTEGER (0..pkcs15-ub-recordLength) OPTIONAL,
  723.     cDFRecordLength      [4] INTEGER (0..pkcs15-ub-recordLength) OPTIONAL,
  724.     dODFRecordLength     [5] INTEGER (0..pkcs15-ub-recordLength) OPTIONAL,
  725.     aODFRecordLength     [6] INTEGER (0..pkcs15-ub-recordLength) OPTIONAL
  726. }
  727.  
  728. AlgorithmInfo ::= SEQUENCE {
  729.     reference      Reference,
  730.     algorithm      PKCS15-ALGORITHM.&id({AlgorithmSet}),
  731.     parameters     PKCS15-ALGORITHM.&Parameters({AlgorithmSet}{@algorithm}),
  732.     supportedOperations
  733.             PKCS15-ALGORITHM.&Operations({AlgorithmSet}{@algorithm}),
  734.     algId       PKCS15-ALGORITHM.&objectIdentifier({AlgorithmSet}{@algorithm})
  735.                     OPTIONAL, 
  736.     algRef    Reference OPTIONAL
  737. }
  738.  
  739. PKCS15-ALGORITHM ::= CLASS {
  740.         &id INTEGER UNIQUE,
  741.         &Parameters,
  742.         &Operations Operations,
  743.     &objectIdentifier OBJECT IDENTIFIER OPTIONAL
  744. } WITH SYNTAX {
  745.   PARAMETERS &Parameters OPERATIONS &Operations ID &id [OID &objectIdentifier]}
  746.  
  747. PKCS15-OPAQUE ::= TYPE-IDENTIFIER
  748.  
  749. PublicKeyOperations ::= Operations 
  750.  
  751. Operations ::= BIT STRING {
  752.         compute-checksum  (0), -- H/W computation of checksum
  753.         compute-signature (1), -- H/W computation of signature
  754.         verify-checksum   (2), -- H/W verification of checksum
  755.         verify-signature  (3), -- H/W verification of signature
  756.         encipher          (4), -- H/W encryption of data
  757.         decipher          (5), -- H/W decryption of data
  758.         hash              (6), -- H/W hashing
  759.         generate-key      (7)  -- H/W key generation
  760.         }
  761.  
  762. pkcs15-alg-null      PKCS15-ALGORITHM ::= {
  763.         PARAMETERS NULL OPERATIONS {{generate-key}} ID -1}
  764.  
  765. AlgorithmSet PKCS15-ALGORITHM ::= { 
  766.         pkcs15-alg-null,
  767.         ... -- See PKCS #11 for values for the &id field (and parameters)
  768.         }
  769.  
  770. LastUpdate ::= CHOICE {
  771.         generalizedTime GeneralizedTime,
  772.         referencedTime ReferencedValue {GeneralizedTime},
  773.     ... -- For future extensions
  774.     }
  775.  
  776. -- Soft token related types and objects
  777.  
  778. EnvelopedData {Type} ::= SEQUENCE {
  779.     version         INTEGER{v0(0),v1(1),v2(2),v3(3),v4(4)}(v0|v1|v2,...),
  780.     originatorInfo     [0] OriginatorInfo OPTIONAL,
  781.     recipientInfos      RecipientInfos,
  782.     encryptedContentInfo EncryptedContentInfo{Type},
  783.     unprotectedAttrs     [1] SET SIZE (1..MAX) OF Attribute OPTIONAL
  784. }
  785.  
  786. EncryptedContentInfo {Type} ::= SEQUENCE {
  787.     contentType               OBJECT IDENTIFIER,
  788.     contentEncryptionAlgorithm AlgorithmIdentifier {{KeyDerivationAlgorithms}},
  789.     encryptedContent            [0] OCTET STRING OPTIONAL
  790. }(CONSTRAINED BY {-- 'encryptedContent' shall be the result of
  791.   -- encrypting DER-encoded value of type -- Type})
  792.  
  793. PKCS15Token ::= SEQUENCE {
  794.     version        INTEGER {v1(0)} (v1,...),
  795.     keyManagementInfo    [0] KeyManagementInfo OPTIONAL,
  796.     pkcs15Objects    SEQUENCE OF PKCS15Objects
  797. }
  798.  
  799. KeyManagementInfo ::= SEQUENCE OF SEQUENCE {
  800.     keyId        Identifier,
  801.     keyInfo        CHOICE {
  802.         recipientInfo    RecipientInfo,
  803.         passwordInfo    [0] PasswordInfo
  804.     }
  805. } (CONSTRAINED BY {-- Each keyID must be unique --})
  806.  
  807. PasswordInfo ::= SEQUENCE {
  808.     hint    Label OPTIONAL,
  809.     algId    AlgorithmIdentifier {{KeyDerivationAlgorithms}},
  810.     ...
  811. } (CONSTRAINED BY {--keyID shall point to a KEKRecipientInfo--})
  812.  
  813. KeyDerivationAlgorithms ALGORITHM-IDENTIFIER ::= {
  814.     PBKDF2Algorithms,
  815.     ... -- For future extensions
  816. }
  817.  
  818. CMS3DESwrap ::= NULL
  819.  
  820. KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
  821.     {CMS3DESwrap IDENTIFIED BY id-alg-CMS3DESwrap} |
  822.     {INTEGER IDENTIFIED BY id-alg-CMSRC2wrap},
  823.     ... -- For future extensions
  824. }
  825.  
  826. DES-IV ::= OCTET STRING (SIZE(8))
  827.  
  828. ContentEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
  829.     SupportingAlgorithms EXCEPT {NULL IDENTIFIED BY id-hmacWithSHA1},
  830.     ... -- For future extensions
  831. }
  832.  
  833. MACAlgorithms ALGORITHM-IDENTIFIER ::= {
  834.     {NULL IDENTIFIED BY hMAC-SHA1},
  835.     ... -- For future extensions
  836. }
  837.  
  838. DigestAlgorithms ALGORITHM-IDENTIFIER ::= {
  839.     {NULL IDENTIFIED BY sha-1},
  840.     ... -- For future extensions
  841. }
  842.  
  843. -- Misc
  844.  
  845. DDO ::= SEQUENCE {
  846.     oid        OBJECT IDENTIFIER,
  847.     odfPath        Path OPTIONAL,
  848.     tokenInfoPath [0] Path OPTIONAL,
  849.     unusedPath       [1] Path OPTIONAL,
  850.     ... -- For future extensions
  851. }
  852.  
  853. DIRRecord ::=   [APPLICATION 1] SEQUENCE {
  854.     aid      [APPLICATION 15] OCTET STRING,
  855.     label     [APPLICATION 16] UTF8String OPTIONAL,
  856.     path     [APPLICATION 17] OCTET STRING,
  857.     ddo      [APPLICATION 19] DDO OPTIONAL
  858. }
  859.  
  860. UnusedSpace ::= SEQUENCE {
  861.     path      Path (WITH COMPONENTS {..., index PRESENT, length PRESENT}),
  862.     authId     Identifier OPTIONAL,
  863.     ...,
  864.     accessControlRules SEQUENCE OF AccessControlRule OPTIONAL
  865. }
  866.  
  867. END
  868.