summaryrefslogtreecommitdiff
path: root/xed25519.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-02-07 15:45:38 -0500
committerJeffrey Walton <noloader@gmail.com>2019-02-07 15:45:38 -0500
commitde85886ca48c44fef76271659d1047f1de245f58 (patch)
tree0ab75f96414d78306e304f40428c572e45e2582e /xed25519.cpp
parent4caa5ee724d33b31e9cb7d57964b461ecec76c5a (diff)
downloadcryptopp-git-de85886ca48c44fef76271659d1047f1de245f58.tar.gz
Update comments
Diffstat (limited to 'xed25519.cpp')
-rw-r--r--xed25519.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xed25519.cpp b/xed25519.cpp
index 78d0f53d..6cc8ecb0 100644
--- a/xed25519.cpp
+++ b/xed25519.cpp
@@ -385,10 +385,10 @@ bool ed25519PrivateKey::Validate(RandomNumberGenerator &rng, unsigned int level)
return false;
if (level >= 3)
{
- SecByteBlock sk(m_sk, SECRET_KEYLENGTH), pk(PUBLIC_KEYLENGTH);
- SecretToPublicKey(pk, sk);
+ // Verify m_pk is pairwise consistent with m_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)
return false;
}