Some AES implementations in crypto libraries make use only 8-bit byte operations on the cipher state, like in the lorawan-parser (cf lib/aes.h).

When I try to understand the implications of that, I wonder if normal cipher states in "standards" implementation uses more bits or not ? In the AES wikipedia page:

AES operates on a 4×4 column-major order matrix of bytes, termed the state

So, does it mean 8-bit byte operations is eventually the standard implementation ? Or on the contrary not and it leads possibly to security flaws, and if yes, which ones ?


All internal operations of a perfectly standard-conforming AES implementation can be conveniently implemented over bytes, without carry propagation. There's no security flaw implied. The worst that's bound to happen is that for some operations (like XOR with a 128-bit, 16-byte subkey), things must be repeated over several bytes, and a wider word would reduce the number of individual operations. It is however conceivable that some side-channel attacks (power or emission analysis..) could be more threatening in a bytewide implementation.

Many other modern cryptographic algorithm (SHA-256, SHA-512, Chacha) use rotations and addition over words much wider than 8 bits. They can still be implemented with 8-bit quantities but that's messy (C compilers for 8-bit processors will do this automagically, but often at a large expense in performance for rotation).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.