Skip to content

Commit

Permalink
Make BN_P638 the default in this branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaranha committed Jun 4, 2024
1 parent 3a2b97c commit d65c69a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions include/relic_pc.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#define RLC_G2_LOWER ep4_
#define RLC_G2_BASEF(A) A[0][0]
#elif FP_PRIME == 508 || FP_PRIME == 768 || FP_PRIME == 638 && !defined(FP_QNRES)
#define RLC_G2_LOWER ep3_
#define RLC_G2_LOWER ep2_
#define RLC_G2_BASEF(A) A[0]
#else
#define RLC_G2_LOWER ep2_
Expand All @@ -79,8 +79,8 @@
#define RLC_GT_LOWER fp24_
#define RLC_GT_EMBED 24
#elif FP_PRIME == 508 || FP_PRIME == 768 || FP_PRIME == 638 && !defined(FP_QNRES)
#define RLC_GT_LOWER fp18_
#define RLC_GT_EMBED 18
#define RLC_GT_LOWER fp12_
#define RLC_GT_EMBED 12
#elif FP_PRIME == 330 || FP_PRIME == 765 || FP_PRIME == 766
#define RLC_GT_LOWER fp16_
#define RLC_GT_EMBED 16
Expand Down
15 changes: 8 additions & 7 deletions src/ep/relic_ep_param.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,8 @@ int ep_param_set_any_endom(void) {
#ifdef FP_QNRES
ep_param_set(B12_P638);
#else
ep_param_set(K18_P638);
ep_param_set(BN_P638);
//ep_param_set(K18_P638);
//ep_param_set(SG18_P638);
#endif
#elif FP_PRIME == 765
Expand Down Expand Up @@ -1599,13 +1600,13 @@ int ep_param_set_any_pairf(void) {
type = RLC_EP_MTYPE;
extension = 2;
#else
//ep_param_set(BN_P638);
//type = RLC_EP_DTYPE;
//extension = 2;
ep_param_set(K18_P638);
ep_param_set(BN_P638);
type = RLC_EP_DTYPE;
extension = 2;
//ep_param_set(K18_P638);
//ep_param_set(SG18_P638);
type = RLC_EP_MTYPE;
extension = 3;
//type = RLC_EP_MTYPE;
//extension = 3;
#endif
#elif FP_PRIME == 765
ep_param_set(FM16_P765);
Expand Down
2 changes: 1 addition & 1 deletion src/pc/relic_pc_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void gt_rand(gt_t a) {
#elif FP_PRIME == 330 || FP_PRIME == 765 || FP_PRIME == 766
pp_exp_k16(a, a);
#elif FP_PRIME == 508 || FP_PRIME == 768 || FP_PRIME == 638 && !defined(FP_QNRES)
pp_exp_k18(a, a);
pp_exp_k12(a, a);
#elif FP_PRIME == 544
pp_exp_k8(a, a);
#else
Expand Down

0 comments on commit d65c69a

Please sign in to comment.