Expand description
Fixsliced implementations of AES-128, AES-192 and AES-256 (64-bit) adapted from the C implementation.
All implementations are fully bitsliced and do not rely on any Look-Up Table (LUT).
See the paper at https://eprint.iacr.org/2020/1123.pdf for more details.
Β§Author (original C code)
Alexandre Adomnicai, Nanyang Technological University, Singapore [email protected]
Originally licensed MIT. Relicensed as Apache 2.0+MIT with permission.
MacrosΒ§
- define_
mix_ πcolumns - Computation of the MixColumns transformation in the fixsliced representation, with different rotations used according to the round number mod 4.
FunctionsΒ§
- add_
round_ πconstant_ bit - add_
round_ πkey - XOR the round key to the internal state. The round keys are expected to be pre-computed and to be packed in the fixsliced representation.
- aes128_
decrypt π - Fully-fixsliced AES-128 decryption (the InvShiftRows is completely omitted).
- aes128_
encrypt π - Fully-fixsliced AES-128 encryption (the ShiftRows is completely omitted).
- aes128_
key_ πschedule - Fully bitsliced AES-128 key schedule to match the fully-fixsliced representation.
- aes192_
decrypt π - Fully-fixsliced AES-192 decryption (the InvShiftRows is completely omitted).
- aes192_
encrypt π - Fully-fixsliced AES-192 encryption (the ShiftRows is completely omitted).
- aes192_
key_ πschedule - Fully bitsliced AES-192 key schedule to match the fully-fixsliced representation.
- aes256_
decrypt π - Fully-fixsliced AES-256 decryption (the InvShiftRows is completely omitted).
- aes256_
encrypt π - Fully-fixsliced AES-256 encryption (the ShiftRows is completely omitted).
- aes256_
key_ πschedule - Fully bitsliced AES-256 key schedule to match the fully-fixsliced representation.
- bitslice π
- Bitslice four 128-bit input blocks input0, input1, input2, input3 into a 512-bit internal state.
- delta_
swap_ π1 - delta_
swap_ π2 - inv_
bitslice π - Un-bitslice a 512-bit internal state into four 128-bit blocks of output.
- inv_
mix_ πcolumns_ 0 - inv_
mix_ πcolumns_ 1 - inv_
mix_ πcolumns_ 2 - inv_
mix_ πcolumns_ 3 - inv_
shift_ πrows_ 1 - inv_
shift_ πrows_ 2 - inv_
shift_ πrows_ 3 - inv_
sub_ πbytes - Note that the 4 bitwise NOT (^= 0xffffffffffffffff) are accounted for here so that it is a true inverse of βsub_bytesβ.
- memshift32 π
- Copy 32-bytes within the provided slice to an 8-byte offset
- mix_
columns_ π0 - mix_
columns_ π1 - mix_
columns_ π2 - mix_
columns_ π3 - ror π
- ror_
distance π - rotate_
rows_ π1 - rotate_
rows_ π2 - rotate_
rows_ πand_ columns_ 1_ 1 - rotate_
rows_ πand_ columns_ 1_ 2 - rotate_
rows_ πand_ columns_ 1_ 3 - rotate_
rows_ πand_ columns_ 2_ 2 - shift_
rows_ π1 - Applies ShiftRows once on an AES state (or key).
- shift_
rows_ π2 - Applies ShiftRows twice on an AES state (or key).
- shift_
rows_ π3 - Applies ShiftRows three times on an AES state (or key).
- sub_
bytes π - Bitsliced implementation of the AES Sbox based on Boyar, Peralta and Calik.
- sub_
bytes_ πnots - NOT operations that are omitted in S-box
- xor_
columns π - XOR the columns after the S-box during the key schedule round function.
Type AliasesΒ§
- Batch
Blocks π - Fixslice
Blocks π - AES block batch size for this implementation
- Fixslice
Keys128 π - AES-128 round keys
- Fixslice
Keys192 π - AES-192 round keys
- Fixslice
Keys256 π - AES-256 round keys
- State π
- 512-bit internal state