use 226 bits private keys for non-x64

This commit is contained in:
orignal 2016-04-06 16:11:18 -04:00
parent 8657226594
commit 380c7b7720

View File

@ -296,7 +296,7 @@ namespace crypto
auto numZeroBytes = 256 - numBytes; auto numZeroBytes = 256 - numBytes;
RAND_bytes (priv + numZeroBytes, numBytes); RAND_bytes (priv + numZeroBytes, numBytes);
memset (priv, 0, numZeroBytes); memset (priv, 0, numZeroBytes);
priv[numZeroBytes] &= 0x04; priv[numZeroBytes] &= 0x03;
#endif #endif
BN_CTX * ctx = BN_CTX_new (); BN_CTX * ctx = BN_CTX_new ();
BIGNUM * p = BN_new (); BIGNUM * p = BN_new ();