avoid potential infinite loop in final reduction round of BN_GF2m_mod_arr()
Submitted by: Huang Ying Reviewed by: Douglas Stebila
This commit is contained in:
parent
869eb9e767
commit
8228fd89fc
6
CHANGES
6
CHANGES
@ -702,12 +702,16 @@
|
|||||||
|
|
||||||
Changes between 0.9.8h and 0.9.8i [xx XXX xxxx]
|
Changes between 0.9.8h and 0.9.8i [xx XXX xxxx]
|
||||||
|
|
||||||
|
*) Fix BN_GF2m_mod_arr() top-bit cleanup code.
|
||||||
|
[Huang Ying]
|
||||||
|
|
||||||
*) Expand ENGINE to support engine supplied SSL client certificate functions.
|
*) Expand ENGINE to support engine supplied SSL client certificate functions.
|
||||||
|
|
||||||
This work was sponsored by Logica.
|
This work was sponsored by Logica.
|
||||||
[Steve Henson]
|
[Steve Henson]
|
||||||
|
|
||||||
*) Add CryptoAPI ENGINE to support use of RSA and DSA keys held in Windows keystores. Support for SSL/TLS client authentication too.
|
*) Add CryptoAPI ENGINE to support use of RSA and DSA keys held in Windows
|
||||||
|
keystores. Support for SSL/TLS client authentication too.
|
||||||
Not compiled unless enable-capieng specified to Configure.
|
Not compiled unless enable-capieng specified to Configure.
|
||||||
|
|
||||||
This work was sponsored by Logica.
|
This work was sponsored by Logica.
|
||||||
|
@ -322,7 +322,11 @@ int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[])
|
|||||||
if (zz == 0) break;
|
if (zz == 0) break;
|
||||||
d1 = BN_BITS2 - d0;
|
d1 = BN_BITS2 - d0;
|
||||||
|
|
||||||
if (d0) z[dN] = (z[dN] << d1) >> d1; /* clear up the top d1 bits */
|
/* clear up the top d1 bits */
|
||||||
|
if (d0)
|
||||||
|
z[dN] = (z[dN] << d1) >> d1;
|
||||||
|
else
|
||||||
|
z[dN] = 0;
|
||||||
z[0] ^= zz; /* reduction t^0 component */
|
z[0] ^= zz; /* reduction t^0 component */
|
||||||
|
|
||||||
for (k = 1; p[k] != 0; k++)
|
for (k = 1; p[k] != 0; k++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user