diff options
Diffstat (limited to 'crypto/poly1305/poly1305.c')
-rw-r--r-- | crypto/poly1305/poly1305.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/crypto/poly1305/poly1305.c b/crypto/poly1305/poly1305.c index 5a49e2df..dc2d6a68 100644 --- a/crypto/poly1305/poly1305.c +++ b/crypto/poly1305/poly1305.c @@ -22,6 +22,8 @@ #include <openssl/cpu.h> +#include "internal.h" + #if defined(OPENSSL_WINDOWS) || !defined(OPENSSL_X86_64) @@ -48,15 +50,6 @@ static void U32TO8_LE(uint8_t *m, uint32_t v) { } #endif -#if defined(OPENSSL_ARM) && !defined(OPENSSL_NO_ASM) -void CRYPTO_poly1305_init_neon(poly1305_state *state, const uint8_t key[32]); - -void CRYPTO_poly1305_update_neon(poly1305_state *state, const uint8_t *in, - size_t in_len); - -void CRYPTO_poly1305_finish_neon(poly1305_state *state, uint8_t mac[16]); -#endif - static uint64_t mul32x32_64(uint32_t a, uint32_t b) { return (uint64_t)a * b; } struct poly1305_state_st { @@ -170,7 +163,7 @@ void CRYPTO_poly1305_init(poly1305_state *statep, const uint8_t key[32]) { uint32_t t0, t1, t2, t3; #if defined(OPENSSL_ARM) && !defined(OPENSSL_NO_ASM) - if (CRYPTO_is_NEON_functional()) { + if (CRYPTO_is_NEON_capable()) { CRYPTO_poly1305_init_neon(statep, key); return; } @@ -217,7 +210,7 @@ void CRYPTO_poly1305_update(poly1305_state *statep, const uint8_t *in, struct poly1305_state_st *state = (struct poly1305_state_st *)statep; #if defined(OPENSSL_ARM) && !defined(OPENSSL_NO_ASM) - if (CRYPTO_is_NEON_functional()) { + if (CRYPTO_is_NEON_capable()) { CRYPTO_poly1305_update_neon(statep, in, in_len); return; } @@ -263,7 +256,7 @@ void CRYPTO_poly1305_finish(poly1305_state *statep, uint8_t mac[16]) { uint32_t b, nb; #if defined(OPENSSL_ARM) && !defined(OPENSSL_NO_ASM) - if (CRYPTO_is_NEON_functional()) { + if (CRYPTO_is_NEON_capable()) { CRYPTO_poly1305_finish_neon(statep, mac); return; } |