diff --git a/include/GFp/versioned.h b/include/GFp/versioned.h index 47d37698ea..5a4496a4ab 100644 --- a/include/GFp/versioned.h +++ b/include/GFp/versioned.h @@ -184,15 +184,27 @@ #define GFp_x25519_x86_64_mul GFp_VERSIONED(GFp_x25519_x86_64_mul) #define GFp_x25519_x86_64_square GFp_VERSIONED(GFp_x25519_x86_64_square) #define GFp_x25519_x86_64_work_cswap GFp_VERSIONED(GFp_x25519_x86_64_work_cswap) +#define GFp_x25519_ge_double_scalarmult_vartime GFp_VERSIONED(GFp_x25519_ge_double_scalarmult_vartime) +#define GFp_bn_mul_mont_check_num_limbs GFp_VERSIONED(GFp_bn_mul_mont_check_num_limbs) +#define GFp_bn_from_montgomery_in_place GFp_VERSIONED(GFp_bn_from_montgomery_in_place) +#define GFp_x25519_fe_invert GFp_VERSIONED(GFp_x25519_fe_invert) +#define GFp_x25519_fe_mul_ttt GFp_VERSIONED(GFp_x25519_fe_mul_ttt) +#define GFp_x25519_fe_tobytes GFp_VERSIONED(GFp_x25519_fe_tobytes) +#define GFp_x25519_fe_isnegative GFp_VERSIONED(GFp_x25519_fe_isnegative) +#define GFp_x25519_sc_mask GFp_VERSIONED(GFp_x25519_sc_mask) +#define GFp_x25519_fe_neg GFp_VERSIONED(GFp_x25519_fe_neg) + // LIMBS symbols. #define LIMBS_add_assign GFp_VERSIONED(LIMBS_add_assign) #define LIMBS_add_mod GFp_VERSIONED(LIMBS_add_mod) +#define LIMBS_are_even GFp_VERSIONED(LIMBS_are_even) #define LIMBS_are_zero GFp_VERSIONED(LIMBS_are_zero) #define LIMBS_copy GFp_VERSIONED(LIMBS_copy) #define LIMBS_equal GFp_VERSIONED(LIMBS_equal) #define LIMBS_equal_limb GFp_VERSIONED(LIMBS_equal_limb) #define LIMBS_less_than GFp_VERSIONED(LIMBS_less_than) +#define LIMBS_less_than_limb GFp_VERSIONED(LIMBS_less_than_limb) #define LIMBS_reduce_once GFp_VERSIONED(LIMBS_reduce_once) #define LIMBS_shl_mod GFp_VERSIONED(LIMBS_shl_mod) #define LIMBS_sub GFp_VERSIONED(LIMBS_sub) @@ -394,14 +406,25 @@ #define _GFp_x25519_x86_64_mul GFp_VERSIONED(_GFp_x25519_x86_64_mul) #define _GFp_x25519_x86_64_square GFp_VERSIONED(_GFp_x25519_x86_64_square) #define _GFp_x25519_x86_64_work_cswap GFp_VERSIONED(_GFp_x25519_x86_64_work_cswap) +#define _GFp_x25519_ge_double_scalarmult_vartime GFp_VERSIONED(_GFp_x25519_ge_double_scalarmult_vartime) +#define _GFp_bn_mul_mont_check_num_limbs GFp_VERSIONED(_GFp_bn_mul_mont_check_num_limbs) +#define _GFp_bn_from_montgomery_in_place GFp_VERSIONED(_GFp_bn_from_montgomery_in_place) +#define _GFp_x25519_fe_invert GFp_VERSIONED(_GFp_x25519_fe_invert) +#define _GFp_x25519_fe_mul_ttt GFp_VERSIONED(_GFp_x25519_fe_mul_ttt) +#define _GFp_x25519_fe_tobytes GFp_VERSIONED(_GFp_x25519_fe_tobytes) +#define _GFp_x25519_fe_isnegative GFp_VERSIONED(_GFp_x25519_fe_isnegative) +#define _GFp_x25519_sc_mask GFp_VERSIONED(_GFp_x25519_sc_mask) +#define _GFp_x25519_fe_neg GFp_VERSIONED(_GFp_x25519_fe_neg) #define _LIMBS_add_assign GFp_VERSIONED(_LIMBS_add_assign) #define _LIMBS_add_mod GFp_VERSIONED(_LIMBS_add_mod) +#define _LIMBS_are_even GFp_VERSIONED(_LIMBS_are_even) #define _LIMBS_are_zero GFp_VERSIONED(_LIMBS_are_zero) #define _LIMBS_copy GFp_VERSIONED(_LIMBS_copy) #define _LIMBS_equal GFp_VERSIONED(_LIMBS_equal) #define _LIMBS_equal_limb GFp_VERSIONED(_LIMBS_equal_limb) #define _LIMBS_less_than GFp_VERSIONED(_LIMBS_less_than) +#define _LIMBS_less_than_limb GFp_VERSIONED(_LIMBS_less_than_limb) #define _LIMBS_reduce_once GFp_VERSIONED(_LIMBS_reduce_once) #define _LIMBS_shl_mod GFp_VERSIONED(_LIMBS_shl_mod) #define _LIMBS_sub GFp_VERSIONED(_LIMBS_sub) diff --git a/src/ec/suite_b/ops/mod.rs b/src/ec/suite_b/ops/mod.rs index 9a43c5ebc4..dd40172bcc 100644 --- a/src/ec/suite_b/ops/mod.rs +++ b/src/ec/suite_b/ops/mod.rs @@ -443,7 +443,7 @@ fn parse_big_endian_fixed_consttime( } -extern { +versioned_extern! { fn LIMBS_add_mod(r: *mut Limb, a: *const Limb, b: *const Limb, m: *const Limb, num_limbs: c::size_t); }