Assuming that for every given A, Bbn_gcd_ext_binar must return the same Bezout coefficients X, Y as bn_gcd_ext, which satisfy X <= (B / (2 * GCD(A,B))) and Y <= (A / (2 * GCD(A,B))), the following code provides a counterexample for which this does not hold.
Assuming that for every given
A, B
bn_gcd_ext_binar
must return the same Bezout coefficientsX, Y
asbn_gcd_ext
, which satisfyX <= (B / (2 * GCD(A,B)))
andY <= (A / (2 * GCD(A,B)))
, the following code provides a counterexample for which this does not hold.See also https://github.com/relic-toolkit/relic/issues/223
This prints:
Validate Bezout coefficients in Python: