diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-11-10 08:00:14 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-11-10 08:00:14 -0500 |
commit | 896225069db7f34e752dd7b7bb401052c6b7cb17 (patch) | |
tree | 8d4eabb2bd304b6fe9168aac8fdc28618f3212f8 /aes_armv4.h | |
parent | 776a2195bd78c80130b1809b22a5e4d3aecb5b95 (diff) | |
download | cryptopp-git-896225069db7f34e752dd7b7bb401052c6b7cb17.tar.gz |
Rename files with dashes to underscores (GH #736)
Also see https://groups.google.com/forum/#!topic/cryptopp-users/HBz-6gZZFOA on the mailing list
Diffstat (limited to 'aes_armv4.h')
-rw-r--r-- | aes_armv4.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/aes_armv4.h b/aes_armv4.h new file mode 100644 index 00000000..93b2214d --- /dev/null +++ b/aes_armv4.h @@ -0,0 +1,30 @@ +/* Header file for use with Cryptogam's ARMv4 AES. */
+/* Also see http://www.openssl.org/~appro/cryptogams/ and */
+/* https://wiki.openssl.org/index.php?title=Cryptogams_AES */
+
+#ifndef CRYPTOGAMS_AES_ARMV4_H
+#define CRYPTOGAMS_AES_ARMV4_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//#define AES_MAXNR 14
+//typedef struct AES_KEY_st {
+// unsigned int rd_key[4 * (AES_MAXNR + 1)];
+// int rounds;
+//} AES_KEY;
+
+// Instead of AES_KEY we use a 'word32 rkey[4*15+4]'. It has space for
+// both the AES_MAXNR round keys and the number of rounds in the tail.
+
+int AES_set_encrypt_key(const unsigned char *userKey, const int bits, unsigned int *rkey);
+int AES_set_decrypt_key(const unsigned char *userKey, const int bits, unsigned int *rkey);
+void AES_encrypt(const unsigned char in[16], unsigned char out[16], const unsigned int *rkey);
+void AES_decrypt(const unsigned char in[16], unsigned char out[16], const unsigned int *rkey);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CRYPTOGAMS_AES_ARMV4_H */
|