summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--test.c8
2 files changed, 8 insertions, 6 deletions
diff --git a/README.md b/README.md
index 6ca11f0..81eaf09 100644
--- a/README.md
+++ b/README.md
@@ -13,10 +13,11 @@ void AES128_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length,
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).
+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 AES128_ECB_xxcrypt() do most of the work, and they expect inputs of 128 bit length.
-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).
+The module uses around 200 bytes of RAM and 2.5K ROM when compiled for ARM (~2K for Thumb but YMMV).
+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.
@@ -61,3 +62,4 @@ This implementation is verified against the data in:
All material in this repository is in the public domain.
+I am a bit slow to react to pull requests and issues, but I have an ambition to go through all issues sometime in the future and release a stable version.
diff --git a/test.c b/test.c
index 64af120..a95d52f 100644
--- a/test.c
+++ b/test.c
@@ -92,7 +92,7 @@ static void test_encrypt_ecb(void)
printf("ECB decrypt: ");
- if(0 == strncmp((char*) out, (char*) buffer, 16))
+ if(0 == memcmp((char*) out, (char*) buffer, 16))
{
printf("SUCCESS!\n");
}
@@ -125,7 +125,7 @@ static void test_decrypt_cbc(void)
printf("CBC decrypt: ");
- if(0 == strncmp((char*) out, (char*) buffer, 64))
+ if(0 == memcmp((char*) out, (char*) buffer, 64))
{
printf("SUCCESS!\n");
}
@@ -153,7 +153,7 @@ static void test_encrypt_cbc(void)
printf("CBC encrypt: ");
- if(0 == strncmp((char*) out, (char*) buffer, 64))
+ if(0 == memcmp((char*) out, (char*) buffer, 64))
{
printf("SUCCESS!\n");
}
@@ -175,7 +175,7 @@ static void test_decrypt_ecb(void)
printf("ECB decrypt: ");
- if(0 == strncmp((char*) out, (char*) buffer, 16))
+ if(0 == memcmp((char*) out, (char*) buffer, 16))
{
printf("SUCCESS!\n");
}