From 44f71792f55f7fbc56c97724d210ae6630033656 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 20 Mar 2021 01:36:33 -0400 Subject: Fix x25519 constructor --- xed25519.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xed25519.cpp') diff --git a/xed25519.cpp b/xed25519.cpp index 1e3e7f40..5095b5d2 100644 --- a/xed25519.cpp +++ b/xed25519.cpp @@ -73,8 +73,8 @@ NAMESPACE_BEGIN(CryptoPP) x25519::x25519(const byte y[PUBLIC_KEYLENGTH], const byte x[SECRET_KEYLENGTH]) { - std::memcpy(m_pk, y, SECRET_KEYLENGTH); - std::memcpy(m_sk, x, PUBLIC_KEYLENGTH); + std::memcpy(m_pk, y, PUBLIC_KEYLENGTH); + std::memcpy(m_sk, x, SECRET_KEYLENGTH); CRYPTOPP_ASSERT(IsClamped(m_sk) == true); CRYPTOPP_ASSERT(IsSmallOrder(m_pk) == false); -- cgit v1.2.1