RSA.asn1 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. -- Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
  2. --
  3. -- Licensed under the Apache License 2.0 (the "License"). You may not use
  4. -- this file except in compliance with the License. You can obtain a copy
  5. -- in the file LICENSE in the source distribution or at
  6. -- https://www.openssl.org/source/license.html
  7. -- -------------------------------------------------------------------
  8. -- Taken from RFC 8017, Appendix C
  9. -- (https://www.rfc-editor.org/rfc/rfc8017.html#appendix-C)
  10. -- ============================
  11. -- Basic object identifiers
  12. -- ============================
  13. -- The DER encoding of this in hexadecimal is:
  14. -- (0x)06 08
  15. -- 2A 86 48 86 F7 0D 01 01
  16. --
  17. pkcs-1 OBJECT IDENTIFIER ::= {
  18. iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1
  19. }
  20. --
  21. -- When rsaEncryption is used in an AlgorithmIdentifier,
  22. -- the parameters MUST be present and MUST be NULL.
  23. --
  24. rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 }
  25. --
  26. -- When id-RSAES-OAEP is used in an AlgorithmIdentifier, the
  27. -- parameters MUST be present and MUST be RSAES-OAEP-params.
  28. --
  29. id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 }
  30. --
  31. -- When id-pSpecified is used in an AlgorithmIdentifier, the
  32. -- parameters MUST be an OCTET STRING.
  33. --
  34. id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 }
  35. --
  36. -- When id-RSASSA-PSS is used in an AlgorithmIdentifier, the
  37. -- parameters MUST be present and MUST be RSASSA-PSS-params.
  38. --
  39. id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 }
  40. --
  41. -- When the following OIDs are used in an AlgorithmIdentifier,
  42. -- the parameters MUST be present and MUST be NULL.
  43. --
  44. md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 }
  45. md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 }
  46. sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 }
  47. sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 }
  48. sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 }
  49. sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 }
  50. sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 }
  51. sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 }
  52. sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 }
  53. --
  54. -- When id-mgf1 is used in an AlgorithmIdentifier, the parameters
  55. -- MUST be present and MUST be a HashAlgorithm, for example, sha1.
  56. --
  57. id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 }
  58. -- -------------------------------------------------------------------
  59. -- Taken from https://csrc.nist.gov/projects/computer-security-objects-register/algorithm-registration
  60. id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 }
  61. id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 }
  62. id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 }
  63. id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 }
  64. -- -------------------------------------------------------------------
  65. -- These OID's exist in the codebase but may need to be deprecated at some point.
  66. -- md5_sha1 has been omitted as it does not look like valid entry.
  67. md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 }
  68. ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= {
  69. iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2
  70. }
  71. mdc2WithRSASignature OBJECT IDENTIFIER ::= {
  72. iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14)
  73. }