BsiObjectIdentifiers.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Bsi
  5. {
  6. /// <remarks>See https://www.bsi.bund.de/cae/servlet/contentblob/471398/publicationFile/30615/BSI-TR-03111_pdf.pdf</remarks>
  7. public abstract class BsiObjectIdentifiers
  8. {
  9. public static readonly DerObjectIdentifier bsi_de = new DerObjectIdentifier("0.4.0.127.0.7");
  10. /* 0.4.0.127.0.7.1.1 */
  11. public static readonly DerObjectIdentifier id_ecc = bsi_de.Branch("1.1");
  12. /* 0.4.0.127.0.7.1.1.4.1 */
  13. public static readonly DerObjectIdentifier ecdsa_plain_signatures = id_ecc.Branch("4.1");
  14. /* 0.4.0.127.0.7.1.1.4.1.1 */
  15. public static readonly DerObjectIdentifier ecdsa_plain_SHA1 = ecdsa_plain_signatures.Branch("1");
  16. /* 0.4.0.127.0.7.1.1.4.1.2 */
  17. public static readonly DerObjectIdentifier ecdsa_plain_SHA224 = ecdsa_plain_signatures.Branch("2");
  18. /* 0.4.0.127.0.7.1.1.4.1.3 */
  19. public static readonly DerObjectIdentifier ecdsa_plain_SHA256 = ecdsa_plain_signatures.Branch("3");
  20. /* 0.4.0.127.0.7.1.1.4.1.4 */
  21. public static readonly DerObjectIdentifier ecdsa_plain_SHA384 = ecdsa_plain_signatures.Branch("4");
  22. /* 0.4.0.127.0.7.1.1.4.1.5 */
  23. public static readonly DerObjectIdentifier ecdsa_plain_SHA512 = ecdsa_plain_signatures.Branch("5");
  24. /* 0.4.0.127.0.7.1.1.4.1.6 */
  25. public static readonly DerObjectIdentifier ecdsa_plain_RIPEMD160 = ecdsa_plain_signatures.Branch("6");
  26. /** 0.4.0.127.0.7.1 */
  27. public static readonly DerObjectIdentifier algorithm = bsi_de.Branch("1");
  28. public static readonly DerObjectIdentifier ecka_eg = id_ecc.Branch("5.1");
  29. /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963 OID: 0.4.0.127.0.7.1.1.5.1.1 */
  30. public static readonly DerObjectIdentifier ecka_eg_X963kdf = ecka_eg.Branch("1");
  31. /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
  32. * with hash function SHA-1
  33. * OID: 0.4.0.127.0.7.1.1.5.1.1.1 */
  34. public static readonly DerObjectIdentifier ecka_eg_X963kdf_SHA1 = ecka_eg_X963kdf.Branch("1");
  35. /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
  36. * with hash function SHA224
  37. * OID: 0.4.0.127.0.7.1.1.5.1.1.2 */
  38. public static readonly DerObjectIdentifier ecka_eg_X963kdf_SHA224 = ecka_eg_X963kdf.Branch("2");
  39. /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
  40. * with hash function SHA256
  41. * OID: 0.4.0.127.0.7.1.1.5.1.1.3 */
  42. public static readonly DerObjectIdentifier ecka_eg_X963kdf_SHA256 = ecka_eg_X963kdf.Branch("3");
  43. /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
  44. * with hash function SHA384
  45. * OID: 0.4.0.127.0.7.1.1.5.1.1.4 */
  46. public static readonly DerObjectIdentifier ecka_eg_X963kdf_SHA384 = ecka_eg_X963kdf.Branch("4");
  47. /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
  48. * with hash function SHA512
  49. * OID: 0.4.0.127.0.7.1.1.5.1.1.5 */
  50. public static readonly DerObjectIdentifier ecka_eg_X963kdf_SHA512 = ecka_eg_X963kdf.Branch("5");
  51. /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
  52. * with hash function RIPEMD160
  53. * OID: 0.4.0.127.0.7.1.1.5.1.1.6 */
  54. public static readonly DerObjectIdentifier ecka_eg_X963kdf_RIPEMD160 = ecka_eg_X963kdf.Branch("6");
  55. /**
  56. * Key Derivation Function for Session Keys
  57. */
  58. public static readonly DerObjectIdentifier ecka_eg_SessionKDF = ecka_eg.Branch("2");
  59. public static readonly DerObjectIdentifier ecka_eg_SessionKDF_3DES = ecka_eg_SessionKDF.Branch("1");
  60. public static readonly DerObjectIdentifier ecka_eg_SessionKDF_AES128 = ecka_eg_SessionKDF.Branch("2");
  61. public static readonly DerObjectIdentifier ecka_eg_SessionKDF_AES192 = ecka_eg_SessionKDF.Branch("3");
  62. public static readonly DerObjectIdentifier ecka_eg_SessionKDF_AES256 = ecka_eg_SessionKDF.Branch("4");
  63. /* AES encryption (CBC) and authentication (CMAC)
  64. * OID: 0.4.0.127.0.7.1.x */
  65. //TODO: replace "1" with correct OID
  66. //public static readonly DerObjectIdentifier aes_cbc_cmac = algorithm.Branch("1");
  67. /* AES encryption (CBC) and authentication (CMAC) with 128 bit
  68. * OID: 0.4.0.127.0.7.1.x.y1 */
  69. //TODO: replace "1" with correct OID
  70. //public static readonly DerObjectIdentifier id_aes128_CBC_CMAC = aes_cbc_cmac.Branch("1");
  71. /* AES encryption (CBC) and authentication (CMAC) with 192 bit
  72. * OID: 0.4.0.127.0.7.1.x.y2 */
  73. //TODO: replace "1" with correct OID
  74. //public static readonly DerObjectIdentifier id_aes192_CBC_CMAC = aes_cbc_cmac.Branch("1");
  75. /* AES encryption (CBC) and authentication (CMAC) with 256 bit
  76. * OID: 0.4.0.127.0.7.1.x.y3 */
  77. //TODO: replace "1" with correct OID
  78. //public static readonly DerObjectIdentifier id_aes256_CBC_CMAC = aes_cbc_cmac.Branch("1");
  79. }
  80. }
  81. #pragma warning restore
  82. #endif