Skip to content

Commit

Permalink
Fix unbalanced Bezout coefficients (#287).
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaranha committed Mar 9, 2024
1 parent 94c00d9 commit 554cb0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bn/relic_bn_gcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ void bn_gcd_ext_binar(bn_t c, bn_t d, bn_t e, const bn_t a, const bn_t b) {
bn_div(y, y, u);
bn_hlv(_a, x);
bn_hlv(_b, y);
while (bn_cmp_abs(d, _b) == RLC_GT) {
while (bn_cmp_abs(d, _b) == RLC_GT || bn_cmp_abs(_e, _a) == RLC_GT) {
bn_div(t, d, _b);
if (bn_bits(t) > 1) {
bn_hlv(t, t);
Expand Down

0 comments on commit 554cb0f

Please sign in to comment.