X9ObjectIdentifiers.cs 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
  5. {
  6. public abstract class X9ObjectIdentifiers
  7. {
  8. //
  9. // X9.62
  10. //
  11. // ansi-X9-62 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
  12. // us(840) ansi-x962(10045) }
  13. //
  14. internal const string AnsiX962 = "1.2.840.10045";
  15. public static readonly DerObjectIdentifier ansi_X9_62 = new DerObjectIdentifier(AnsiX962);
  16. public static readonly DerObjectIdentifier IdFieldType = ansi_X9_62.Branch("1");
  17. public static readonly DerObjectIdentifier PrimeField = IdFieldType.Branch("1");
  18. public static readonly DerObjectIdentifier CharacteristicTwoField = IdFieldType.Branch("2");
  19. public static readonly DerObjectIdentifier GNBasis = CharacteristicTwoField.Branch("3.1");
  20. public static readonly DerObjectIdentifier TPBasis = CharacteristicTwoField.Branch("3.2");
  21. public static readonly DerObjectIdentifier PPBasis = CharacteristicTwoField.Branch("3.3");
  22. public const string IdECSigType = AnsiX962 + ".4";
  23. public static readonly DerObjectIdentifier id_ecSigType = ansi_X9_62.Branch("4");
  24. public static readonly DerObjectIdentifier ECDsaWithSha1 = id_ecSigType.Branch("1");
  25. public const string IdPublicKeyType = AnsiX962 + ".2";
  26. public static readonly DerObjectIdentifier id_publicKeyType = ansi_X9_62.Branch("2");
  27. public static readonly DerObjectIdentifier IdECPublicKey = id_publicKeyType.Branch("1");
  28. public static readonly DerObjectIdentifier ECDsaWithSha2 = id_ecSigType.Branch("3");
  29. public static readonly DerObjectIdentifier ECDsaWithSha224 = ECDsaWithSha2.Branch("1");
  30. public static readonly DerObjectIdentifier ECDsaWithSha256 = ECDsaWithSha2.Branch("2");
  31. public static readonly DerObjectIdentifier ECDsaWithSha384 = ECDsaWithSha2.Branch("3");
  32. public static readonly DerObjectIdentifier ECDsaWithSha512 = ECDsaWithSha2.Branch("4");
  33. //
  34. // named curves
  35. //
  36. public static readonly DerObjectIdentifier EllipticCurve = ansi_X9_62.Branch("3");
  37. //
  38. // Two Curves
  39. //
  40. public static readonly DerObjectIdentifier CTwoCurve = EllipticCurve.Branch("0");
  41. public static readonly DerObjectIdentifier C2Pnb163v1 = CTwoCurve.Branch("1");
  42. public static readonly DerObjectIdentifier C2Pnb163v2 = CTwoCurve.Branch("2");
  43. public static readonly DerObjectIdentifier C2Pnb163v3 = CTwoCurve.Branch("3");
  44. public static readonly DerObjectIdentifier C2Pnb176w1 = CTwoCurve.Branch("4");
  45. public static readonly DerObjectIdentifier C2Tnb191v1 = CTwoCurve.Branch("5");
  46. public static readonly DerObjectIdentifier C2Tnb191v2 = CTwoCurve.Branch("6");
  47. public static readonly DerObjectIdentifier C2Tnb191v3 = CTwoCurve.Branch("7");
  48. public static readonly DerObjectIdentifier C2Onb191v4 = CTwoCurve.Branch("8");
  49. public static readonly DerObjectIdentifier C2Onb191v5 = CTwoCurve.Branch("9");
  50. public static readonly DerObjectIdentifier C2Pnb208w1 = CTwoCurve.Branch("10");
  51. public static readonly DerObjectIdentifier C2Tnb239v1 = CTwoCurve.Branch("11");
  52. public static readonly DerObjectIdentifier C2Tnb239v2 = CTwoCurve.Branch("12");
  53. public static readonly DerObjectIdentifier C2Tnb239v3 = CTwoCurve.Branch("13");
  54. public static readonly DerObjectIdentifier C2Onb239v4 = CTwoCurve.Branch("14");
  55. public static readonly DerObjectIdentifier C2Onb239v5 = CTwoCurve.Branch("15");
  56. public static readonly DerObjectIdentifier C2Pnb272w1 = CTwoCurve.Branch("16");
  57. public static readonly DerObjectIdentifier C2Pnb304w1 = CTwoCurve.Branch("17");
  58. public static readonly DerObjectIdentifier C2Tnb359v1 = CTwoCurve.Branch("18");
  59. public static readonly DerObjectIdentifier C2Pnb368w1 = CTwoCurve.Branch("19");
  60. public static readonly DerObjectIdentifier C2Tnb431r1 = CTwoCurve.Branch("20");
  61. //
  62. // Prime
  63. //
  64. public static readonly DerObjectIdentifier PrimeCurve = EllipticCurve.Branch("1");
  65. public static readonly DerObjectIdentifier Prime192v1 = PrimeCurve.Branch("1");
  66. public static readonly DerObjectIdentifier Prime192v2 = PrimeCurve.Branch("2");
  67. public static readonly DerObjectIdentifier Prime192v3 = PrimeCurve.Branch("3");
  68. public static readonly DerObjectIdentifier Prime239v1 = PrimeCurve.Branch("4");
  69. public static readonly DerObjectIdentifier Prime239v2 = PrimeCurve.Branch("5");
  70. public static readonly DerObjectIdentifier Prime239v3 = PrimeCurve.Branch("6");
  71. public static readonly DerObjectIdentifier Prime256v1 = PrimeCurve.Branch("7");
  72. //
  73. // DSA
  74. //
  75. // dsapublicnumber OBJECT IDENTIFIER ::= { iso(1) member-body(2)
  76. // us(840) ansi-x957(10040) number-type(4) 1 }
  77. public static readonly DerObjectIdentifier IdDsa = new DerObjectIdentifier("1.2.840.10040.4.1");
  78. /**
  79. * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
  80. * us(840) x9-57 (10040) x9cm(4) 3 }
  81. */
  82. public static readonly DerObjectIdentifier IdDsaWithSha1 = new DerObjectIdentifier("1.2.840.10040.4.3");
  83. /**
  84. * X9.63
  85. */
  86. public static readonly DerObjectIdentifier X9x63Scheme = new DerObjectIdentifier("1.3.133.16.840.63.0");
  87. public static readonly DerObjectIdentifier DHSinglePassStdDHSha1KdfScheme = X9x63Scheme.Branch("2");
  88. public static readonly DerObjectIdentifier DHSinglePassCofactorDHSha1KdfScheme = X9x63Scheme.Branch("3");
  89. public static readonly DerObjectIdentifier MqvSinglePassSha1KdfScheme = X9x63Scheme.Branch("16");
  90. /**
  91. * X9.42
  92. */
  93. public static readonly DerObjectIdentifier ansi_x9_42 = new DerObjectIdentifier("1.2.840.10046");
  94. //
  95. // Diffie-Hellman
  96. //
  97. // dhpublicnumber OBJECT IDENTIFIER ::= { iso(1) member-body(2)
  98. // us(840) ansi-x942(10046) number-type(2) 1 }
  99. //
  100. public static readonly DerObjectIdentifier DHPublicNumber = ansi_x9_42.Branch("2.1");
  101. public static readonly DerObjectIdentifier X9x42Schemes = ansi_x9_42.Branch("2.3");
  102. public static readonly DerObjectIdentifier DHStatic = X9x42Schemes.Branch("1");
  103. public static readonly DerObjectIdentifier DHEphem = X9x42Schemes.Branch("2");
  104. public static readonly DerObjectIdentifier DHOneFlow = X9x42Schemes.Branch("3");
  105. public static readonly DerObjectIdentifier DHHybrid1 = X9x42Schemes.Branch("4");
  106. public static readonly DerObjectIdentifier DHHybrid2 = X9x42Schemes.Branch("5");
  107. public static readonly DerObjectIdentifier DHHybridOneFlow = X9x42Schemes.Branch("6");
  108. public static readonly DerObjectIdentifier Mqv2 = X9x42Schemes.Branch("7");
  109. public static readonly DerObjectIdentifier Mqv1 = X9x42Schemes.Branch("8");
  110. }
  111. }
  112. #pragma warning restore
  113. #endif