Unverified Commit 5918d925 authored by kokke's avatar kokke Committed by GitHub
Browse files

Update README.md

parent f40c8079
......@@ -22,28 +22,25 @@ You can choose to use any or all of the modes-of-operations, by defining the sym
There is no built-in error checking or protection from out-of-bounds memory access errors as a result of malicious input. The two functions AES_ECB_xxcrypt() do most of the work, and they expect inputs of 128 bit length.
The module uses less than 200 bytes of RAM and 2.3K ROM when compiled for ARM (<2K for Thumb but YMMV).
The module uses less than 200 bytes of RAM and 1-2K ROM when compiled for ARM, but YMMV depending on which modes are enabled.
It is one of the smallest implementation in C I've seen yet, but do contact me if you know of something smaller (or have improvements to the code here).
I've successfully used the code on 64bit x86, 32bit ARM and 8 bit AVR platforms.
GCC size output when only ECB mode is compiled for ARM (using 128 bit block size):
GCC size output when only CTR mode is compiled for ARM (using 128 bit block size):
$ arm-none-eabi-gcc -Os -c aes.c -DCBC=0 -DCTR=0
$ arm-none-eabi-gcc -Os -DCBC=0 -DECB=0 -DCTR=1 -c aes.c
$ size aes.o
text data bss dec hex filename
2015 0 184 2199 897 aes.o
1155 0 184 1339 53b aes.o
.. and when compiling for the THUMB instruction set, we end up just above 1K in code size.
.. and when compiling for the THUMB instruction set, we end up just above 1.7K in code size.
$ arm-none-eabi-gcc -mthumb -Os -c aes.c -DCBC=0 -DCTR=0
$ arm-none-eabi-gcc -Os -mthumb -DCBC=0 -DECB=0 -DCTR=1 -c aes.c
$ size aes.o
text data bss dec hex filename
1499 0 184 1683 693 aes.o
855 0 184 1039 40f aes.o
I am using the Free Software Foundation, ARM GCC compiler:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment