diff options
author | Amitay Isaacs <amitay@ozlabs.org> | 2021-03-29 18:20:53 +1100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-04-08 12:18:09 +0100 |
commit | 5de32f22e731ea151e1c5aac7703cde2573cb4a4 (patch) | |
tree | 19a9a93e24ec4ca4f516e248391dcb3e87801c44 /crypto/ec/curve25519.c | |
parent | bbed0d1cbd436af6797d7837e270bff4ca4d5a10 (diff) | |
download | openssl-5de32f22e731ea151e1c5aac7703cde2573cb4a4.tar.gz |
Use numbers definition of int128_t and uint128_t
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14784)
Diffstat (limited to 'crypto/ec/curve25519.c')
-rw-r--r-- | crypto/ec/curve25519.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/ec/curve25519.c b/crypto/ec/curve25519.c index 3f24215047..a291e6f472 100644 --- a/crypto/ec/curve25519.c +++ b/crypto/ec/curve25519.c @@ -19,6 +19,8 @@ #include <openssl/evp.h> #include <openssl/sha.h> +#include "internal/numbers.h" + #if defined(X25519_ASM) && (defined(__x86_64) || defined(__x86_64__) || \ defined(_M_AMD64) || defined(_M_X64)) @@ -260,7 +262,7 @@ static void x25519_scalar_mulx(uint8_t out[32], const uint8_t scalar[32], #endif #if defined(X25519_ASM) \ - || ( (defined(__SIZEOF_INT128__) && __SIZEOF_INT128__ == 16) \ + || ( defined(INT128_MAX) \ && !defined(__sparc__) \ && (!defined(__SIZEOF_LONG__) || (__SIZEOF_LONG__ == 8)) \ && !(defined(__ANDROID__) && !defined(__clang__)) ) @@ -393,7 +395,7 @@ void x25519_fe51_mul121666(fe51 h, fe51 f); # define fe51_mul121666 x25519_fe51_mul121666 # else -typedef __uint128_t u128; +typedef uint128_t u128; static void fe51_mul(fe51 h, const fe51 f, const fe51 g) { |