From 2fb2ffb660ff9258188b501bf6eadf3a45bea375 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Tue, 27 Sep 2016 11:57:21 -0700 Subject: [PATCH] Update aes.c for new ARM asm names. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to align ppc64le with the existing code, 4467e59b changed the prefix for both the ARM and ppc64le AES assembly code to be “aes_hw_”. However, it didn't update aes.c as well. Change-Id: I8e3c7dea1c49ddad8a613369af274e25d572a8fd Reviewed-on: https://boringssl-review.googlesource.com/11342 Reviewed-by: Adam Langley Reviewed-by: David Benjamin Commit-Queue: Adam Langley CQ-Verified: CQ bot account: commit-bot@chromium.org --- crypto/aes/aes.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/crypto/aes/aes.c b/crypto/aes/aes.c index 882391986..1aed63e51 100644 --- a/crypto/aes/aes.c +++ b/crypto/aes/aes.c @@ -1066,12 +1066,12 @@ static int hwaes_capable(void) { return CRYPTO_is_ARMv8_AES_capable(); } -int aes_v8_set_encrypt_key(const uint8_t *user_key, const int bits, +int aes_hw_set_encrypt_key(const uint8_t *user_key, const int bits, AES_KEY *key); -int aes_v8_set_decrypt_key(const uint8_t *user_key, const int bits, +int aes_hw_set_decrypt_key(const uint8_t *user_key, const int bits, AES_KEY *key); -void aes_v8_encrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key); -void aes_v8_decrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key); +void aes_hw_encrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key); +void aes_hw_decrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key); #else @@ -1079,19 +1079,19 @@ static int hwaes_capable(void) { return 0; } -static int aes_v8_set_encrypt_key(const uint8_t *user_key, int bits, AES_KEY *key) { +static int aes_hw_set_encrypt_key(const uint8_t *user_key, int bits, AES_KEY *key) { abort(); } -static int aes_v8_set_decrypt_key(const uint8_t *user_key, int bits, AES_KEY *key) { +static int aes_hw_set_decrypt_key(const uint8_t *user_key, int bits, AES_KEY *key) { abort(); } -static void aes_v8_encrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) { +static void aes_hw_encrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) { abort(); } -static void aes_v8_decrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) { +static void aes_hw_decrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) { abort(); } @@ -1106,7 +1106,7 @@ static void aes_v8_decrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) void asm_AES_encrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key); void AES_encrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) { if (hwaes_capable()) { - aes_v8_encrypt(in, out, key); + aes_hw_encrypt(in, out, key); } else { asm_AES_encrypt(in, out, key); } @@ -1115,7 +1115,7 @@ void AES_encrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) { void asm_AES_decrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key); void AES_decrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) { if (hwaes_capable()) { - aes_v8_decrypt(in, out, key); + aes_hw_decrypt(in, out, key); } else { asm_AES_decrypt(in, out, key); } @@ -1124,7 +1124,7 @@ void AES_decrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) { int asm_AES_set_encrypt_key(const uint8_t *key, unsigned bits, AES_KEY *aeskey); int AES_set_encrypt_key(const uint8_t *key, unsigned bits, AES_KEY *aeskey) { if (hwaes_capable()) { - return aes_v8_set_encrypt_key(key, bits, aeskey); + return aes_hw_set_encrypt_key(key, bits, aeskey); } else { return asm_AES_set_encrypt_key(key, bits, aeskey); } @@ -1133,7 +1133,7 @@ int AES_set_encrypt_key(const uint8_t *key, unsigned bits, AES_KEY *aeskey) { int asm_AES_set_decrypt_key(const uint8_t *key, unsigned bits, AES_KEY *aeskey); int AES_set_decrypt_key(const uint8_t *key, unsigned bits, AES_KEY *aeskey) { if (hwaes_capable()) { - return aes_v8_set_decrypt_key(key, bits, aeskey); + return aes_hw_set_decrypt_key(key, bits, aeskey); } else { return asm_AES_set_decrypt_key(key, bits, aeskey); }