@@ -8,12 +8,18 @@ use yasna::Tag;
8
8
#[ cfg( feature = "crypto" ) ]
9
9
use crate :: ring_like:: signature:: { self , EcdsaSigningAlgorithm , EdDSAParameters , RsaEncoding } ;
10
10
use crate :: Error ;
11
+ #[ cfg( all( feature = "aws_lc_rs_unstable" , not( feature = "fips" ) ) ) ]
12
+ use aws_lc_rs:: unstable:: signature:: {
13
+ PqdsaSigningAlgorithm , ML_DSA_44_SIGNING , ML_DSA_65_SIGNING , ML_DSA_87_SIGNING ,
14
+ } ;
11
15
12
16
#[ cfg( feature = "crypto" ) ]
13
17
#[ derive( Clone , Copy , Debug ) ]
14
18
pub ( crate ) enum SignAlgo {
15
19
EcDsa ( & ' static EcdsaSigningAlgorithm ) ,
16
20
EdDsa ( & ' static EdDSAParameters ) ,
21
+ #[ cfg( all( feature = "aws_lc_rs_unstable" , not( feature = "fips" ) ) ) ]
22
+ PqDsa ( & ' static PqdsaSigningAlgorithm ) ,
17
23
Rsa ( & ' static dyn RsaEncoding ) ,
18
24
}
19
25
@@ -209,6 +215,36 @@ pub(crate) mod algo {
209
215
oid_components : & [ 1 , 3 , 101 , 112 ] ,
210
216
params : SignatureAlgorithmParams :: None ,
211
217
} ;
218
+
219
+ /// ML-DSA-44 signing as per <https://www.ietf.org/archive/id/draft-ietf-lamps-dilithium-certificates-12.html#name-identifiers>.
220
+ #[ cfg( all( feature = "aws_lc_rs_unstable" , not( feature = "fips" ) ) ) ]
221
+ pub static PKCS_ML_DSA_44 : SignatureAlgorithm = SignatureAlgorithm {
222
+ oids_sign_alg : & [ ML_DSA_44 ] ,
223
+ #[ cfg( all( feature = "crypto" , feature = "aws_lc_rs_unstable" ) ) ]
224
+ sign_alg : SignAlgo :: PqDsa ( & ML_DSA_44_SIGNING ) ,
225
+ oid_components : ML_DSA_44 ,
226
+ params : SignatureAlgorithmParams :: None ,
227
+ } ;
228
+
229
+ /// ML-DSA-44 signing as per <https://www.ietf.org/archive/id/draft-ietf-lamps-dilithium-certificates-12.html#name-identifiers>.
230
+ #[ cfg( all( feature = "aws_lc_rs_unstable" , not( feature = "fips" ) ) ) ]
231
+ pub static PKCS_ML_DSA_65 : SignatureAlgorithm = SignatureAlgorithm {
232
+ oids_sign_alg : & [ ML_DSA_65 ] ,
233
+ #[ cfg( all( feature = "crypto" , feature = "aws_lc_rs_unstable" ) ) ]
234
+ sign_alg : SignAlgo :: PqDsa ( & ML_DSA_65_SIGNING ) ,
235
+ oid_components : ML_DSA_65 ,
236
+ params : SignatureAlgorithmParams :: None ,
237
+ } ;
238
+
239
+ /// ML-DSA-44 signing as per <https://www.ietf.org/archive/id/draft-ietf-lamps-dilithium-certificates-12.html#name-identifiers>.
240
+ #[ cfg( all( feature = "aws_lc_rs_unstable" , not( feature = "fips" ) ) ) ]
241
+ pub static PKCS_ML_DSA_87 : SignatureAlgorithm = SignatureAlgorithm {
242
+ oids_sign_alg : & [ ML_DSA_87 ] ,
243
+ #[ cfg( all( feature = "crypto" , feature = "aws_lc_rs_unstable" ) ) ]
244
+ sign_alg : SignAlgo :: PqDsa ( & ML_DSA_87_SIGNING ) ,
245
+ oid_components : ML_DSA_87 ,
246
+ params : SignatureAlgorithmParams :: None ,
247
+ } ;
212
248
}
213
249
// Signature algorithm IDs as per https://tools.ietf.org/html/rfc4055
214
250
impl SignatureAlgorithm {
0 commit comments