Expand description
REX Encrypter
This module defines the full encryption pipeline for WHY2, including Grid shaping and round-based mixing. It transforms raw data into encrypted Grid chunks using a symmetric key.
§Overview
WHY2 encrypts data by converting it into fixed-size grids (Grid) and applying
nonlinear and linear transformations across multiple rounds in CTR mode. The process includes:
GridShaping: Input is padded and split intoGridchunks.- Key Handling: A symmetric key is either provided or securely generated.
- Nonce Generation: A random nonce is generated for CTR mode.
- CTR Mode Encryption: Each plaintext
Gridis XORed with a keystream block derived from encrypting the nonce plus block counter.
Functions§
- encrypt
- Encrypts a vector of
i64values. - encrypt_
string - Encrypts a string.