summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/aes/aes_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/aes/aes_core.c')
-rw-r--r--src/lib/libcrypto/aes/aes_core.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/lib/libcrypto/aes/aes_core.c b/src/lib/libcrypto/aes/aes_core.c
index 301a207ce8..ee21057392 100644
--- a/src/lib/libcrypto/aes/aes_core.c
+++ b/src/lib/libcrypto/aes/aes_core.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: aes_core.c,v 1.10 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: aes_core.c,v 1.11 2014/07/09 09:10:07 miod Exp $ */
2/** 2/**
3 * rijndael-alg-fst.c 3 * rijndael-alg-fst.c
4 * 4 *
@@ -626,8 +626,7 @@ static const u32 rcon[] = {
626 * Expand the cipher key into the encryption key schedule. 626 * Expand the cipher key into the encryption key schedule.
627 */ 627 */
628int 628int
629private_AES_set_encrypt_key(const unsigned char *userKey, const int bits, 629AES_set_encrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key)
630 AES_KEY *key)
631{ 630{
632 u32 *rk; 631 u32 *rk;
633 int i = 0; 632 int i = 0;
@@ -728,15 +727,14 @@ private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
728 * Expand the cipher key into the decryption key schedule. 727 * Expand the cipher key into the decryption key schedule.
729 */ 728 */
730int 729int
731private_AES_set_decrypt_key(const unsigned char *userKey, const int bits, 730AES_set_decrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key)
732 AES_KEY *key)
733{ 731{
734 u32 *rk; 732 u32 *rk;
735 int i, j, status; 733 int i, j, status;
736 u32 temp; 734 u32 temp;
737 735
738 /* first, start with an encryption schedule */ 736 /* first, start with an encryption schedule */
739 status = private_AES_set_encrypt_key(userKey, bits, key); 737 status = AES_set_encrypt_key(userKey, bits, key);
740 if (status < 0) 738 if (status < 0)
741 return status; 739 return status;
742 740
@@ -1213,8 +1211,7 @@ static const u32 rcon[] = {
1213 * Expand the cipher key into the encryption key schedule. 1211 * Expand the cipher key into the encryption key schedule.
1214 */ 1212 */
1215int 1213int
1216private_AES_set_encrypt_key(const unsigned char *userKey, const int bits, 1214AES_set_encrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key)
1217 AES_KEY *key)
1218{ 1215{
1219 u32 *rk; 1216 u32 *rk;
1220 int i = 0; 1217 int i = 0;
@@ -1315,7 +1312,7 @@ private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
1315 * Expand the cipher key into the decryption key schedule. 1312 * Expand the cipher key into the decryption key schedule.
1316 */ 1313 */
1317int 1314int
1318private_AES_set_decrypt_key(const unsigned char *userKey, const int bits, 1315AES_set_decrypt_key(const unsigned char *userKey, const int bits,
1319 AES_KEY *key) 1316 AES_KEY *key)
1320{ 1317{
1321 u32 *rk; 1318 u32 *rk;
@@ -1323,7 +1320,7 @@ private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
1323 u32 temp; 1320 u32 temp;
1324 1321
1325 /* first, start with an encryption schedule */ 1322 /* first, start with an encryption schedule */
1326 status = private_AES_set_encrypt_key(userKey, bits, key); 1323 status = AES_set_encrypt_key(userKey, bits, key);
1327 if (status < 0) 1324 if (status < 0)
1328 return status; 1325 return status;
1329 1326