Loading crypto/bn/bn_gcd.c +8 −4 Original line number Diff line number Diff line Loading @@ -254,7 +254,8 @@ BIGNUM *BN_mod_inverse(BIGNUM *in, while (!BN_is_zero(B)) { /* * 0 < B < A <= |n|, * 0 < B < |n|, * 0 < A <= |n|, * (1) -sign*X*a == B (mod |n|), * (2) sign*Y*a == A (mod |n|) */ Loading Loading @@ -299,13 +300,16 @@ BIGNUM *BN_mod_inverse(BIGNUM *in, } /* We still have (1) and (2), but A may no longer be larger than B. /* We still have (1) and (2). * Both A and B are odd. * The following computations ensure that * * 0 =< B < A = |n|, * 0 <= B < |n|, * 0 < A < |n|, * (1) -sign*X*a == B (mod |n|), * (2) sign*Y*a == A (mod |n|) * (2) sign*Y*a == A (mod |n|), * * and that either A or B is even in the next iteration. */ if (BN_ucmp(B, A) >= 0) { Loading test/bctest +3 −3 Original line number Diff line number Diff line Loading @@ -12,13 +12,13 @@ IFS=: try_path=true try_without_dir=true # First we try "bc", then "$dir/bc" for each item in $PATH. for dir in dummy:$PATH; do if [ "$try_path" = true ]; then if [ "$try_without_dir" = true ]; then # first iteration bc=bc try_path=false try_without_dir=false else # second and later iterations bc="$dir/bc" Loading Loading
crypto/bn/bn_gcd.c +8 −4 Original line number Diff line number Diff line Loading @@ -254,7 +254,8 @@ BIGNUM *BN_mod_inverse(BIGNUM *in, while (!BN_is_zero(B)) { /* * 0 < B < A <= |n|, * 0 < B < |n|, * 0 < A <= |n|, * (1) -sign*X*a == B (mod |n|), * (2) sign*Y*a == A (mod |n|) */ Loading Loading @@ -299,13 +300,16 @@ BIGNUM *BN_mod_inverse(BIGNUM *in, } /* We still have (1) and (2), but A may no longer be larger than B. /* We still have (1) and (2). * Both A and B are odd. * The following computations ensure that * * 0 =< B < A = |n|, * 0 <= B < |n|, * 0 < A < |n|, * (1) -sign*X*a == B (mod |n|), * (2) sign*Y*a == A (mod |n|) * (2) sign*Y*a == A (mod |n|), * * and that either A or B is even in the next iteration. */ if (BN_ucmp(B, A) >= 0) { Loading
test/bctest +3 −3 Original line number Diff line number Diff line Loading @@ -12,13 +12,13 @@ IFS=: try_path=true try_without_dir=true # First we try "bc", then "$dir/bc" for each item in $PATH. for dir in dummy:$PATH; do if [ "$try_path" = true ]; then if [ "$try_without_dir" = true ]; then # first iteration bc=bc try_path=false try_without_dir=false else # second and later iterations bc="$dir/bc" Loading