SEC: Add 32-bit optimized AES implementation and refactor code to support
[bertos.git] / bertos / sec / cipher / aes.h
index 587f3f7482c46bf0f439ab67dae780558f00609b..7be6265ead5ca42e4348f36fa09d43cf8766a0ca 100644 (file)
 #define SEC_CIPHER_AES_H
 
 #include <sec/cipher.h>
+#include <sec/util.h>
 #include <alloca.h>
 
 typedef struct
 {
        BlockCipher c;
-       int num_rounds;
+       uint32_t status;
        uint8_t expkey[44*4];
 } AES128_Context;
 
 typedef struct
 {
        BlockCipher c;
-       int num_rounds;
+       uint32_t status;
        uint8_t expkey[52*4];
 } AES192_Context;
 
 typedef struct
 {
        BlockCipher c;
-       int num_rounds;
+       uint32_t status;
        uint8_t expkey[60*4];
 } AES256_Context;