Skip to content

Commit

Permalink
Add new symbols.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioBenitez committed Aug 24, 2018
1 parent 785f7ad commit ece541c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions include/GFp/versioned.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ec/suite_b/ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ fn parse_big_endian_fixed_consttime<M>(
}


extern {
versioned_extern! {
fn LIMBS_add_mod(r: *mut Limb, a: *const Limb, b: *const Limb,
m: *const Limb, num_limbs: c::size_t);
}
Expand Down

0 comments on commit ece541c

Please sign in to comment.