Crypto++ 8.7
Free C++ class library of cryptographic schemes
aes_armv4.h
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
5#ifndef CRYPTOGAMS_AES_ARMV4_H
6#define CRYPTOGAMS_AES_ARMV4_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12//#define AES_MAXNR 14
13//typedef struct AES_KEY_st {
14// unsigned int rd_key[4 * (AES_MAXNR + 1)];
15// int rounds;
16//} AES_KEY;
17
18// Instead of AES_KEY we use a 'word32 rkey[4*15+4]'. It has space for
19// both the AES_MAXNR round keys and the number of rounds in the tail.
20
21int cryptogams_AES_set_encrypt_key(const unsigned char *userKey, const int bits, unsigned int *rkey);
22int cryptogams_AES_set_decrypt_key(const unsigned char *userKey, const int bits, unsigned int *rkey);
23void cryptogams_AES_encrypt_block(const unsigned char *in, unsigned char *out, const unsigned int *rkey);
24void cryptogams_AES_decrypt_block(const unsigned char *in, unsigned char *out, const unsigned int *rkey);
25
26#ifdef __cplusplus
27}
28#endif
29
30#endif /* CRYPTOGAMS_AES_ARMV4_H */