Crypto++ 8.9
Free C++ class library of cryptographic schemes
oids.h
Go to the documentation of this file.
1// oids.h - originally written and placed in the public domain by Wei Dai
2
3/// \file oids.h
4/// \brief ASN.1 object identifiers for algorithms and schemes
5/// \details Most OIDs can be found at http://www.oid-info.com/. The Chinese OIDs
6/// are assigned in GM/T 0006-2012, Cryptographic Application Identifier Criterion
7/// Specification. A reproduction can be found at http://gmssl.org/docs/oid.html.
8/// There seems to be some confusion between the text of GmSSL's oid.html web page
9/// and the actual OID used in the code. We used the same OIDs that were detailed in
10/// http://github.com/guanzhi/GmSSL/blob/master/crypto/objects/objects.txt.
11
12#ifndef CRYPTOPP_OIDS_H
13#define CRYPTOPP_OIDS_H
14
15#include "asn.h"
16
17NAMESPACE_BEGIN(CryptoPP)
18
19NAMESPACE_BEGIN(ASN1)
20
21#define DEFINE_OID(value, name) inline OID name() {return value;}
22
23DEFINE_OID(1, iso)
24 DEFINE_OID(iso()+2, member_body)
25 DEFINE_OID(member_body()+156, iso_cn)
26 DEFINE_OID(iso_cn()+10197, oscca)
27 DEFINE_OID(oscca()+1, sm_scheme)
28 DEFINE_OID(sm_scheme()+104, sms4)
29 DEFINE_OID(sm_scheme()+301, sm2p256v1)
30 DEFINE_OID(sm2p256v1()+1, sm2sign)
31 DEFINE_OID(sm2p256v1()+2, sm2exchange)
32 DEFINE_OID(sm2p256v1()+3, sm2encrypt)
33 DEFINE_OID(sm2encrypt()+1, sm2encrypt_recommendedParameters)
34 DEFINE_OID(sm2encrypt()+2, sm2encrypt_specifiedParameters)
35 DEFINE_OID(member_body()+840, iso_us)
36 DEFINE_OID(iso_us()+10040, ansi_x9_57)
37 DEFINE_OID(ansi_x9_57()+4, ansi_x9cm)
38 DEFINE_OID(ansi_x9cm()+1, id_dsa)
39 DEFINE_OID(iso_us()+10045, ansi_x9_62)
40 DEFINE_OID(ansi_x9_62()+1, id_fieldType)
41 DEFINE_OID(id_fieldType()+1, prime_field)
42 DEFINE_OID(id_fieldType()+2, characteristic_two_field)
43 DEFINE_OID(characteristic_two_field()+3, id_characteristic_two_basis)
44 DEFINE_OID(id_characteristic_two_basis()+1, gnBasis)
45 DEFINE_OID(id_characteristic_two_basis()+2, tpBasis)
46 DEFINE_OID(id_characteristic_two_basis()+3, ppBasis)
47 DEFINE_OID(ansi_x9_62()+2, id_publicKeyType)
48 DEFINE_OID(id_publicKeyType()+1, id_ecPublicKey)
49 DEFINE_OID(ansi_x9_62()+3, ansi_x9_62_curves)
50 DEFINE_OID(ansi_x9_62_curves()+1, ansi_x9_62_curves_prime)
51 // ANSI X9.62
52 DEFINE_OID(ansi_x9_62_curves_prime()+1, secp192r1) // secp192v1
53 //DEFINE_OID(ansi_x9_62_curves_prime()+2, secp192v2)
54 //DEFINE_OID(ansi_x9_62_curves_prime()+3, secp192v3)
55 //DEFINE_OID(ansi_x9_62_curves_prime()+4, secp239v1)
56 //DEFINE_OID(ansi_x9_62_curves_prime()+5, secp239v2)
57 //DEFINE_OID(ansi_x9_62_curves_prime()+6, secp239v3)
58 DEFINE_OID(ansi_x9_62_curves_prime()+7, secp256r1) // secp256v1
59 DEFINE_OID(ansi_x9_62()+4, ansi_signatures)
60 DEFINE_OID(ansi_signatures()+3, ecdsa_with_sha2)
61 DEFINE_OID(ecdsa_with_sha2()+1, ecdsa_with_sha224)
62 DEFINE_OID(ecdsa_with_sha2()+2, ecdsa_with_sha256)
63 DEFINE_OID(ecdsa_with_sha2()+3, ecdsa_with_sha384)
64 DEFINE_OID(ecdsa_with_sha2()+4, ecdsa_with_sha512)
65 DEFINE_OID(iso_us()+113549, rsadsi)
66 DEFINE_OID(rsadsi()+1, pkcs)
67 DEFINE_OID(pkcs()+1, pkcs_1)
68 // Arc from PKCS #1 and RFC 2459
69 DEFINE_OID(pkcs_1()+1, rsaEncryption)
70 DEFINE_OID(pkcs_1()+2, md2WithRSAEncryption)
71 DEFINE_OID(pkcs_1()+3, md4withRSAEncryption)
72 DEFINE_OID(pkcs_1()+4, md5WithRSAEncryption)
73 DEFINE_OID(pkcs_1()+5, sha1WithRSAEncryption)
74 DEFINE_OID(pkcs_1()+10, rsassa_pss)
75 DEFINE_OID(pkcs_1()+11, sha256WithRSAEncryption)
76 DEFINE_OID(pkcs_1()+12, sha384WithRSAEncryption)
77 DEFINE_OID(pkcs_1()+13, sha512WithRSAEncryption)
78 DEFINE_OID(pkcs_1()+14, sha224WithRSAEncryption)
79 DEFINE_OID(pkcs_1()+15, sha512_224WithRSAEncryption)
80 DEFINE_OID(pkcs_1()+16, sha512_256WithRSAEncryption)
81 DEFINE_OID(rsadsi()+2, rsadsi_digestAlgorithm)
82 DEFINE_OID(rsadsi_digestAlgorithm()+2, id_md2)
83 DEFINE_OID(rsadsi_digestAlgorithm()+5, id_md5)
84 DEFINE_OID(iso()+3, identified_organization)
85 // Arc from http://tools.ietf.org/html/draft-josefsson-pkix-newcurves
86 // GNU and OpenPGP uses 1.3.6.1.4.1.11591.15.1 for Ed25519. See
87 // https://www.gnu.org/prep/standards/html_node/OID-Allocations.html,
88 // https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-rfc4880bis
89 DEFINE_OID(identified_organization()+6, dod)
90 DEFINE_OID(dod()+1, internet)
91 DEFINE_OID(internet()+4, internet_private)
92 DEFINE_OID(internet_private()+1, enterprise)
93 DEFINE_OID(enterprise()+11591,gnu)
94 DEFINE_OID(gnu()+15,ellipticCurve)
95 DEFINE_OID(ellipticCurve()+1,curve25519)
96 DEFINE_OID(ellipticCurve()+2,curve448)
97 DEFINE_OID(ellipticCurve()+3,curve25519ph)
98 DEFINE_OID(ellipticCurve()+4,curve448ph)
99 DEFINE_OID(identified_organization()+14, oiw)
100 DEFINE_OID(oiw()+3, oiw_secsig)
101 DEFINE_OID(oiw_secsig()+2, oiw_secsig_algorithms)
102 DEFINE_OID(oiw_secsig_algorithms()+26, id_sha1)
103 DEFINE_OID(oiw()+7, dssig)
104 DEFINE_OID(dssig()+2, algorithm)
105 DEFINE_OID(algorithm()+1, encryptionAlgorithm)
106 DEFINE_OID(encryptionAlgorithm()+1, elGamal)
107 DEFINE_OID(identified_organization()+36, teletrust)
108 DEFINE_OID(teletrust()+3, teletrust_algorithm)
109 DEFINE_OID(teletrust_algorithm()+2+1, id_ripemd160)
110 DEFINE_OID(teletrust_algorithm()+3+2+8+1, teletrust_ellipticCurve)
111 DEFINE_OID(teletrust_ellipticCurve()+1+1, brainpoolP160r1)
112 DEFINE_OID(teletrust_ellipticCurve()+1+3, brainpoolP192r1)
113 DEFINE_OID(teletrust_ellipticCurve()+1+5, brainpoolP224r1)
114 DEFINE_OID(teletrust_ellipticCurve()+1+7, brainpoolP256r1)
115 DEFINE_OID(teletrust_ellipticCurve()+1+9, brainpoolP320r1)
116 DEFINE_OID(teletrust_ellipticCurve()+1+11, brainpoolP384r1)
117 DEFINE_OID(teletrust_ellipticCurve()+1+13, brainpoolP512r1)
118 // https://tools.ietf.org/html/draft-ietf-curdle-pkix-07
119 DEFINE_OID(identified_organization()+101, thawte)
120 DEFINE_OID(thawte()+110, X25519)
121 DEFINE_OID(thawte()+111, X448)
122 DEFINE_OID(thawte()+112, Ed25519)
123 DEFINE_OID(thawte()+113, Ed448)
124 DEFINE_OID(identified_organization()+132, certicom)
125 DEFINE_OID(certicom()+0, certicom_ellipticCurve)
126 // these are sorted by curve type and then by OID
127 // first curves based on GF(p)
128 DEFINE_OID(certicom_ellipticCurve()+6, secp112r1)
129 DEFINE_OID(certicom_ellipticCurve()+7, secp112r2)
130 DEFINE_OID(certicom_ellipticCurve()+8, secp160r1)
131 DEFINE_OID(certicom_ellipticCurve()+9, secp160k1)
132 DEFINE_OID(certicom_ellipticCurve()+10, secp256k1)
133 DEFINE_OID(certicom_ellipticCurve()+28, secp128r1)
134 DEFINE_OID(certicom_ellipticCurve()+29, secp128r2)
135 DEFINE_OID(certicom_ellipticCurve()+30, secp160r2)
136 DEFINE_OID(certicom_ellipticCurve()+31, secp192k1)
137 DEFINE_OID(certicom_ellipticCurve()+32, secp224k1)
138 DEFINE_OID(certicom_ellipticCurve()+33, secp224r1)
139 DEFINE_OID(certicom_ellipticCurve()+34, secp384r1)
140 DEFINE_OID(certicom_ellipticCurve()+35, secp521r1)
141 // then curves based on GF(2^n)
142 DEFINE_OID(certicom_ellipticCurve()+1, sect163k1)
143 DEFINE_OID(certicom_ellipticCurve()+2, sect163r1)
144 DEFINE_OID(certicom_ellipticCurve()+3, sect239k1)
145 DEFINE_OID(certicom_ellipticCurve()+4, sect113r1)
146 DEFINE_OID(certicom_ellipticCurve()+5, sect113r2)
147 DEFINE_OID(certicom_ellipticCurve()+15, sect163r2)
148 DEFINE_OID(certicom_ellipticCurve()+16, sect283k1)
149 DEFINE_OID(certicom_ellipticCurve()+17, sect283r1)
150 DEFINE_OID(certicom_ellipticCurve()+22, sect131r1)
151 DEFINE_OID(certicom_ellipticCurve()+23, sect131r2)
152 DEFINE_OID(certicom_ellipticCurve()+24, sect193r1)
153 DEFINE_OID(certicom_ellipticCurve()+25, sect193r2)
154 DEFINE_OID(certicom_ellipticCurve()+26, sect233k1)
155 DEFINE_OID(certicom_ellipticCurve()+27, sect233r1)
156 DEFINE_OID(certicom_ellipticCurve()+36, sect409k1)
157 DEFINE_OID(certicom_ellipticCurve()+37, sect409r1)
158 DEFINE_OID(certicom_ellipticCurve()+38, sect571k1)
159 DEFINE_OID(certicom_ellipticCurve()+39, sect571r1)
160DEFINE_OID(2, joint_iso_ccitt)
161 DEFINE_OID(joint_iso_ccitt()+16, country)
162 DEFINE_OID(country()+840, joint_iso_ccitt_us)
163 DEFINE_OID(joint_iso_ccitt_us()+1, us_organization)
164 DEFINE_OID(us_organization()+101, us_gov)
165 DEFINE_OID(us_gov()+3, csor)
166 DEFINE_OID(csor()+4, nistalgorithms)
167 DEFINE_OID(nistalgorithms()+1, aes)
168 DEFINE_OID(aes()+1, id_aes128_ECB)
169 DEFINE_OID(aes()+2, id_aes128_cbc)
170 DEFINE_OID(aes()+3, id_aes128_ofb)
171 DEFINE_OID(aes()+4, id_aes128_cfb)
172 DEFINE_OID(aes()+21, id_aes192_ECB)
173 DEFINE_OID(aes()+22, id_aes192_cbc)
174 DEFINE_OID(aes()+23, id_aes192_ofb)
175 DEFINE_OID(aes()+24, id_aes192_cfb)
176 DEFINE_OID(aes()+41, id_aes256_ECB)
177 DEFINE_OID(aes()+42, id_aes256_cbc)
178 DEFINE_OID(aes()+43, id_aes256_ofb)
179 DEFINE_OID(aes()+44, id_aes256_cfb)
180 DEFINE_OID(nistalgorithms()+2, nist_hashalgs)
181 DEFINE_OID(nist_hashalgs()+1, id_sha256)
182 DEFINE_OID(nist_hashalgs()+2, id_sha384)
183 DEFINE_OID(nist_hashalgs()+3, id_sha512)
184 DEFINE_OID(nist_hashalgs()+4, id_sha224)
185 DEFINE_OID(nist_hashalgs()+7, id_sha3_224)
186 DEFINE_OID(nist_hashalgs()+8, id_sha3_256)
187 DEFINE_OID(nist_hashalgs()+9, id_sha3_384)
188 DEFINE_OID(nist_hashalgs()+10, id_sha3_512)
189 DEFINE_OID(joint_iso_ccitt_us()+10046, ansi_x942)
190 DEFINE_OID(ansi_x942()+2, number_type)
191 DEFINE_OID(number_type()+1, dhpublicnumber)
192
193NAMESPACE_END
194
195NAMESPACE_END
196
197#endif
Classes and functions for working with ANS.1 objects.
Crypto++ library namespace.