mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Use SECRET_KEYLENGTH for ed25519PrivateKey::GenerateRandom
This commit is contained in:
parent
23a32c4e3d
commit
dde43de786
@ -468,7 +468,7 @@ void ed25519PrivateKey::GenerateRandom(RandomNumberGenerator &rng, const NameVal
|
||||
if (params.GetValue(Name::Seed(), seed) && rng.CanIncorporateEntropy())
|
||||
rng.IncorporateEntropy(seed.begin(), seed.size());
|
||||
|
||||
rng.GenerateBlock(m_sk, 32);
|
||||
rng.GenerateBlock(m_sk, SECRET_KEYLENGTH);
|
||||
m_sk[0] &= 248; m_sk[31] &= 127; m_sk[31] |= 64;
|
||||
int ret = Donna::ed25519_publickey(m_pk, m_sk);
|
||||
CRYPTOPP_ASSERT(ret == 0); CRYPTOPP_UNUSED(ret);
|
||||
|
Loading…
Reference in New Issue
Block a user