summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2014-12-15 21:30:25 +0100
committerkokke <spam@rowdy.dk>2014-12-15 21:30:25 +0100
commiteb61f31b361a0f0801b5fbbb65020da21cfae2e4 (patch)
treed0a6da3f59fd7e09b596d1c3ac886caa970437fa
parentUpdate aes.h (diff)
downloadtiny-AES-c-eb61f31b361a0f0801b5fbbb65020da21cfae2e4.tar
tiny-AES-c-eb61f31b361a0f0801b5fbbb65020da21cfae2e4.tar.gz
tiny-AES-c-eb61f31b361a0f0801b5fbbb65020da21cfae2e4.tar.bz2
tiny-AES-c-eb61f31b361a0f0801b5fbbb65020da21cfae2e4.tar.lz
tiny-AES-c-eb61f31b361a0f0801b5fbbb65020da21cfae2e4.tar.xz
tiny-AES-c-eb61f31b361a0f0801b5fbbb65020da21cfae2e4.tar.zst
tiny-AES-c-eb61f31b361a0f0801b5fbbb65020da21cfae2e4.zip
-rw-r--r--README.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 0a28c8a..6a3aa58 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,18 @@
### Tiny AES128 in C
-This is a small and portable implementation of the AES128 ECB encryption algorithm written in C.
+This is a small and portable implementation of the AES128 ECB and CBC encryption algorithms written in C.
The API is very simple and looks like this (I am using C99 `<stdint.h>`-style annotated types):
```C
void AES128_ECB_encrypt(uint8_t* input, const uint8_t* key, uint8_t* output);
void AES128_ECB_decrypt(uint8_t* input, const uint8_t* key, uint8_t* output);
+void AES128_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv);
+void AES128_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv);
```
+You can choose to use one or both of the modes-of-operation, by defining the symbols CBC and ECB. See the header file for clarification.
+
The module uses around 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).