Leaked source code of windows server 2003
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.

161 lines
5.4 KiB

  1. ----------------------------------------------------------------------------
  2. -- X509.ASN
  3. --
  4. -- ASN.1 definitions for SCHANNEL DH, FORTEZZA, and Private Key encoding
  5. ----------------------------------------------------------------------------
  6. --#comment "Copyright (C) Microsoft Corporation, 1996-1999. All rights reserved."--
  7. --#comment "ASN.1 definitions for SCHANNEL DH, FORTEZZA, and Private Key encoding"--
  8. --#oid array-- -- object identifier is 16-node fixed array
  9. --#SS.basic lenptr-- -- set of and sequence of w/o size constraint
  10. --#SS.sized lenptr-- -- set of and sequence of w/ size constraint
  11. X509
  12. DEFINITIONS EXPLICIT TAGS ::=
  13. BEGIN
  14. HUGEINTEGER ::= INTEGER --#intx-- -- tag 0x02
  15. BITSTRING ::= BIT STRING --#lenptr-- --#nomemcpy-- -- tag 0x03
  16. OCTETSTRING ::= OCTET STRING --#lenptr-- --#nomemcpy-- -- tag 0x04
  17. NOCOPYANY ::= ANY --#nomemcpy--
  18. NUMERICSTRING ::= NumericString --#lenptr-- -- tag 0x12 (18)
  19. PRINTABLESTRING ::= PrintableString --#lenptr-- -- tag 0x13 (19)
  20. TELETEXSTRING ::= TeletexString --#lenptr-- -- tag 0x14 (20)
  21. T61STRING ::= T61String --#lenptr-- -- tag 0x14 (20)
  22. VIDEOTEXSTRING ::= VideotexString --#lenptr-- -- tag 0x15 (21)
  23. IA5STRING ::= IA5String --#lenptr-- -- tag 0x16 (22)
  24. GRAPHICSTRING ::= GraphicString --#lenptr-- -- tag 0x19 (25)
  25. VISIBLESTRING ::= VisibleString --#lenptr-- -- tag 0x1A (26)
  26. ISO646STRING ::= ISO646String --#lenptr-- -- tag 0x1A (26)
  27. GENERALSTRING ::= GeneralString --#lenptr-- -- tag 0x1B (27)
  28. UNIVERSALSTRING ::= UniversalString --#lenptr-- -- tag 0x1C (28)
  29. BMPSTRING ::= BMPString --#lenptr-- -- tag 0x1E (30)
  30. ObjectID ::= OBJECT IDENTIFIER --#oid array--
  31. --------------------------------------------
  32. -- SCHANNEL Definitions
  33. --------------------------------------------
  34. --------------------------------------------
  35. -- Diffie Hellman Public
  36. --
  37. -- DHPublicKey defines the value Y for a
  38. -- DH Public Key.
  39. --------------------------------------------
  40. DHPublicKey ::= HUGEINTEGER --#public-- -- Y
  41. --------------------------------------------
  42. -- Diffie Hellman Parameters
  43. --
  44. -- DHParameters defines the diffie helman
  45. -- parameters structure, which contains
  46. -- a prime modulus p, and a generator g.
  47. -- The optional private value length describes
  48. -- the length of the private value, if not
  49. -- the length of the prime modulus.
  50. --------------------------------------------
  51. DHParameters ::= SEQUENCE {
  52. prime HUGEINTEGER, -- p
  53. base HUGEINTEGER, -- g
  54. privateValueLength INTEGER OPTIONAL
  55. } --#public--
  56. --------------------------------------------
  57. -- DSA Parameters
  58. --
  59. -- DHParameters defines the diffie helman
  60. -- parameters structure, which contains
  61. -- a prime modulus p, and a generator g.
  62. -- The optional private value length describes
  63. -- the length of the private value, if not
  64. -- the length of the prime modulus.
  65. --------------------------------------------
  66. DSAParameters ::= SEQUENCE {
  67. p HUGEINTEGER, -- p
  68. q HUGEINTEGER, -- q
  69. g HUGEINTEGER -- g
  70. } --#public--
  71. --------------------------------------------
  72. -- DSA Public
  73. --
  74. -- DSAPublicKey defines the value Y for a
  75. -- DSA Public Key.
  76. --------------------------------------------
  77. DSAPublicKey ::= HUGEINTEGER --#public-- -- Y
  78. --------------------------------------------
  79. -- Fortezza Public
  80. --
  81. -- Fortezza parameters are not ASN.1 encoded,
  82. -- but are stored in a bitstring.
  83. --------------------------------------------
  84. FORTPublicKey ::= BITSTRING --#public-- -- Fort
  85. AlgorithmIdentifier ::= SEQUENCE {
  86. algorithm ObjectID,
  87. parameters ANY OPTIONAL
  88. }
  89. RSAPrivateKey ::= SEQUENCE {
  90. version INTEGER,
  91. modulus HUGEINTEGER, -- n
  92. publicExponent INTEGER, -- e
  93. privateExponent HUGEINTEGER, -- d
  94. prime1 HUGEINTEGER, -- p
  95. prime2 HUGEINTEGER, -- q
  96. exponent1 HUGEINTEGER, -- d mod (p-1)
  97. exponent2 HUGEINTEGER, -- d mod (q-1)
  98. coefficient HUGEINTEGER -- (inverse of q) mod p
  99. } --#public--
  100. DSAPrivateKey ::= SEQUENCE {
  101. version INTEGER,
  102. private HUGEINTEGER -- x
  103. } --#public--
  104. DHPrivateKey ::= SEQUENCE {
  105. version INTEGER,
  106. private HUGEINTEGER -- x
  107. } --#public--
  108. EncryptedData ::= OCTET STRING
  109. PrivateKeyInfo ::= SEQUENCE {
  110. version INTEGER,
  111. privateKeyAlgorithm AlgorithmIdentifier,
  112. privateKey OCTET STRING,
  113. attributes [0] IMPLICIT SET OF ANY OPTIONAL
  114. } --#public--
  115. PrivateKeyData ::= SEQUENCE {
  116. privateKeyAlgorithm AlgorithmIdentifier,
  117. privateKey EncryptedData
  118. }
  119. PrivateKeyFile ::= SEQUENCE {
  120. name OCTET STRING,
  121. privateKey PrivateKeyData
  122. } --#public--
  123. --------------------------------------------
  124. -- Enhanced Key Usage Extension (2.5.29.37)
  125. --------------------------------------------
  126. EnhancedKeyUsage ::= SEQUENCE --#public-- OF UsageIdentifier
  127. UsageIdentifier ::= ObjectID
  128. END