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

  1. PKCS-12 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
  2.                  pkcs-12(12) modules(0)  pkcs-12(1)}
  3.  
  4. -- $Revision$
  5.  
  6. DEFINITIONS IMPLICIT TAGS ::=
  7.  
  8. BEGIN
  9.  
  10. -- EXPORTS ALL
  11. -- All types and values defined in this module is exported for use in
  12. -- other ASN.1 modules. 
  13.  
  14. IMPORTS
  15.  
  16. informationFramework
  17.         FROM UsefulDefinitions {joint-iso-itu-t(2) ds(5) module(1)
  18.         usefulDefinitions(0) 3}
  19.  
  20. ATTRIBUTE
  21.     FROM InformationFramework informationFramework
  22.  
  23. ContentInfo, DigestInfo
  24.     FROM PKCS-7 {iso(1) member-body(2) us(840) rsadsi(113549)
  25.     pkcs(1) pkcs-7(7) modules(0) pkcs-7(1)}
  26.  
  27. PrivateKeyInfo, EncryptedPrivateKeyInfo
  28.     FROM PKCS-8 {iso(1) member-body(2) us(840) rsadsi(113549)
  29.     pkcs(1) pkcs-8(8) modules(1) pkcs-8(1)}
  30.  
  31. pkcs-9, friendlyName, localKeyId, certTypes, crlTypes
  32.     FROM PKCS-9 {iso(1) member-body(2) us(840) rsadsi(113549)
  33.     pkcs(1) pkcs-9(9) modules(0) pkcs-9(1)};
  34.  
  35. -- Object identifiers
  36.  
  37. rsadsi    OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840) rsadsi(113549)}
  38. pkcs    OBJECT IDENTIFIER ::= {rsadsi pkcs(1)}
  39. pkcs-12    OBJECT IDENTIFIER ::= {pkcs 12}
  40. pkcs-12PbeIds                      OBJECT IDENTIFIER ::= {pkcs-12 1}
  41. pbeWithSHAAnd128BitRC4          OBJECT IDENTIFIER ::= {pkcs-12PbeIds 1}
  42. pbeWithSHAAnd40BitRC4           OBJECT IDENTIFIER ::= {pkcs-12PbeIds 2}
  43. pbeWithSHAAnd3-KeyTripleDES-CBC    OBJECT IDENTIFIER ::= {pkcs-12PbeIds 3}
  44. pbeWithSHAAnd2-KeyTripleDES-CBC    OBJECT IDENTIFIER ::= {pkcs-12PbeIds 4}
  45. pbeWithSHAAnd128BitRC2-CBC      OBJECT IDENTIFIER ::= {pkcs-12PbeIds 5}
  46. pbewithSHAAnd40BitRC2-CBC       OBJECT IDENTIFIER ::= {pkcs-12PbeIds 6}
  47.  
  48. bagtypes            OBJECT IDENTIFIER ::= {pkcs-12 10 1}
  49.  
  50. -- The PFX PDU
  51.  
  52. PFX ::= SEQUENCE {
  53.         version        INTEGER {v3(3)}(v3,...),
  54.         authSafe    ContentInfo,
  55.         macData        MacData OPTIONAL
  56. }
  57.  
  58. MacData ::= SEQUENCE {
  59.         mac         DigestInfo,
  60.     macSalt            OCTET STRING,
  61.     iterations    INTEGER DEFAULT 1
  62. -- Note: The default is for historical reasons and its use is
  63. -- deprecated. A higher value, like 1024 is recommended.
  64. }
  65.  
  66. AuthenticatedSafe ::= SEQUENCE OF ContentInfo
  67.     -- Data if unencrypted
  68.     -- EncryptedData if password-encrypted
  69.     -- EnvelopedData if public key-encrypted
  70.  
  71. SafeContents ::= SEQUENCE OF SafeBag
  72.  
  73. SafeBag ::= SEQUENCE {
  74.       bagId              BAG-TYPE.&id ({PKCS12BagSet}),
  75.       bagValue          [0] EXPLICIT BAG-TYPE.&Type({PKCS12BagSet}{@bagId}),
  76.       bagAttributes     SET OF PKCS12Attribute OPTIONAL
  77. }
  78.  
  79. -- Bag types
  80.  
  81. keyBag       BAG-TYPE ::= 
  82.     {KeyBag IDENTIFIED BY {bagtypes 1}}
  83. pkcs8ShroudedKeyBag BAG-TYPE ::=
  84.     {PKCS8ShroudedKeyBag IDENTIFIED BY {bagtypes 2}}
  85. certBag BAG-TYPE ::= 
  86.     {CertBag IDENTIFIED BY {bagtypes 3}}
  87. crlBag BAG-TYPE ::=
  88.     {CRLBag IDENTIFIED BY {bagtypes 4}}
  89. secretBag BAG-TYPE ::=    
  90.     {SecretBag IDENTIFIED BY {bagtypes 5}}
  91. safeContentsBag BAG-TYPE ::=
  92.     {SafeContents IDENTIFIED BY {bagtypes 6}}
  93.  
  94. PKCS12BagSet BAG-TYPE ::= {
  95.     keyBag | 
  96.     pkcs8ShroudedKeyBag |
  97.     certBag |
  98.     crlBag | 
  99.     secretBag | 
  100.     safeContentsBag,
  101.     ... -- For future extensions
  102. }
  103.  
  104. BAG-TYPE ::= TYPE-IDENTIFIER
  105.  
  106. -- KeyBag
  107.  
  108. KeyBag ::= PrivateKeyInfo
  109.  
  110. -- Shrouded KeyBag
  111.  
  112. PKCS8ShroudedKeyBag ::= EncryptedPrivateKeyInfo
  113.  
  114. -- CertBag
  115.  
  116. CertBag ::= SEQUENCE {
  117.     certId    BAG-TYPE.&id   ({CertTypes}),
  118.     certValue [0] EXPLICIT BAG-TYPE.&Type ({CertTypes}{@certId})
  119. }
  120.  
  121. x509Certificate BAG-TYPE ::=
  122.     {OCTET STRING IDENTIFIED BY {certTypes 1}}
  123.     -- DER-encoded X.509 certificate stored in OCTET STRING
  124. sdsiCertificate BAG-TYPE ::=
  125.     {IA5String IDENTIFIED BY {certTypes 2}}
  126.     -- Base64-encoded SDSI certificate stored in IA5String
  127.  
  128. CertTypes BAG-TYPE ::= {
  129.     x509Certificate |
  130.     sdsiCertificate,
  131.     ... -- For future extensions
  132. }
  133.  
  134. -- CRLBag
  135.  
  136. CRLBag ::= SEQUENCE {
  137.     crlId         BAG-TYPE.&id ({CRLTypes}),
  138.     crlValue     [0] EXPLICIT BAG-TYPE.&Type ({CRLTypes}{@crlId})
  139. }
  140.  
  141. x509CRL BAG-TYPE ::=
  142.     {OCTET STRING IDENTIFIED BY {crlTypes 1}}
  143.     -- DER-encoded X.509 CRL stored in OCTET STRING
  144.  
  145. CRLTypes BAG-TYPE ::= {
  146.     x509CRL,
  147.     ... -- For future extensions
  148. }
  149.  
  150. -- Secret Bag
  151.  
  152. SecretBag ::= SEQUENCE {
  153.     secretTypeId BAG-TYPE.&id ({SecretTypes}),
  154.     secretValue  [0] EXPLICIT BAG-TYPE.&Type ({SecretTypes}{@secretTypeId})
  155. }
  156.  
  157. SecretTypes BAG-TYPE ::= {
  158.     ... -- For future extensions
  159. }
  160.  
  161. -- Attributes
  162.  
  163. PKCS12Attribute ::= SEQUENCE {
  164.     attrId           ATTRIBUTE.&id ({PKCS12AttrSet}),
  165.     attrValues     SET OF ATTRIBUTE.&Type ({PKCS12AttrSet}{@attrId})
  166. } -- This type is compatible with the X.500 type 'Attribute'
  167.  
  168. PKCS12AttrSet ATTRIBUTE ::= {
  169.     friendlyName |
  170.     localKeyId,
  171.     ... -- Other attributes are allowed
  172. }
  173.  
  174. END
  175.