DER writer: Add the possibility to abandon empty SEQUENCEs
[openssl.git] / providers / common / der / RSA.asn1
1 -- -------------------------------------------------------------------
2 -- Taken from RFC 8017, Appendix C
3 -- (https://www.rfc-editor.org/rfc/rfc8017.html#appendix-C)
4
5 -- ============================
6 --   Basic object identifiers
7 -- ============================
8
9 -- The DER encoding of this in hexadecimal is:
10 -- (0x)06 08
11 --        2A 86 48 86 F7 0D 01 01
12 --
13 pkcs-1    OBJECT IDENTIFIER ::= {
14     iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1
15 }
16
17 --
18 -- When rsaEncryption is used in an AlgorithmIdentifier,
19 -- the parameters MUST be present and MUST be NULL.
20 --
21 rsaEncryption    OBJECT IDENTIFIER ::= { pkcs-1 1 }
22
23 --
24 -- When id-RSAES-OAEP is used in an AlgorithmIdentifier, the
25 -- parameters MUST be present and MUST be RSAES-OAEP-params.
26 --
27 id-RSAES-OAEP    OBJECT IDENTIFIER ::= { pkcs-1 7 }
28
29 --
30 -- When id-pSpecified is used in an AlgorithmIdentifier, the
31 -- parameters MUST be an OCTET STRING.
32 --
33 id-pSpecified    OBJECT IDENTIFIER ::= { pkcs-1 9 }
34
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 --
42 -- When the following OIDs are used in an AlgorithmIdentifier,
43 -- the parameters MUST be present and MUST be NULL.
44 --
45 md2WithRSAEncryption         OBJECT IDENTIFIER ::= { pkcs-1 2 }
46 md5WithRSAEncryption         OBJECT IDENTIFIER ::= { pkcs-1 4 }
47 sha1WithRSAEncryption        OBJECT IDENTIFIER ::= { pkcs-1 5 }
48 sha224WithRSAEncryption      OBJECT IDENTIFIER ::= { pkcs-1 14 }
49 sha256WithRSAEncryption      OBJECT IDENTIFIER ::= { pkcs-1 11 }
50 sha384WithRSAEncryption      OBJECT IDENTIFIER ::= { pkcs-1 12 }
51 sha512WithRSAEncryption      OBJECT IDENTIFIER ::= { pkcs-1 13 }
52 sha512-224WithRSAEncryption  OBJECT IDENTIFIER ::= { pkcs-1 15 }
53 sha512-256WithRSAEncryption  OBJECT IDENTIFIER ::= { pkcs-1 16 }
54
55 --
56 -- This OID really belongs in a module with the secsig OIDs.
57 --
58 id-sha1    OBJECT IDENTIFIER ::= {
59     iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2)
60     26
61 }
62
63 --
64 -- OIDs for MD2 and MD5, allowed only in EMSA-PKCS1-v1_5.
65 --
66 id-md2 OBJECT IDENTIFIER ::= {
67     iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2
68 }
69
70 id-md5 OBJECT IDENTIFIER ::= {
71     iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5
72 }
73
74 --
75 -- When id-mgf1 is used in an AlgorithmIdentifier, the parameters
76 -- MUST be present and MUST be a HashAlgorithm, for example, sha1.
77 --
78 id-mgf1    OBJECT IDENTIFIER ::= { pkcs-1 8 }
79
80 -- -------------------------------------------------------------------
81 -- Taken from https://csrc.nist.gov/projects/computer-security-objects-register/algorithm-registration
82
83 sigAlgs OBJECT IDENTIFIER ::= { 2 16 840 1 101 3 4 3 }
84
85 id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 }
86 id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 }
87 id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 }
88 id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 }
89
90
91 -- -------------------------------------------------------------------
92 -- These OID's exist in the codebase but may need to be deprecated at some point.
93 -- mdc2 and md5_sha1 have been omitted as they do not look like valid entries.
94
95 md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 }
96
97 ripemd160WithRSAEncryption    OBJECT IDENTIFIER ::= {
98     iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2
99 }