Fix a travis failure in the curve448 code
authorMatt Caswell <matt@openssl.org>
Wed, 7 Feb 2018 12:08:47 +0000 (12:08 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 20 Feb 2018 12:59:31 +0000 (12:59 +0000)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105)

crypto/ec/curve448/curve448.c
crypto/ec/curve448/curve448_tables.c
crypto/ec/curve448/point_448.h

index dda3da4ffe2976738dd5583dfbfe6f1b33362207..f34dfcce6c2538adf5a7e7a2f5370bac5fc7ba98 100644 (file)
@@ -36,8 +36,6 @@ static const curve448_scalar_t precomputed_scalarmul_adjustment = {
 
 #define WBITS C448_WORD_BITS   /* NB this may be different from ARCH_WORD_BITS */
 
-extern const struct curve448_precomputed_s *curve448_precomputed_base;
-
 /* Inverse. */
 static void gf_invert(gf y, const gf x, int assert_nonzero)
 {
@@ -620,8 +618,6 @@ static void prepare_wnaf_table(pniels_t * output,
     OPENSSL_cleanse(twop, sizeof(twop));
 }
 
-extern const niels_t *curve448_wnaf_base;
-
 void curve448_base_double_scalarmul_non_secret(curve448_point_t combo,
                                                const curve448_scalar_t scalar1,
                                                const curve448_point_t base2,
index bc47ea9edd61ae7faac790cf038bb3ce31b3e2f9..a1185b1eee6a6b22138f3745793df8daa5d8ae8e 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "point_448.h"
 
-const curve448_precomputed_s curve448_precomputed_base_table = {
+static const curve448_precomputed_s curve448_precomputed_base_table = {
     {
         {{
             {FIELD_LITERAL(0x00cc3b062366f4cc,0x003d6e34e314aa3c,0x00d51c0a7521774d,0x0094e060eec6ab8b,0x00d21291b4d80082,0x00befed12b55ef1e,0x00c3dd2df5c94518,0x00e0a7b112b8d4e6)},
@@ -341,7 +341,7 @@ const curve448_precomputed_s curve448_precomputed_base_table = {
 const struct curve448_precomputed_s *curve448_precomputed_base
     = &curve448_precomputed_base_table;
 
-const niels_t curve448_wnaf_base_table[32] = {
+static const niels_t curve448_wnaf_base_table[32] = {
     {{
         {FIELD_LITERAL(0x00303cda6feea532,0x00860f1d5a3850e4,0x00226b9fa4728ccd,0x00e822938a0a0c0c,0x00263a61c9ea9216,0x001204029321b828,0x006a468360983c65,0x0002846f0a782143)},
         {FIELD_LITERAL(0x00303cda6feea532,0x00860f1d5a3850e4,0x00226b9fa4728ccd,0x006822938a0a0c0c,0x00263a61c9ea9215,0x001204029321b828,0x006a468360983c65,0x0082846f0a782143)},
index ed3920a8488cbb4791612d79eee273d3dce0885d..326718b3056851c72f0d7b269123bbf26738671d 100644 (file)
@@ -79,6 +79,7 @@ extern const curve448_point_t curve448_point_identity;
 
 /* Precomputed table for the base point on the curve. */
 extern const struct curve448_precomputed_s *curve448_precomputed_base;
+extern const niels_t *curve448_wnaf_base;
 
 /*
  * Read a scalar from wire format or from bytes.