AES-256 #
Encryption direction only. The S-box is computed from its FIPS-197 definition rather than transcribed. Not constant time.
Multiplication in GF(2^8) modulo AES's x^8 + x^4 + x^3 + x + 1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The multiplicative inverse in GF(2^8), computed as a^254; inv 0 = 0.
Equations
- One or more equations did not get rendered due to their size.
Instances For
FIPS-197 §5.1.1: invert in GF(2^8), then apply the affine transformation over GF(2).
Equations
- One or more equations did not get rendered due to their size.
Instances For
sboxByte tabulated over all 256 inputs.
Equations
- Cryptlib.Primitives.Cipher.AES.sbox = Array.map (fun (i : Nat) => Cryptlib.Primitives.Cipher.AES.sboxByte (UInt8.ofNat i)) (Array.range 256)
Instances For
Equations
- Cryptlib.Primitives.Cipher.AES.subBytes s = Array.map (fun (b : UInt8) => Cryptlib.Primitives.Cipher.AES.sbox[b.toNat]!) s
Instances For
def
Cryptlib.Primitives.Cipher.AES.encryptBlockWithKey
(key : Vector UInt8 32)
(input : Vector UInt8 16)
:
Expand the key and encrypt one block.