Skip to main content

Module xwing

Module xwing 

Source
Expand description

X-Wing general-purpose hybrid post-quantum KEM (ML-KEM-768 + X25519) conforming to draft-connolly-cfrg-xwing-kem-11 (IRTF CFRG Internet-Draft, revision -11).

§Specification Notes (draft-connolly-cfrg-xwing-kem-11)

  • Status: Internet-Draft (not yet an RFC); wire format and combiner match revision -11 (XWingLabel = 0x5c2e2f2f5e5c appended at the end of the SHA3-256 combiner input) and are verified against all official test vectors in spec/test-vectors.json.

§Wire Sizes

  • Encapsulation (public) key: 1,216 bytes (pk_M[1184] || pk_X[32])
  • Decapsulation (private) key: 32 bytes (root seed sk, expanded via SHAKE256(sk, 96))
  • Ciphertext: 1,120 bytes (ct_M[1088] || ct_X[32])
  • Shared secret: 32 bytes (SHA3-256(ss_M || ss_X || ct_X || pk_X || 0x5c2e2f2f5e5c))

Modules§

hazmat
Deterministic X-Wing internal algorithms (GenerateKeyPairDerand / EncapsulateDerand) for specification test-vector validation (requires Cargo feature hazmat).

Structs§

Ciphertext
X-Wing encapsulated ciphertext (ct_M || ct_X, 1,120 bytes).
DecapsulationKey
X-Wing compact decapsulation (private) key (32-byte root seed).
EncapsulationKey
Validated X-Wing encapsulation (public) key (pk_M || pk_X, 1,216 bytes).
XWing
X-Wing hybrid KEM (ML-KEM-768 + X25519) implementing quantaegis_core::Kem.

Constants§

CT_LEN
Ciphertext length in bytes (1088 + 32 = 1120).
DK_LEN
Decapsulation (private) key seed length in bytes (32).
EK_LEN
Encapsulation (public) key length in bytes (1184 + 32 = 1216).
ENCAPS_SEED_LEN
Deterministic encapsulation seed length in bytes (32 ML-KEM + 32 X25519 = 64).
SHARED_SECRET_LEN
Shared secret length in bytes (32).
XWING_LABEL
X-Wing 6-byte domain separation label (\./^\ -> hex 5c2e2f2f5e5c).