Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

174 lines
4.9 KiB

  1. --#comment "Copyright (C) Microsoft Corporation, 1996-1999. All rights reserved."--
  2. --#comment "ASN.1 definitions for PFXPKCS"--
  3. --#SS.basic lenptr-- -- set of and sequence of w/o size constraint
  4. --#SS.sized lenptr-- -- set of and sequence of w/ size constraint
  5. --#oid array-- -- object identifier is 16-node fixed array
  6. PFXPKCS
  7. DEFINITIONS IMPLICIT TAGS ::=
  8. BEGIN
  9. ObjectID ::= OBJECT IDENTIFIER --#oid array--
  10. ObjID ::= ObjectID
  11. Any ::= ANY
  12. ObjectIdentifierType ::= ObjectID --#public--
  13. OctetStringType ::= OCTET STRING --#public--
  14. IntegerType ::= INTEGER --#intx-- --#public--
  15. HugeInteger ::= INTEGER --#intx-- (0..MAX)
  16. ------------------------------------------------------------------------------
  17. -- from PKCS #1
  18. RSAPublicKey ::= SEQUENCE {
  19. modulus HugeInteger, -- n
  20. publicExponent HugeInteger } --#public-- -- e
  21. RSAPrivateKey ::= SEQUENCE {
  22. version Version,
  23. modulus HugeInteger, -- n
  24. publicExponent INTEGER, -- e
  25. privateExponent HugeInteger, -- d
  26. prime1 HugeInteger, -- p
  27. prime2 HugeInteger, -- q
  28. exponent1 HugeInteger, -- d mod (p-1)
  29. exponent2 HugeInteger, -- d mod (q-1)
  30. coefficient HugeInteger } --#public-- -- (inverse of q) mod p
  31. ------------------------------------------------------------------------------
  32. -- from PKCS #8
  33. PrivateKeyInfo ::= SEQUENCE {
  34. version Version,
  35. privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
  36. privateKey PrivateKey,
  37. attributes [0] IMPLICIT Attributes OPTIONAL
  38. } --#public--
  39. Version ::= INTEGER
  40. PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
  41. PrivateKey ::= OCTET STRING
  42. EncryptedPrivateKeyInfo ::= SEQUENCE {
  43. encryptionAlgorithm EncryptionAlgorithmIdentifier,
  44. encryptedData EncryptedData
  45. } --#public--
  46. EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
  47. EncryptedData ::= SEQUENCE {
  48. version Version,
  49. encryptedContentInfo EncryptedContentInfo
  50. } --#public--
  51. EncryptedContentInfo ::= SEQUENCE {
  52. contentType ContentType,
  53. contentEncryptionAlg ContentEncryptionAlgorithmIdentifier,
  54. encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
  55. }
  56. ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
  57. EncryptedContent ::= OCTET STRING
  58. ------------------------------------------------------------------------------
  59. AlgorithmIdentifier ::= SEQUENCE {
  60. algorithm ObjectID,
  61. parameters ANY OPTIONAL
  62. }
  63. PBEParameter ::= SEQUENCE {
  64. salt OCTET STRING,
  65. iterationCount INTEGER
  66. } --#public--
  67. DigestInfo ::= SEQUENCE {
  68. digestAlgorithm DigestAlgorithmIdentifier,
  69. digest Digest
  70. } --#public--
  71. DigestAlgorithmIdentifier ::= AlgorithmIdentifier
  72. Digest ::= OCTET STRING
  73. -- attributes, hacked from X.509
  74. AttributeSetValue ::= SET --#public-- OF ANY
  75. Attribute ::= SEQUENCE { -- hacked from X.509
  76. attributeType ObjectID,
  77. attributeValue AttributeSetValue }
  78. Attributes ::= SET --#public-- OF Attribute -- hacked from X.509
  79. -------------------------------
  80. -- from PKCS #7
  81. ContentType ::= ObjectID
  82. ContentInfo ::= SEQUENCE {
  83. contentType ContentType,
  84. content [0] EXPLICIT ANY OPTIONAL
  85. }
  86. ------------------------------------------------------------------------------
  87. PFX ::= SEQUENCE {
  88. version Version (3),
  89. authSafes ContentInfo,
  90. -- signedData in public-key integrity mode, and
  91. -- data in password integrity mode. See PKCS #7
  92. macData MacData OPTIONAL
  93. -- present only in password integrity mode
  94. } --#public--
  95. MacData ::= SEQUENCE {
  96. safeMac DigestInfo, -- see PKCS #7
  97. macSalt OCTET STRING,
  98. macIterationCount INTEGER DEFAULT 1
  99. } --#public--
  100. AuthenticatedSafes ::= SEQUENCE --#public-- OF ContentInfo
  101. -- data if unencrypted
  102. -- encryptedData if password encrypted
  103. -- envelopedData if public key encrypted
  104. SafeContents ::= SEQUENCE --#public-- OF SafeBag
  105. SafeBag ::= SEQUENCE {
  106. safeBagType ObjectID,
  107. safeBagContent [0] EXPLICIT ANY DEFINED BY safeBagType,
  108. safeBagAttribs Attributes OPTIONAL
  109. } --#public--
  110. CertBag ::= SEQUENCE {
  111. certType ObjectID,
  112. value [0] EXPLICIT ANY DEFINED BY certType
  113. } --#public--
  114. X509Cert ::= OCTET STRING
  115. SDSICert ::= IA5String
  116. CRLBag ::= SEQUENCE {
  117. crlType ObjectID,
  118. value [0] EXPLICIT ANY DEFINED BY crlType
  119. } --#public--
  120. X509CRL ::= OCTET STRING
  121. KeyBag ::= PrivateKeyInfo -- see PKCS #8
  122. Pkcs-8ShroudedKeyBag ::= EncryptedPrivateKeyInfo -- see PKCS #8
  123. SecretBag ::= SEQUENCE {
  124. secretType ObjectID,
  125. secretContent [0] EXPLICIT ANY DEFINED BY secretType
  126. } --#public--
  127. END