diff options
Diffstat (limited to 'src/lib/libcrypto/aes/aes_core.c')
-rw-r--r-- | src/lib/libcrypto/aes/aes_core.c | 17 |
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 | */ |
628 | int | 628 | int |
629 | private_AES_set_encrypt_key(const unsigned char *userKey, const int bits, | 629 | AES_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 | */ |
730 | int | 729 | int |
731 | private_AES_set_decrypt_key(const unsigned char *userKey, const int bits, | 730 | AES_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 | */ |
1215 | int | 1213 | int |
1216 | private_AES_set_encrypt_key(const unsigned char *userKey, const int bits, | 1214 | AES_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 | */ |
1317 | int | 1314 | int |
1318 | private_AES_set_decrypt_key(const unsigned char *userKey, const int bits, | 1315 | AES_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 | ||