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_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 π
- 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§
- BatchBlocks π
- FixsliceBlocks πAES block batch size for this implementation
- FixsliceKeys128 πAES-128 round keys
- FixsliceKeys192 πAES-192 round keys
- FixsliceKeys256 πAES-256 round keys
- State π512-bit internal state