@@ -8,12 +8,18 @@ use yasna::Tag;
88#[ cfg( feature = "crypto" ) ]
99use crate :: ring_like:: signature:: { self , EcdsaSigningAlgorithm , EdDSAParameters , RsaEncoding } ;
1010use 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+ } ;
1115
1216#[ cfg( feature = "crypto" ) ]
1317#[ derive( Clone , Copy , Debug ) ]
1418pub ( crate ) enum SignAlgo {
1519 EcDsa ( & ' static EcdsaSigningAlgorithm ) ,
1620 EdDsa ( & ' static EdDSAParameters ) ,
21+ #[ cfg( all( feature = "aws_lc_rs_unstable" , not( feature = "fips" ) ) ) ]
22+ PqDsa ( & ' static PqdsaSigningAlgorithm ) ,
1723 Rsa ( & ' static dyn RsaEncoding ) ,
1824}
1925
@@ -209,6 +215,36 @@ pub(crate) mod algo {
209215 oid_components : & [ 1 , 3 , 101 , 112 ] ,
210216 params : SignatureAlgorithmParams :: None ,
211217 } ;
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+ } ;
212248}
213249// Signature algorithm IDs as per https://tools.ietf.org/html/rfc4055
214250impl SignatureAlgorithm {
0 commit comments