module

CrystalCryptoSamples::HybridCeremony

Orchestrates the Phase 2 hybrid classical (X25519 + Ed25519) and post-quantum (ML-KEM-768 + ML-DSA-65) canonical CBOR ceremony.

Constants

KDF_DOMAIN_LABEL = "EVALINUX-HYBRID-KEM-V1"

Canonical domain-separation prefix for the SHA-256 hybrid KDF combiner.

TRANSCRIPT_LABEL = "EVALINUX-HYBRID-V1"

Canonical domain-separation context string for the hybrid transcript.

Class methods

encode_assertion(transcript_cbor : Bytes, ed_sig : Bytes, dsa_sig : Bytes) : Bytes

Encodes the canonical integer-keyed CBOR dual-signature assertion map.

Source
encode_transcript(x25519_pub : Bytes, mlkem_pub : Bytes, mlkem_ct : Bytes) : Bytes

Encodes the canonical integer-keyed CBOR public-key transcript map.

Source
run(io : IO = STDOUT) : Nil

Executes the complete hybrid KEM KDF and dual-signature CBOR ceremony.

Source
verify_decoded_assertion(assertion_cbor : Bytes, ed : Crystal::Ecc::Constant::Ed25519KeyPair, dsa : Crystal::Pqc::Constant::MLDSAKeyPair, ctx : Bytes = TRANSCRIPT_LABEL.to_slice) : Bool

Decodes a canonical CBOR dual-signature assertion map and verifies both the classical Ed25519 and post-quantum ML-DSA-65 signatures.

Source