|
|
|
@ -20,17 +20,15 @@ void mclx_Fp_add(Unit*, const Unit*, const Unit*); |
|
|
|
|
void mclx_Fp_sub(Unit*, const Unit*, const Unit*); |
|
|
|
|
void mclx_Fp_shr1(Unit*, const Unit*); |
|
|
|
|
void mclx_Fp_neg(Unit*, const Unit*); |
|
|
|
|
void mclx_FpDbl_mod(Unit*, const Unit*); |
|
|
|
|
void mclx_Fp_mul(Unit*, const Unit*, const Unit*); |
|
|
|
|
void mclx_Fp_sqr(Unit*, const Unit*); |
|
|
|
|
void mclx_FpDbl_add(Unit*, const Unit*, const Unit*); |
|
|
|
|
void mclx_FpDbl_sub(Unit*, const Unit*, const Unit*); |
|
|
|
|
void mclx_FpDbl_add(Unit*, const Unit*, const Unit*); |
|
|
|
|
void mclx_FpDbl_sub(Unit*, const Unit*, const Unit*); |
|
|
|
|
Unit mclx_FpDbl_addPre(Unit*, const Unit*, const Unit*); |
|
|
|
|
Unit mclx_FpDbl_subPre(Unit*, const Unit*, const Unit*); |
|
|
|
|
void mclx_FpDbl_mulPre(Unit*, const Unit*, const Unit*); |
|
|
|
|
void mclx_FpDbl_sqrPre(Unit*, const Unit*); |
|
|
|
|
void mclx_FpDbl_mod(Unit*, const Unit*); |
|
|
|
|
void mclx_Fp2_add(Unit*, const Unit*, const Unit*); |
|
|
|
|
void mclx_Fp2_sub(Unit*, const Unit*, const Unit*); |
|
|
|
|
void mclx_Fp2_neg(Unit*, const Unit*); |
|
|
|
@ -59,15 +57,22 @@ void setStaticCode(mcl::fp::Op& op) |
|
|
|
|
op.fp_subA_ = mclx_Fp_sub; |
|
|
|
|
op.fp_shr1 = mclx_Fp_shr1; |
|
|
|
|
op.fp_negA_ = mclx_Fp_neg; |
|
|
|
|
op.fpDbl_modA_ = mclx_FpDbl_mod; |
|
|
|
|
op.fp_mulA_ = mclx_Fp_mul; |
|
|
|
|
op.fp_sqrA_ = mclx_Fp_sqr; |
|
|
|
|
op.fpDbl_addA_ = mclx_FpDbl_add; |
|
|
|
|
op.fpDbl_subA_ = mclx_FpDbl_sub; |
|
|
|
|
op.fpDbl_addPre = mclx_FpDbl_addPre; |
|
|
|
|
op.fpDbl_subPre = mclx_FpDbl_subPre; |
|
|
|
|
op.fpDbl_mulPreA_ = mclx_FpDbl_mulPre; |
|
|
|
|
op.fpDbl_sqrPreA_ = mclx_FpDbl_sqrPre; |
|
|
|
|
op.fpDbl_modA_ = mclx_FpDbl_mod; |
|
|
|
|
op.fp_mulA_ = mclx_Fp_mul; |
|
|
|
|
op.fp_sqrA_ = mclx_Fp_sqr; |
|
|
|
|
op.fp2_addA_ = mclx_Fp2_add; |
|
|
|
|
op.fp2_subA_ = mclx_Fp2_sub; |
|
|
|
|
op.fp2_negA_ = mclx_Fp2_neg; |
|
|
|
|
op.fp2_mulNF = 0; |
|
|
|
|
op.fp2_mulA_ = mclx_Fp2_mul; |
|
|
|
|
op.fp2_sqrA_ = mclx_Fp2_sqr; |
|
|
|
|
op.fp2_mul_xiA_ = mclx_Fp2_mul_xi; |
|
|
|
|
} else { |
|
|
|
|
// Fr, sizeof(Fr) = 32
|
|
|
|
|
op.fp_addPre = mclx_Fr_addPre; |
|
|
|
|