@@ -18,35 +18,33 @@ resolver = "2"
18
18
# Ensure all dependencies + feats are mapped to crate features for correct usage
19
19
# default features often have std breaking no_std and potentially other unwanted
20
20
[dependencies ]
21
- aes = { version = " 0.8.4 " , default-features = false , optional = true }
21
+ # Cryptographic dependencies
22
22
aead = { version = " 0.5.2" , default-features = false , optional = true }
23
+ aes = { version = " 0.8.4" , default-features = false , optional = true }
23
24
aes-gcm = { version = " 0.10.3" , default-features = false , optional = true }
24
- ccm = { version = " 0.5.0" , optional = true , default-features = false }
25
+ ccm = { version = " 0.5.0" , default-features = false , optional = true }
25
26
chacha20poly1305 = { version = " 0.10.1" , default-features = false , optional = true }
26
27
crypto-common = { version = " 0.1.6" , default-features = false }
27
28
der = { version = " 0.7.9" , default-features = false , optional = true }
28
29
digest = { version = " 0.10.7" , default-features = false }
29
30
ecdsa = { version = " 0.16.9" , default-features = false , optional = true }
30
31
ed25519-dalek = { version = " 2" , default-features = false , optional = true }
32
+ elliptic-curve = { version = " 0.13.8" , default-features = false , optional = true }
31
33
hmac = { version = " 0.12.1" , default-features = false }
32
34
p256 = { version = " 0.13.2" , default-features = false , optional = true }
33
35
p384 = { version = " 0.13.0" , default-features = false , optional = true }
34
36
p521 = { version = " 0.13.3" , default-features = false , optional = true }
35
37
pkcs1 = { version = " 0.7.5" , default-features = false , optional = true }
36
- pkcs8 = { version = " 0.10.2" , default-features = false , features = [
37
- " pkcs5" ,
38
- ], optional = true }
39
- rsa = { version = " 0.9.7" , default-features = false , features = [
40
- " sha2" ,
41
- ], optional = true }
38
+ pkcs8 = { version = " 0.10.2" , default-features = false , optional = true }
39
+ rsa = { version = " 0.9.7" , default-features = false , optional = true }
42
40
sec1 = { version = " 0.7.3" , default-features = false , optional = true }
43
41
sha2 = { version = " 0.10.8" , default-features = false }
44
42
signature = { version = " 2.2.0" , default-features = false , optional = true }
43
+ typenum = { version = " 1.17.0" , features = [" no_std" , " const-generics" ] }
45
44
x25519-dalek = { version = " 2" , default-features = false , optional = true }
46
45
47
- getrandom = { version = " 0.2" , default-features = false , features = [
48
- " custom"
49
- ] }
46
+ # External groups
47
+ getrandom = { version = " 0.2" , default-features = false , features = [" custom" ] }
50
48
paste = { version = " 1.0.15" , default-features = false }
51
49
pki-types = { package = " rustls-pki-types" , version = " 1.10.0" , default-features = false }
52
50
rand_core = { version = " 0.6.4" , default-features = false , features = [
@@ -56,32 +54,27 @@ rustls = { version = "0.23.19", default-features = false }
56
54
webpki = { package = " rustls-webpki" , version = " 0.102.8" , default-features = false , optional = true }
57
55
58
56
[target .'cfg(target_arch = "wasm32")' .dependencies ]
59
- getrandom = { version = " 0.2" , features = [
60
- " js"
61
- ] }
57
+ getrandom = { version = " 0.2" , features = [" wasm-bindgen" ] }
62
58
63
59
[dev-dependencies ]
64
60
bytes = { version = " 1.9.0" , default-features = false }
65
- itertools = " 0.13.0"
66
- rsa = { version = " 0.9.7" , default-features = false , features = [
67
- " sha2" ,
68
- ] }
61
+ itertools = { version = " 0.13.0" , default-features = false }
62
+ rsa = { version = " 0.9.7" , default-features = false , features = [" sha2" ] }
69
63
rustls = { version = " 0.23.19" , default-features = false , features = [" std" ] }
70
- sha2 = { version = " 0.10.8" , default-features = false , features = [ " oid " ] }
71
- spki = { version = " 0.7.3" , features = [" alloc" ] }
64
+ sha2 = { version = " 0.10.8" , default-features = false }
65
+ spki = { version = " 0.7.3" , default-features = false , features = [" alloc" ] }
72
66
x509-cert = { version = " 0.2.5" , default-features = false , features = [
73
67
" builder" ,
74
- " pem"
75
68
] }
76
69
77
70
[features ]
78
- default = [" std" , " tls12" , " zeroize" , " full" ]
71
+ default = [" std" , " tls12" , " zeroize" , " full" , " fast " ]
79
72
full = [
80
73
" aead-full" ,
81
- " ecdsa -full" ,
82
- " eddsa -full" ,
74
+ " sign -full" ,
75
+ " verify -full" ,
83
76
" kx-full" ,
84
- " rsa -full" ,
77
+ " hash -full" ,
85
78
" format" ,
86
79
]
87
80
format = [" pem" , " pkcs1" , " pkcs8" , " sec1" ]
@@ -90,69 +83,143 @@ tls12 = ["rustls/tls12"]
90
83
91
84
# RustCrypto is preparing to migrate to core::error::Error
92
85
# and in before most of the use case for std is just std::error::Error
93
- std = [" alloc" ]
94
- alloc = [" ecdsa?/alloc" , " signature?/alloc" ]
86
+ std = [" alloc" , " rustls/std" ]
87
+ alloc = [
88
+ " ecdsa?/alloc" ,
89
+ " elliptic-curve?/alloc" ,
90
+ " pkcs8?/alloc" ,
91
+ " sec1?/alloc" ,
92
+ " signature?/alloc" ,
93
+ ]
94
+ zeroize = [
95
+ " aes-gcm?/zeroize" ,
96
+ " aes?/zeroize" ,
97
+ " der?/zeroize" ,
98
+ " ed25519-dalek?/zeroize" ,
99
+ " pkcs1?/zeroize" ,
100
+ " sec1?/zeroize" ,
101
+ " x25519-dalek?/zeroize" ,
102
+ ]
103
+ subtle = [" digest/subtle" , " pkcs8?/subtle" , " sec1?/subtle" ]
104
+ fast = [
105
+ " ed25519-dalek?/fast" ,
106
+ " rsa?/u64_digit" ,
107
+ " x25519-dalek?/precomputed-tables" ,
108
+ ]
95
109
96
110
nist = []
97
111
p256 = [" dep:p256" , " nist" ]
98
112
p384 = [" dep:p384" , " nist" ]
99
113
p521 = [" dep:p521" , " nist" ]
100
114
ed25519 = [" dep:ed25519-dalek" ]
101
115
102
- verify = [" dep:webpki" ]
103
-
104
- ecdsa = [" dep:ecdsa" , " verify" , " signature" , " rand" , " der" ]
105
- ecdsa-p256 = [" p256" , " p256/ecdsa" , " ecdsa" ]
106
- ecdsa-p384 = [" p384" , " p384/ecdsa" , " ecdsa" ]
107
- ecdsa-p521 = [" p521" , " p521/ecdsa" , " ecdsa" ]
116
+ ecdsa = [" dep:ecdsa" , " verify" , " signature" , " rand" , " der" , " elliptic-curve" ]
117
+ ecdsa-p256 = [" ecdsa" , " p256" , " p256/ecdsa" ]
118
+ ecdsa-p384 = [" ecdsa" , " p384" , " p384/ecdsa" ]
119
+ ecdsa-p521 = [" ecdsa" , " p521" , " p521/ecdsa" ]
108
120
ecdsa-full = [" ecdsa-p256" , " ecdsa-p384" , " ecdsa-p521" ]
109
121
110
- eddsa = [" verify" , " signature" ]
111
- eddsa-ed25519 = [" ed25519 " , " eddsa " ]
122
+ eddsa = [" verify" , " signature" , " elliptic-curve " ]
123
+ eddsa-ed25519 = [" eddsa " , " ed25519 " ]
112
124
eddsa-full = [" eddsa-ed25519" ]
113
125
114
- kx = [" rand" ]
115
- kx-x25519 = [" dep:x25519-dalek" , " kx" ]
116
- kx-p256 = [" p256" , " p256/ecdh" , " kx" ]
117
- kx-p384 = [" p384" , " p384/ecdh" , " kx" ]
118
- kx-p521 = [" p521" , " p521/ecdh" , " kx" ]
126
+ kx = [" rand" , " elliptic-curve" ]
127
+ kx-x25519 = [" kx" , " dep:x25519-dalek" ]
128
+ kx-nist = [" sec1" ]
129
+ kx-p256 = [" kx" , " p256" , " kx-nist" , " p256/ecdh" ]
130
+ kx-p384 = [" kx" , " p384" , " kx-nist" , " p384/ecdh" ]
131
+ kx-p521 = [" kx" , " p521" , " kx-nist" , " p521/ecdh" ]
119
132
kx-full = [" kx-x25519" , " kx-p256" , " kx-p384" , " kx-p521" ]
120
133
121
- rsa = [" dep:rsa" , " rsa/sha2" , " verify " , " signature " , " pkcs1" ]
134
+ rsa = [" dep:rsa" , " rsa/sha2" , " pkcs1" ]
122
135
rsa-pkcs1 = [" rsa" , " pkcs1" ]
123
136
rsa-pss = [" rsa" ]
124
- rsa-full = [" rsa-pkcs1" , " rsa-pss" ]
125
137
126
138
aead = [" dep:aead" ]
127
- aes-gcm = [" dep:aes-gcm" , " aes" , " gcm" , " aead" ]
128
- aes-ccm = [" aes" , " ccm" , " aead" ]
129
- chacha20poly1305 = [" dep:chacha20poly1305" , " aead" ]
130
- aead-full = [" aes-gcm" , " aes-ccm" , " chacha20poly1305" ]
139
+ aead-aes-gcm = [" aead" , " aes-gcm" ]
140
+ aead-aes-ccm = [" aead" , " aes-ccm" ]
141
+ aead-chacha20poly1305 = [" aead" , " chacha20poly1305" ]
142
+ aead-full = [" aead-aes-gcm" , " aead-aes-ccm" , " aead-chacha20poly1305" ]
143
+
144
+ sign = [" signature" , " der" ]
145
+ sign-ecdsa-nist = [" sign" ]
146
+ sign-ecdsa-p256 = [" sign-ecdsa-nist" , " ecdsa-p256" ]
147
+ sign-ecdsa-p384 = [" sign-ecdsa-nist" , " ecdsa-p384" ]
148
+ sign-ecdsa-p521 = [" sign-ecdsa-nist" , " ecdsa-p521" ]
149
+ sign-eddsa = [" sign" ]
150
+ sign-eddsa-ed25519 = [" sign-eddsa" , " eddsa-ed25519" ]
151
+ sign-rsa = [" sign" , " rsa" ]
152
+ sign-rsa-pkcs1 = [" sign-rsa" , " rsa-pkcs1" ]
153
+ sign-rsa-pss = [" sign-rsa" , " rsa-pss" ]
154
+ sign-full = [
155
+ " sign-ecdsa-p256" ,
156
+ " sign-ecdsa-p384" ,
157
+ " sign-ecdsa-p521" ,
158
+ " sign-eddsa-ed25519" ,
159
+ " sign-rsa-pkcs1" ,
160
+ " sign-rsa-pss" ,
161
+ ]
162
+
163
+ verify = [" dep:webpki" ]
164
+ verify-ecdsa-nist = [" verify" ]
165
+ verify-ecdsa-p256 = [" verify-ecdsa-nist" , " ecdsa-p256" ]
166
+ verify-ecdsa-p256-sha256 = [" verify-ecdsa-p256" , " hash-sha256" ]
167
+ verify-ecdsa-p256-sha384 = [" verify-ecdsa-p256" , " hash-sha384" ]
168
+ verify-ecdsa-p384 = [" verify-ecdsa-nist" , " ecdsa-p384" ]
169
+ verify-ecdsa-p384-sha256 = [" verify-ecdsa-p384" , " hash-sha256" ]
170
+ verify-ecdsa-p384-sha384 = [" verify-ecdsa-p384" , " hash-sha384" ]
171
+ verify-eddsa-ed25519 = [" verify" , " eddsa-ed25519" ]
172
+ verify-rsa-pkcs1 = [" verify" , " rsa-pkcs1" ]
173
+ verify-rsa-pkcs1-sha256 = [" verify-rsa-pkcs1" , " hash-sha256" ]
174
+ verify-rsa-pkcs1-sha384 = [" verify-rsa-pkcs1" , " hash-sha384" ]
175
+ verify-rsa-pkcs1-sha512 = [" verify-rsa-pkcs1" , " hash-sha512" ]
176
+ verify-rsa-pss = [" verify" , " rsa-pss" ]
177
+ verify-rsa-pss-sha256 = [" verify-rsa-pss" , " hash-sha256" ]
178
+ verify-rsa-pss-sha384 = [" verify-rsa-pss" , " hash-sha384" ]
179
+ verify-rsa-pss-sha512 = [" verify-rsa-pss" , " hash-sha512" ]
180
+ verify-full = [
181
+ " verify-ecdsa-p256-sha256" ,
182
+ " verify-ecdsa-p256-sha384" ,
183
+ " verify-ecdsa-p384-sha256" ,
184
+ " verify-ecdsa-p384-sha384" ,
185
+ " verify-eddsa-ed25519" ,
186
+ " verify-rsa-pkcs1-sha256" ,
187
+ " verify-rsa-pkcs1-sha384" ,
188
+ " verify-rsa-pkcs1-sha512" ,
189
+ " verify-rsa-pss-sha256" ,
190
+ " verify-rsa-pss-sha384" ,
191
+ " verify-rsa-pss-sha512" ,
192
+ ]
131
193
132
- # TODO
133
194
hash = []
195
+ hash-sha224 = [" hash" ]
134
196
hash-sha256 = [" hash" ]
135
197
hash-sha384 = [" hash" ]
136
198
hash-sha512 = [" hash" ]
137
- hash-full = [" hash-sha256" , " hash-sha384" , " hash-sha512" ]
199
+ hash-full = [" hash-sha224 " , " hash- sha256" , " hash-sha384" , " hash-sha512" ]
138
200
139
201
# Formats
140
202
der = [" dep:der" ]
141
- sec1 = [" dep:sec1" , " der " ]
142
- pem = [" sec1 ?/pem" , " pkcs8 ?/pem" , " p256?/pem " , " p384?/pem " , " p521?/pem " , " der " ]
143
- pkcs1 = [" dep:pkcs1" , " der " ]
203
+ sec1 = [" dep:sec1" , " elliptic-curve?/sec1 " ]
204
+ pem = [" elliptic-curve ?/pem" , " ecdsa ?/pem" ]
205
+ pkcs1 = [" dep:pkcs1" ]
144
206
pkcs8 = [
145
207
" dep:pkcs8" ,
208
+ " ecdsa?/pkcs8" ,
146
209
" ed25519-dalek?/pkcs8" ,
147
- " sec1 ?/pkcs8" ,
210
+ " elliptic-curve ?/pkcs8" ,
148
211
" p256?/pkcs8" ,
149
212
" p384?/pkcs8" ,
150
213
" p521?/pkcs8" ,
151
- " der " ,
214
+ " sec1?/pkcs8 " ,
152
215
]
153
216
154
- signature = [" dep:signature" ]
155
- rand = [" dep:rand_core" , " signature?/rand_core" ]
156
217
aes = [" dep:aes" ]
218
+ aes-ccm = [" aes" , " ccm" ]
219
+ aes-gcm = [" dep:aes-gcm" , " aes" , " gcm" ]
157
220
ccm = [" dep:ccm" ]
158
- gcm = []
221
+ chacha20poly1305 = [" dep:chacha20poly1305" ]
222
+ elliptic-curve = [" dep:elliptic-curve" ]
223
+ gcm = []
224
+ rand = [" dep:rand_core" , " signature?/rand_core" ]
225
+ signature = [" dep:signature" ]
0 commit comments