On this page you can find three microcontroller implementations of the AES block cipher (also known as "Rijndael"). The target device class is Atmel's AVR, a family of very fast and very powerful flash MCUs, operating at clock rates up to 16 MHz while executing one instruction per clock cycle (16 MIPS).
The three implementations RijndaelFast, RijndaelFurious and RijndaelFantastic are optimized against different target requirements, be it speed, small code size or small RAM footprint.
16 MHz MCU | RijndaelFast | RijndaelFurious | RijndaelFantastic | ||||||
clock cycles | blocks/sec. | bytes/sec. | clock cycles | blocks/sec. | bytes/sec. | clock cycles | blocks/sec. | bytes/sec. | |
encryption | 2474 | 6467 | 103476 | 2739 | 5842 | 93465 | 4059 | 3942 | 63070 |
decryption | 3411 | 4691 | 75051 | 3579 | 4471 | 71528 | 4675 | 3422 | 54759 |
code size | 3098 bytes (1549 words) | 1570 bytes (785 words) | ?? bytes (?? words) |
The decryption performs in any case slower than the encryption (what is typical for AES). For further information read the comments in the assembler source code!
The code is published under the terms of the GNU General Public License (see license agreement statement in the source code).
Download the source code here:
RijndaelFast: rijndaelfast.asm (or as
html)
RijndaelFurious: rijndaelfurious.asm (or as
html)
RijndaelFantastic: rijndaelfantastic.asm (or as
html)
Commercial licenses are available upon request: If you are interested in embedding the code in your application but need a different license than GPL, feel free to contact me (avraes AT point-at-infinity.org).