Skip to main content

Module crypto

Module crypto 

Source
Expand description

§REX Crypto Utilities

Provides key derivation, round key expansion, and CTR mode application for the WHY2 encryption system.

Functions§

apply_ctr
Applies CTR (Counter) mode encryption/decryption in parallel.
generate_key
Generates a symmetric WHY2 key using secure system entropy.
generate_key_deterministic
Generates a deterministic key vector using a ChaCha20-based DRNG.
generate_nonce
Generates a random nonce for CTR mode.
generate_round_keys
Derives a sequence of round keys from a master Grid using a deterministic CSPRNG stream.
sha256_seed_grid
Computes a SHA-256 hash of the Grid contents to produce a deterministic seed.