This is an automated email from the ASF dual-hosted git repository. kmccusker pushed a commit to branch fix-bug in repository https://gitbox.apache.org/repos/asf/incubator-milagro-crypto.git
commit be0dfacec1cf247f0738ab59ed20bd9087083322 Author: Kealan McCusker <[email protected]> AuthorDate: Fri Jun 14 15:44:50 2019 +0100 fix bug in ecp.c --- version3/c/ecp.c | 2 +- version3/c/fp12.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/version3/c/ecp.c b/version3/c/ecp.c index f0ae94e..8b1d938 100644 --- a/version3/c/ecp.c +++ b/version3/c/ecp.c @@ -252,7 +252,7 @@ int ECP_ZZZ_get(BIG_XXX x,ECP_ZZZ *P) ECP_ZZZ_copy(&W,P); ECP_ZZZ_affine(&W); if (ECP_ZZZ_isinf(&W)) return -1; - FP_YYY_redc(x,&(W)); + FP_YYY_redc(x,&(W.x)); return 0; } diff --git a/version3/c/fp12.c b/version3/c/fp12.c index 04d39ac..0ee7664 100644 --- a/version3/c/fp12.c +++ b/version3/c/fp12.c @@ -229,7 +229,7 @@ void FP12_YYY_sqr(FP12_YYY *w,FP12_YYY *x) FP4_YYY_add(&(w->b),&C,&D); FP4_YYY_add(&(w->c),&(w->c),&A); - if (x->type==AMCL_AMCL_FP_SPARSER) + if (x->type==AMCL_FP_SPARSER) w->type=AMCL_FP_SPARSE; else w->type=AMCL_FP_DENSE;
