Expand description
REX Decrypter
This module defines the core decryption for WHY2, including round-key reversal, Grid unmixing and deterministic unshuffling. It reconstructs the original data from encrypted Grid chunks using a symmetric key.
§Overview
WHY2 encrypts data by transforming it into fixed-size grids (Grid) using
CTR mode with a block cipher. Decryption reverses this process:
- Round Key Generation: Reconstructs round keys from the master key using chained SHA-256 seeds.
- CTR Mode Decryption: Each ciphertext
Gridis XORed with the keystream block (the nonce plus block counter encrypted with WHY2).
Since CTR mode is symmetric, the same encryption function is used for both encryption and decryption.
Functions§
- decrypt
- Decrypts a WHY2-encrypted data into raw
i64values. - decrypt_
string - Decrypts a WHY2-encrypted data and reconstructs the original string.