From 2008dc0dca9cbbbed3b86be25eb1e6bd0321b114 Mon Sep 17 00:00:00 2001 From: John Gray <55205977+johngray-dev@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:35:41 -0500 Subject: [PATCH] Update draft-ietf-lamps-pq-composite-sigs.md --- draft-ietf-lamps-pq-composite-sigs.md | 49 +++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/draft-ietf-lamps-pq-composite-sigs.md b/draft-ietf-lamps-pq-composite-sigs.md index 9753c1d..e194925 100644 --- a/draft-ietf-lamps-pq-composite-sigs.md +++ b/draft-ietf-lamps-pq-composite-sigs.md @@ -706,6 +706,55 @@ Serialization Process: Deserialization reverses this process, raising an error in the event that the input is malformed. +~~~ +Composite-ML-DSA.DeserializeKey(bytes) -> pk + +Explicit Input: + + bytes An encoded public key or private key + +Implicit inputs: + + ML-DSA A placeholder for the specific ML-DSA algorithm and + parameter set to use, for example, could be "ML-DSA-65". + + Trad A placeholder for the specific traditional algorithm and + parameter set to use, for example "RSA" or "ECDSA". + +Output: + + key The composite ML-DSA public key or private key + +Deserialization Process: + + 1. Validate the length of the the input byte string + + if bytes is not the correct length: + output "Deserialization error" + + 2. Parse each constituent encoded key. + The first 3 bytes encodes the length of mldsaEncodedKey, which MAY + be used to separate the mldsaEncodedKey and tradEncodedKey, and then + is to be discarded. + + (mldsaEncodedKey, tradEncodedKey) = bytes + + 3. Deserialize the constituent public or private keys + + mldsaKey = MLDSA.DeserializeKey(mldsaEncodedKey) + tradKey = Trad.DeserializeKey(tradEncodedKey) + + 4. If either ML-DSA.DeserializeKey() or + Trad.DeserializeKey() return an error, + then this process must return an error. + + if NOT mldsaKey or NOT tradKey: + output "Deserialization error" + + 5. Output the composite ML-DSA public key + + output (mldsaPK, tradPK) +~~~ # Composite Key Structures {#sec-composite-structs}