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_rsa.h
107435 views
1
/*
2
* WARNING: do not edit!
3
* Generated by Makefile from providers/common/include/prov/der_rsa.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/rsa.h"
14
#include "internal/der.h"
15
16
/* Well known OIDs precompiled */
17
/* clang-format off */
18
19
/*
20
* hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 }
21
*/
22
#define DER_OID_V_hashAlgs DER_P_OBJECT, 8, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02
23
#define DER_OID_SZ_hashAlgs 10
24
extern const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs];
25
26
/*
27
* rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 }
28
*/
29
#define DER_OID_V_rsaEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01
30
#define DER_OID_SZ_rsaEncryption 11
31
extern const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption];
32
33
/*
34
* id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 }
35
*/
36
#define DER_OID_V_id_RSAES_OAEP DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x07
37
#define DER_OID_SZ_id_RSAES_OAEP 11
38
extern const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP];
39
40
/*
41
* id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 }
42
*/
43
#define DER_OID_V_id_pSpecified DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x09
44
#define DER_OID_SZ_id_pSpecified 11
45
extern const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified];
46
47
/*
48
* id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 }
49
*/
50
#define DER_OID_V_id_RSASSA_PSS DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0A
51
#define DER_OID_SZ_id_RSASSA_PSS 11
52
extern const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS];
53
54
/*
55
* md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 }
56
*/
57
#define DER_OID_V_md2WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x02
58
#define DER_OID_SZ_md2WithRSAEncryption 11
59
extern const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption];
60
61
/*
62
* md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 }
63
*/
64
#define DER_OID_V_md5WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x04
65
#define DER_OID_SZ_md5WithRSAEncryption 11
66
extern const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption];
67
68
/*
69
* sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 }
70
*/
71
#define DER_OID_V_sha1WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05
72
#define DER_OID_SZ_sha1WithRSAEncryption 11
73
extern const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption];
74
75
/*
76
* sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 }
77
*/
78
#define DER_OID_V_sha224WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0E
79
#define DER_OID_SZ_sha224WithRSAEncryption 11
80
extern const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption];
81
82
/*
83
* sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 }
84
*/
85
#define DER_OID_V_sha256WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B
86
#define DER_OID_SZ_sha256WithRSAEncryption 11
87
extern const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption];
88
89
/*
90
* sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 }
91
*/
92
#define DER_OID_V_sha384WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0C
93
#define DER_OID_SZ_sha384WithRSAEncryption 11
94
extern const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption];
95
96
/*
97
* sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 }
98
*/
99
#define DER_OID_V_sha512WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0D
100
#define DER_OID_SZ_sha512WithRSAEncryption 11
101
extern const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption];
102
103
/*
104
* sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 }
105
*/
106
#define DER_OID_V_sha512_224WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0F
107
#define DER_OID_SZ_sha512_224WithRSAEncryption 11
108
extern const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption];
109
110
/*
111
* sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 }
112
*/
113
#define DER_OID_V_sha512_256WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x10
114
#define DER_OID_SZ_sha512_256WithRSAEncryption 11
115
extern const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption];
116
117
/*
118
* id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 }
119
*/
120
#define DER_OID_V_id_mgf1 DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x08
121
#define DER_OID_SZ_id_mgf1 11
122
extern const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1];
123
124
/*
125
* id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 }
126
*/
127
#define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0D
128
#define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224 11
129
extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224];
130
131
/*
132
* id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 }
133
*/
134
#define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0E
135
#define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256 11
136
extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256];
137
138
/*
139
* id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 }
140
*/
141
#define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0F
142
#define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384 11
143
extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384];
144
145
/*
146
* id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 }
147
*/
148
#define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x10
149
#define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512 11
150
extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512];
151
152
/*
153
* md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 }
154
*/
155
#define DER_OID_V_md4WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x03
156
#define DER_OID_SZ_md4WithRSAEncryption 11
157
extern const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption];
158
159
/*
160
* ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= {
161
* iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2
162
* }
163
*/
164
#define DER_OID_V_ripemd160WithRSAEncryption DER_P_OBJECT, 6, 0x2B, 0x24, 0x03, 0x03, 0x01, 0x02
165
#define DER_OID_SZ_ripemd160WithRSAEncryption 8
166
extern const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption];
167
168
/*
169
* mdc2WithRSASignature OBJECT IDENTIFIER ::= {
170
* iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14)
171
* }
172
*/
173
#define DER_OID_V_mdc2WithRSASignature DER_P_OBJECT, 5, 0x2B, 0x0E, 0x03, 0x02, 0x0E
174
#define DER_OID_SZ_mdc2WithRSASignature 7
175
extern const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature];
176
177
/* clang-format on */
178
179
/* PSS parameters */
180
int ossl_DER_w_RSASSA_PSS_params(WPACKET *pkt, int tag,
181
const RSA_PSS_PARAMS_30 *pss);
182
/* Subject Public Key Info */
183
int ossl_DER_w_algorithmIdentifier_RSA(WPACKET *pkt, int tag, RSA *rsa);
184
int ossl_DER_w_algorithmIdentifier_RSA_PSS(WPACKET *pkt, int tag,
185
int rsa_type,
186
const RSA_PSS_PARAMS_30 *pss);
187
/* Signature */
188
int ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption(WPACKET *pkt, int tag,
189
int mdnid);
190
191