Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Perform initial reduction in invmodp
Browse files Browse the repository at this point in the history
  • Loading branch information
samuele-andreoli committed Apr 14, 2020
1 parent 8e805c2 commit b4ddc14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/big.c.in
Expand Up @@ -1519,7 +1519,8 @@ void BIG_XXX_invmodp(BIG_XXX r,BIG_XXX a,BIG_XXX p)
BIG_XXX u, v, s, w;

BIG_XXX_copy(u, p);
BIG_XXX_copy(v,a);
BIG_XXX_copy(v, a);
BIG_XXX_mod(v, p);
BIG_XXX_zero(r);
BIG_XXX_one(s);

Expand Down
1 change: 1 addition & 0 deletions src/ff.c.in
Expand Up @@ -568,6 +568,7 @@ void FF_WWW_invmodp(BIG_XXX r[],BIG_XXX a[],BIG_XXX p[],int n)

FF_WWW_copy(u, p, n);
FF_WWW_copy(v, a, n);
FF_WWW_mod(v, p, n);
FF_WWW_zero(r, n);
FF_WWW_one(s, n);

Expand Down

0 comments on commit b4ddc14

Please sign in to comment.