aes_armv4.h 1.0 KB

123456789101112131415161718192021222324252627282930
  1. /* Header file for use with Cryptogam's ARMv4 AES. */
  2. /* Also see http://www.openssl.org/~appro/cryptogams/ and */
  3. /* https://wiki.openssl.org/index.php?title=Cryptogams_AES */
  4. #ifndef CRYPTOGAMS_AES_ARMV4_H
  5. #define CRYPTOGAMS_AES_ARMV4_H
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. //#define AES_MAXNR 14
  10. //typedef struct AES_KEY_st {
  11. // unsigned int rd_key[4 * (AES_MAXNR + 1)];
  12. // int rounds;
  13. //} AES_KEY;
  14. // Instead of AES_KEY we use a 'word32 rkey[4*15+4]'. It has space for
  15. // both the AES_MAXNR round keys and the number of rounds in the tail.
  16. int cryptogams_AES_set_encrypt_key(const unsigned char *userKey, const int bits, unsigned int *rkey);
  17. int cryptogams_AES_set_decrypt_key(const unsigned char *userKey, const int bits, unsigned int *rkey);
  18. void cryptogams_AES_encrypt_block(const unsigned char *in, unsigned char *out, const unsigned int *rkey);
  19. void cryptogams_AES_decrypt_block(const unsigned char *in, unsigned char *out, const unsigned int *rkey);
  20. #ifdef __cplusplus
  21. }
  22. #endif
  23. #endif /* CRYPTOGAMS_AES_ARMV4_H */