Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/crypto/openssl/providers/common/include/prov/der_ec.h
107173 views
1
/*
2
* WARNING: do not edit!
3
* Generated by Makefile from providers/common/include/prov/der_ec.h.in
4
*
5
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
6
*
7
* Licensed under the Apache License 2.0 (the "License"). You may not use
8
* this file except in compliance with the License. You can obtain a copy
9
* in the file LICENSE in the source distribution or at
10
* https://www.openssl.org/source/license.html
11
*/
12
13
#include "crypto/ec.h"
14
#include "internal/der.h"
15
16
/* Well known OIDs precompiled */
17
/* clang-format off */
18
19
/*
20
* ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 }
21
*/
22
#define DER_OID_V_ecdsa_with_SHA1 DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x01
23
#define DER_OID_SZ_ecdsa_with_SHA1 9
24
extern const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1];
25
26
/*
27
* id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 }
28
*/
29
#define DER_OID_V_id_ecPublicKey DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01
30
#define DER_OID_SZ_id_ecPublicKey 9
31
extern const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey];
32
33
/*
34
* c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 }
35
*/
36
#define DER_OID_V_c2pnb163v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x01
37
#define DER_OID_SZ_c2pnb163v1 10
38
extern const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1];
39
40
/*
41
* c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 }
42
*/
43
#define DER_OID_V_c2pnb163v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x02
44
#define DER_OID_SZ_c2pnb163v2 10
45
extern const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2];
46
47
/*
48
* c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 }
49
*/
50
#define DER_OID_V_c2pnb163v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x03
51
#define DER_OID_SZ_c2pnb163v3 10
52
extern const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3];
53
54
/*
55
* c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 }
56
*/
57
#define DER_OID_V_c2pnb176w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x04
58
#define DER_OID_SZ_c2pnb176w1 10
59
extern const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1];
60
61
/*
62
* c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 }
63
*/
64
#define DER_OID_V_c2tnb191v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x05
65
#define DER_OID_SZ_c2tnb191v1 10
66
extern const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1];
67
68
/*
69
* c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 }
70
*/
71
#define DER_OID_V_c2tnb191v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x06
72
#define DER_OID_SZ_c2tnb191v2 10
73
extern const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2];
74
75
/*
76
* c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 }
77
*/
78
#define DER_OID_V_c2tnb191v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x07
79
#define DER_OID_SZ_c2tnb191v3 10
80
extern const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3];
81
82
/*
83
* c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 }
84
*/
85
#define DER_OID_V_c2onb191v4 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x08
86
#define DER_OID_SZ_c2onb191v4 10
87
extern const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4];
88
89
/*
90
* c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 }
91
*/
92
#define DER_OID_V_c2onb191v5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x09
93
#define DER_OID_SZ_c2onb191v5 10
94
extern const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5];
95
96
/*
97
* c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 }
98
*/
99
#define DER_OID_V_c2pnb208w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0A
100
#define DER_OID_SZ_c2pnb208w1 10
101
extern const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1];
102
103
/*
104
* c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 }
105
*/
106
#define DER_OID_V_c2tnb239v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0B
107
#define DER_OID_SZ_c2tnb239v1 10
108
extern const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1];
109
110
/*
111
* c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 }
112
*/
113
#define DER_OID_V_c2tnb239v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0C
114
#define DER_OID_SZ_c2tnb239v2 10
115
extern const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2];
116
117
/*
118
* c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 }
119
*/
120
#define DER_OID_V_c2tnb239v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0D
121
#define DER_OID_SZ_c2tnb239v3 10
122
extern const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3];
123
124
/*
125
* c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 }
126
*/
127
#define DER_OID_V_c2onb239v4 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0E
128
#define DER_OID_SZ_c2onb239v4 10
129
extern const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4];
130
131
/*
132
* c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 }
133
*/
134
#define DER_OID_V_c2onb239v5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0F
135
#define DER_OID_SZ_c2onb239v5 10
136
extern const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5];
137
138
/*
139
* c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 }
140
*/
141
#define DER_OID_V_c2pnb272w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x10
142
#define DER_OID_SZ_c2pnb272w1 10
143
extern const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1];
144
145
/*
146
* c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 }
147
*/
148
#define DER_OID_V_c2pnb304w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x11
149
#define DER_OID_SZ_c2pnb304w1 10
150
extern const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1];
151
152
/*
153
* c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 }
154
*/
155
#define DER_OID_V_c2tnb359v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x12
156
#define DER_OID_SZ_c2tnb359v1 10
157
extern const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1];
158
159
/*
160
* c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 }
161
*/
162
#define DER_OID_V_c2pnb368w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x13
163
#define DER_OID_SZ_c2pnb368w1 10
164
extern const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1];
165
166
/*
167
* c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 }
168
*/
169
#define DER_OID_V_c2tnb431r1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x14
170
#define DER_OID_SZ_c2tnb431r1 10
171
extern const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1];
172
173
/*
174
* prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 }
175
*/
176
#define DER_OID_V_prime192v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x01
177
#define DER_OID_SZ_prime192v1 10
178
extern const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1];
179
180
/*
181
* prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 }
182
*/
183
#define DER_OID_V_prime192v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x02
184
#define DER_OID_SZ_prime192v2 10
185
extern const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2];
186
187
/*
188
* prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 }
189
*/
190
#define DER_OID_V_prime192v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x03
191
#define DER_OID_SZ_prime192v3 10
192
extern const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3];
193
194
/*
195
* prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 }
196
*/
197
#define DER_OID_V_prime239v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x04
198
#define DER_OID_SZ_prime239v1 10
199
extern const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1];
200
201
/*
202
* prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 }
203
*/
204
#define DER_OID_V_prime239v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x05
205
#define DER_OID_SZ_prime239v2 10
206
extern const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2];
207
208
/*
209
* prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 }
210
*/
211
#define DER_OID_V_prime239v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x06
212
#define DER_OID_SZ_prime239v3 10
213
extern const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3];
214
215
/*
216
* prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 }
217
*/
218
#define DER_OID_V_prime256v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07
219
#define DER_OID_SZ_prime256v1 10
220
extern const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1];
221
222
/*
223
* ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
224
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 }
225
*/
226
#define DER_OID_V_ecdsa_with_SHA224 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x01
227
#define DER_OID_SZ_ecdsa_with_SHA224 10
228
extern const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224];
229
230
/*
231
* ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
232
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 }
233
*/
234
#define DER_OID_V_ecdsa_with_SHA256 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02
235
#define DER_OID_SZ_ecdsa_with_SHA256 10
236
extern const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256];
237
238
/*
239
* ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
240
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 }
241
*/
242
#define DER_OID_V_ecdsa_with_SHA384 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x03
243
#define DER_OID_SZ_ecdsa_with_SHA384 10
244
extern const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384];
245
246
/*
247
* ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
248
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 }
249
*/
250
#define DER_OID_V_ecdsa_with_SHA512 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x04
251
#define DER_OID_SZ_ecdsa_with_SHA512 10
252
extern const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512];
253
254
/*
255
* id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 }
256
*/
257
#define DER_OID_V_id_ecdsa_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x09
258
#define DER_OID_SZ_id_ecdsa_with_sha3_224 11
259
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224];
260
261
/*
262
* id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 }
263
*/
264
#define DER_OID_V_id_ecdsa_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0A
265
#define DER_OID_SZ_id_ecdsa_with_sha3_256 11
266
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256];
267
268
/*
269
* id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 }
270
*/
271
#define DER_OID_V_id_ecdsa_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0B
272
#define DER_OID_SZ_id_ecdsa_with_sha3_384 11
273
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384];
274
275
/*
276
* id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 }
277
*/
278
#define DER_OID_V_id_ecdsa_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0C
279
#define DER_OID_SZ_id_ecdsa_with_sha3_512 11
280
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512];
281
282
/* clang-format on */
283
284
/* Subject Public Key Info */
285
int ossl_DER_w_algorithmIdentifier_EC(WPACKET *pkt, int cont, EC_KEY *ec);
286
/* Signature */
287
int ossl_DER_w_algorithmIdentifier_ECDSA_with_MD(WPACKET *pkt, int cont,
288
EC_KEY *ec, int mdnid);
289
290