Skip to content

Commit c5fffab

Browse files
committed
Add AlgorithmIdentifiers for ML-DSA variants
1 parent b59e08d commit c5fffab

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed

src/alg_id.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,42 @@ use core::ops::Deref;
88

99
// See src/data/README.md.
1010

11+
/// AlgorithmIdentifier for `id-ml-dsa-44`.
12+
///
13+
/// This is:
14+
///
15+
/// ```text
16+
/// OBJECT_IDENTIFIER { 2.16.840.1.101.3.4.3.17 }
17+
/// ```
18+
///
19+
/// <https://www.ietf.org/archive/id/draft-ietf-lamps-dilithium-certificates-07.html#name-identifiers>
20+
pub const ML_DSA_44: AlgorithmIdentifier =
21+
AlgorithmIdentifier::from_slice(include_bytes!("data/alg-ml-dsa-44.der"));
22+
23+
/// AlgorithmIdentifier for `id-ml-dsa-65`.
24+
///
25+
/// This is:
26+
///
27+
/// ```text
28+
/// OBJECT_IDENTIFIER { 2.16.840.1.101.3.4.3.18 }
29+
/// ```
30+
///
31+
/// <https://www.ietf.org/archive/id/draft-ietf-lamps-dilithium-certificates-07.html#name-identifiers>
32+
pub const ML_DSA_65: AlgorithmIdentifier =
33+
AlgorithmIdentifier::from_slice(include_bytes!("data/alg-ml-dsa-65.der"));
34+
35+
/// AlgorithmIdentifier for `id-ml-dsa-87`.
36+
///
37+
/// This is:
38+
///
39+
/// ```text
40+
/// OBJECT_IDENTIFIER { 2.16.840.1.101.3.4.3.19 }
41+
/// ```
42+
///
43+
/// <https://www.ietf.org/archive/id/draft-ietf-lamps-dilithium-certificates-07.html#name-identifiers>
44+
pub const ML_DSA_87: AlgorithmIdentifier =
45+
AlgorithmIdentifier::from_slice(include_bytes!("data/alg-ml-dsa-87.der"));
46+
1147
/// AlgorithmIdentifier for `id-ecPublicKey` with named curve `secp256r1`.
1248
///
1349
/// This is:

src/data/alg-ml-dsa-44.der

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
 `�He

src/data/alg-ml-dsa-65.der

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
 `�He

src/data/alg-ml-dsa-87.der

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
 `�He

0 commit comments

Comments
 (0)