Skip to main content

Module share_encoding

Module share_encoding 

Source
Expand description

CRY-02.03 PARTIAL — freeze responder-share wire encoding and ML-KEM-then-X25519 IKM.

Draft until FND-03 freeze: responder share wire bytes are exactly ml_kem_ct || x25519_pk with no version prefix. Initiator share encoding lives in pq_handshake; this module owns the responder half and the hybrid IKM concat used as HKDF input.

CRY-02.12 remainder: a live ML-KEM-768 encapsulate/decapsulate round-trip is exercised in tests. That ciphertext is not a frozen hex vector — encapsulate draws OS RNG, so ct bytes change every run. Do not treat live KEM ciphertext as a conformance fixture. Dual proofs, record vectors, and length-delimited transcripts remain open. No security proof is claimed.

Crypto stays below net::qdnf: this module uses raw arrays only.

Constants§

RESPONDER_SHARE_WIRE_LEN
Exact responder-share slice length: ML_KEM_768_CT_LEN || X25519_LEN.

Functions§

decode_responder_share
Decode responder share from ml_kem_ct || x25519_pk.
encode_responder_share
Encode responder share as ml_kem_ct || x25519_pk (draft; no version byte).
hybrid_ikm
Concatenate ML-KEM shared secret then X25519 shared secret (HKDF IKM order).
responder_share_has_version_prefix
Draft encoding has no version prefix on responder-share wire bytes.