Update comments

pull/797/head
Jeffrey Walton 2019-02-07 15:45:38 -05:00
parent 4caa5ee724
commit de85886ca4
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 3 additions and 3 deletions

View File

@ -385,10 +385,10 @@ bool ed25519PrivateKey::Validate(RandomNumberGenerator &rng, unsigned int level)
return false; return false;
if (level >= 3) if (level >= 3)
{ {
SecByteBlock sk(m_sk, SECRET_KEYLENGTH), pk(PUBLIC_KEYLENGTH); // Verify m_pk is pairwise consistent with m_sk
SecretToPublicKey(pk, sk); SecByteBlock pk(PUBLIC_KEYLENGTH);
SecretToPublicKey(pk, m_sk);
// Secret key is already clamped, bufs are equal
if (VerifyBufsEqual(pk, m_pk, PUBLIC_KEYLENGTH) == false) if (VerifyBufsEqual(pk, m_pk, PUBLIC_KEYLENGTH) == false)
return false; return false;
} }