crypto_aes_arm.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef CRYPTO_AES_ARM_H_
  2. #define CRYPTO_AES_ARM_H_
  3. #include <stddef.h>
  4. #include <stdint.h>
  5. /**
  6. * crypto_aes_key_expand_arm(key_unexpanded, len):
  7. * Expand the ${len}-byte unexpanded AES key ${key_unexpanded} into a
  8. * structure which can be passed to crypto_aes_encrypt_block_arm(). The
  9. * length must be 16 or 32. This implementation uses ARM AES instructions,
  10. * and should only be used if CPUSUPPORT_ARM_AES is defined and
  11. * cpusupport_arm_aes() returns nonzero.
  12. */
  13. void * crypto_aes_key_expand_arm(const uint8_t *, size_t);
  14. /**
  15. * crypto_aes_encrypt_block_arm(in, out, key):
  16. * Using the expanded AES key ${key}, encrypt the block ${in} and write the
  17. * resulting ciphertext to ${out}. ${in} and ${out} can overlap. This
  18. * implementation uses ARM AES instructions, and should only be used if
  19. * CPUSUPPORT_ARM_AES is defined and cpusupport_arm_aes() returns nonzero.
  20. */
  21. void crypto_aes_encrypt_block_arm(const uint8_t[16], uint8_t[16],
  22. const void *);
  23. /**
  24. * crypto_aes_key_free_arm(key):
  25. * Free the expanded AES key ${key}.
  26. */
  27. void crypto_aes_key_free_arm(void *);
  28. #endif /* !CRYPTO_AES_ARM_H_ */