Skip to content

Commit

Permalink
Further speedup.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaranha committed May 9, 2024
1 parent a09e4d5 commit 6a95b57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/fp/relic_fp_inv.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,6 @@ void fp_inv_jmpds(fp_t c, const fp_t a) {

fp_add(p11, u0, u1);
fp_add(p01, v0, v1);
#if FP_RDC == MONTY
fp_mulm_low(pre, pre, core_get()->conv.dp);
#endif
#endif
}

Expand Down
4 changes: 4 additions & 0 deletions src/fp/relic_fp_prime.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ static void fp_prime_set(const bn_t p) {
fp_mulm_low(ctx->inv.dp, ctx->inv.dp, ctx->conv.dp);
}
}
#else
for (int i = 0; i < d / (RLC_DIG - 2) - 1; i++) {
fp_mulm_low(ctx->inv.dp, ctx->inv.dp, ctx->conv.dp);
}
#endif

#endif /* FP_RDC == MONTY */
Expand Down

0 comments on commit 6a95b57

Please sign in to comment.