From: Matt Caswell Date: Mon, 12 Feb 2018 13:56:50 +0000 (+0000) Subject: Further style changes to curve448 code X-Git-Tag: OpenSSL_1_1_1-pre2~63 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=c1f15b76ef13823ddd1f006ba75128c369eca067;hp=9c9d6ff41c7cbd6c551bd056bf9cc06390de8290;ds=inline Further style changes to curve448 code Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/5105) --- diff --git a/crypto/ec/curve448/curve448.c b/crypto/ec/curve448/curve448.c index f34dfcce6c..1459976981 100644 --- a/crypto/ec/curve448/curve448.c +++ b/crypto/ec/curve448/curve448.c @@ -22,7 +22,8 @@ #define C448_WNAF_FIXED_TABLE_BITS 5 #define C448_WNAF_VAR_TABLE_BITS 3 -static const int EDWARDS_D = -39081; +#define EDWARDS_D (-39081) + static const curve448_scalar_t precomputed_scalarmul_adjustment = { { { diff --git a/crypto/ec/curve448/word.h b/crypto/ec/curve448/word.h index 01c9779938..179d70b853 100644 --- a/crypto/ec/curve448/word.h +++ b/crypto/ec/curve448/word.h @@ -14,13 +14,11 @@ # define HEADER_WORD_H # include - # include +# include # include # include "arch_intrinsics.h" - # include "curve448utils.h" -# include # if defined(__ARM_NEON__) # include @@ -56,7 +54,7 @@ typedef int64_t dsword_t; # if C448_WORD_BITS == 64 # define SC_LIMB(x) (x) # elif C448_WORD_BITS == 32 -# define SC_LIMB(x) ((uint32_t)x),(x >> 32) +# define SC_LIMB(x) ((uint32_t)(x)),((x) >> 32) # else # error "For now we only support 32- and 64-bit architectures." # endif