projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23a05fa
)
bn/bn_gf2m.c: make new BN_GF2m_mod_inv work with BN_DEBUG_RAND.
author
Andy Polyakov
<appro@openssl.org>
Thu, 29 Mar 2012 21:35:28 +0000
(21:35 +0000)
committer
Andy Polyakov
<appro@openssl.org>
Thu, 29 Mar 2012 21:35:28 +0000
(21:35 +0000)
crypto/bn/bn_gf2m.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_gf2m.c
b/crypto/bn/bn_gf2m.c
index 0bfb56971e3362eadbe248864dea15f30eefd6c6..e54a701166a5f65e6aa535d80a58a9bdf17e21ef 100644
(file)
--- a/
crypto/bn/bn_gf2m.c
+++ b/
crypto/bn/bn_gf2m.c
@@
-631,8
+631,11
@@
int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
}
if (ubits==vbits)
{
- bn_correct_top(u);
- ubits = BN_num_bits(u);
+ BN_ULONG u;
+ int utop = (ubits-1)/BN_BITS2;
+
+ while ((u=udp[utop])==0 && utop) utop--;
+ ubits = utop*BN_BITS2 + BN_num_bits_word(u);
}
}
bn_correct_top(b);