A byte-oriented AES-256 implementation
As you may know, I do cryptographic perversions occasionally. Recently I’ve been asked for a compact implementation of AES-256. Code size must be as small as possible, speed is not important and (here is the catch) no assembler. The requesters have tried various public available implementations before, none were fit. So I did mine. It is a straightforward and rather naïve byte-oriented portable C implementation, where all the lookup tables replaced with “on-the-fly” calculations. Certainly it is slower and more subjective to side-channel attacks in general by nature. But this implementation is exactly what was wanted and it made everybody happy.
So, if you want it then there is the source code:
- aes256.h (1Kb)
- aes256.c (12kb)
- aes256.* + a usage code example (zip, 5kb)
Subscribe to RSS feed