aesp8-ppc.h 714 B

123456789101112131415161718192021
  1. #include <linux/types.h>
  2. #include <crypto/aes.h>
  3. #define AES_BLOCK_MASK (~(AES_BLOCK_SIZE-1))
  4. struct aes_key {
  5. u8 key[AES_MAX_KEYLENGTH];
  6. int rounds;
  7. };
  8. int aes_p8_set_encrypt_key(const u8 *userKey, const int bits,
  9. struct aes_key *key);
  10. int aes_p8_set_decrypt_key(const u8 *userKey, const int bits,
  11. struct aes_key *key);
  12. void aes_p8_encrypt(const u8 *in, u8 *out, const struct aes_key *key);
  13. void aes_p8_decrypt(const u8 *in, u8 *out, const struct aes_key *key);
  14. void aes_p8_cbc_encrypt(const u8 *in, u8 *out, size_t len,
  15. const struct aes_key *key, u8 *iv, const int enc);
  16. void aes_p8_ctr32_encrypt_blocks(const u8 *in, u8 *out,
  17. size_t len, const struct aes_key *key,
  18. const u8 *iv);