Module pqxdh_crypto

Module pqxdh_crypto 

Source
Expand description

PQXDH cryptographic operations

This module provides a working implementation of PQXDH key agreement that demonstrates the protocol structure and message flow using the libcrux-ml-kem API.

Constantsยง

MLKEM768_CIPHERTEXT_SIZE
MLKEM768_PRIVATE_KEY_SIZE
MLKEM768_PUBLIC_KEY_SIZE
ML-KEM 768 parameters
PQXDH_SHARED_SECRET_SIZE
PQXDH shared secret size (256 bits)

Functionsยง

create_hkdf_info ๐Ÿ”’
Create HKDF info string for key derivation
create_prekey_signature_data ๐Ÿ”’
Create signature data for prekey
decrypt_pqxdh_session_message
Decrypt PQXDH session message
decrypt_with_shared_secret ๐Ÿ”’
Decrypt data using ChaCha20-Poly1305 with derived key
derive_pqxdh_shared_secret ๐Ÿ”’
Derive PQXDH shared secret using HKDF
encrypt_pqxdh_session_message
Encrypt data for PQXDH session message
encrypt_with_shared_secret ๐Ÿ”’
Encrypt data using ChaCha20-Poly1305 with derived key
generate_key_id ๐Ÿ”’
Generate a random key ID
generate_pqxdh_prekeys
Generate a complete PQXDH prekey bundle with private keys
pqxdh_initiate
Perform PQXDH key agreement initiation
pqxdh_respond
Process PQXDH initial message
sign_data ๐Ÿ”’
Sign data using identity keypair