RustCrypto / KEMs

Collection of Key Encapsulation Mechanisms written in pure Rust
30 stars 15 forks source link

ml-kem: PKCS#8 support #54

Open tarcieri opened 3 months ago

tarcieri commented 3 months ago

This draft appears to have the relevant information to implement PKCS#8 support: https://www.ietf.org/archive/id/draft-ietf-lamps-kyber-certificates-03.html

It should work in conjunction with the OIDs from here: https://csrc.nist.gov/projects/computer-security-objects-register/algorithm-registration

kems OBJECT IDENTIFIER ::= { nistAlgorithms 4 }

[...]

id-alg-ml-kem-512 OBJECT IDENTIFIER ::= { kems 1 }

id-alg-ml-kem-768 OBJECT IDENTIFIER ::= { kems 2}

id-alg-ml-kem-1024 OBJECT IDENTIFIER ::= { kems 3}

Note: the nistAlgorithms OID is 2.16.840.1.101.3.4.

The pkcs8 crate should be sufficient for decoding/encoding PKCS#8 documents, although it would be nice to have some test vectors.