AVRAES: The AES block cipher on AVR controllers

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 cyclesblocks/sec.bytes/sec. clock cyclesblocks/sec.bytes/sec. clock cyclesblocks/sec.bytes/sec.
encryption 24746467103476 2739584293465 4059394263070
decryption 3411469175051 3579447171528 4675342254759
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!

Download

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).

Further Reading

I recommend the following AES related books/sites:

The text of this page is licensed under the GNU General Public License. Copyright 2003,2006 by B. Poettering (avraes AT point-at-infinity.org).
Last modified: Sun Mar 11 21:17:50 CET 2007