This PR introduces mlakey-parser in replacement of the crate curve25519-parser.
Indeed, the new hybrid key uses more than a curve 25519 key.
This PR updates the others crates to use the new MLA key format, and add some test key for tests.
A few notes:
contrary to the curve25519-parser which were instaciating a remote crate structure (from x25519-dalek), mlakey-parser imports the crate mla to have a structure representing a public and a private key
for now, ml-kem doesn't not provides Zeroization for its decapsulating key. As a result, the Zeroization of a mla key is only partial
the derivation scheme must be updated or at least justified, tracked by issue #214
no OID has been choose, for now, for ML-KEM keys. As a result, a dedicated, custom OID is used (under the PEN "ANSSI")
for the same reason, no standard ASN.1 format seems to be available to dump hybrid keys. A custom one is then used.
while this PR introduces a way to serialiaze a MLA hybrid key, the actual use of the key is not yet finalized (see #195 , #211 )
The format used to serialize the private key in ASN.1 is the following:
Partially fix #195
This PR introduces
mlakey-parser
in replacement of the cratecurve25519-parser
. Indeed, the new hybrid key uses more than a curve 25519 key.This PR updates the others crates to use the new MLA key format, and add some test key for tests.
A few notes:
curve25519-parser
which were instaciating a remote crate structure (fromx25519-dalek
),mlakey-parser
imports the cratemla
to have a structure representing a public and a private keyml-kem
doesn't not providesZeroization
for its decapsulating key. As a result, theZeroization
of amla
key is only partialThe format used to serialize the private key in ASN.1 is the following:
Or, as a tree:
The two main sequence can be inverted: starting from the MLKEM, then the X/Ed25519 key.