aes_internal.h 600 B

1234567891011121314151617181920212223
  1. #if !defined(AES_INTERNAL_H_) || !defined(AES_H_)
  2. #define AES_INTERNAL_H_
  3. #include <stdlib.h>
  4. #include "aes.h"
  5. #define WORD_LENGTH 4
  6. #define ROUNDS 10
  7. #define BOOL int
  8. #define TRUE 1
  9. #define FALSE 0
  10. void aes__shift_rows(uint8_t* block, aes_encryption_mode_t mode);
  11. uint8_t aes__xtime(uint8_t x);
  12. void aes__mix_words(uint8_t* block, aes_encryption_mode_t mode);
  13. uint8_t* aes__expand_key(uint8_t* key);
  14. void aes__encrypt_block(uint8_t* block, uint8_t* round_keys);
  15. void aes__decrypt_block(uint8_t* block, uint8_t* round_keys);
  16. int aes__is_valid_padding(uint8_t* block);
  17. #endif // AES_INTERNAL_H_