Browse Source

use 226 bits private keys for non-x64

pull/470/head
orignal 9 years ago
parent
commit
380c7b7720
  1. 2
      Crypto.cpp

2
Crypto.cpp

@ -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 ();

Loading…
Cancel
Save