projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
binary algorithm for modular inversion
[openssl.git]
/
crypto
/
bn
/
bn_mod.c
diff --git
a/crypto/bn/bn_mod.c
b/crypto/bn/bn_mod.c
index 92fe11684c8c914a7a006fc72f5693841c8fcb87..5cf82480d7bafb8e61b52ef62f44118e1acf9d30 100644
(file)
--- a/
crypto/bn/bn_mod.c
+++ b/
crypto/bn/bn_mod.c
@@
-150,8
+150,8
@@
int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_
int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m)
{
if (!BN_add(r, a, b)) return 0;
- if (BN_cmp(r, m) >= 0)
- return BN_sub(r, r, m);
+ if (BN_
u
cmp(r, m) >= 0)
+ return BN_
u
sub(r, r, m);
return 1;
}