diff options
author | kokke <spam@rowdy.dk> | 2014-07-12 20:52:42 +0200 |
---|---|---|
committer | kokke <spam@rowdy.dk> | 2014-07-12 20:52:42 +0200 |
commit | 30c47c71b816356b3c591f7f29717b09d914759b (patch) | |
tree | 1f316255b31f953b47ca958461feeaf35d538a4e | |
parent | Update README.md (diff) | |
download | tiny-AES-c-30c47c71b816356b3c591f7f29717b09d914759b.tar tiny-AES-c-30c47c71b816356b3c591f7f29717b09d914759b.tar.gz tiny-AES-c-30c47c71b816356b3c591f7f29717b09d914759b.tar.bz2 tiny-AES-c-30c47c71b816356b3c591f7f29717b09d914759b.tar.lz tiny-AES-c-30c47c71b816356b3c591f7f29717b09d914759b.tar.xz tiny-AES-c-30c47c71b816356b3c591f7f29717b09d914759b.tar.zst tiny-AES-c-30c47c71b816356b3c591f7f29717b09d914759b.zip |
-rw-r--r-- | README.md | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -9,7 +9,7 @@ void AES128_ECB_encrypt(uint8_t* input, uint8_t* key, uint8_t *output); void AES128_ECB_decrypt(uint8_t* input, uint8_t* key, uint8_t *output); ``` -The module uses just a bit more than 200 bytes of RAM and 2.5K ROM when compiled for ARM (YMMV). +The module uses just a bit more than 200 bytes of RAM and 2.5K ROM when compiled for ARM (<2K for Thumb but YMMV). It is 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). @@ -27,6 +27,14 @@ GCC size output when compiled for ARM: 2515 0 204 2719 a9f aes.o +.. and when compiling for the THUMB instruction set, we end up at just below 2K in code size. + + $ arm-none-eabi-gcc -mthumb -Os -c aes.c + $ size aes.o + text data bss dec hex filename + 1883 0 204 2087 827 aes.o + + I am using Mentor Graphics free ARM toolchain: |