diff options
Diffstat (limited to 'src/lib/pubkey/curve25519/curve25519.cpp')
-rw-r--r-- | src/lib/pubkey/curve25519/curve25519.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/pubkey/curve25519/curve25519.cpp b/src/lib/pubkey/curve25519/curve25519.cpp index 02ee516de..4a072e648 100644 --- a/src/lib/pubkey/curve25519/curve25519.cpp +++ b/src/lib/pubkey/curve25519/curve25519.cpp @@ -29,10 +29,13 @@ secure_vector<byte> curve25519(const secure_vector<byte>& secret, return out; } -secure_vector<byte> curve25519_basepoint(const secure_vector<byte>& secret) +std::vector<byte> curve25519_basepoint(const secure_vector<byte>& secret) { const byte basepoint[32] = { 9 }; - return curve25519(secret, basepoint); + std::vector<byte> out(32); + const int rc = curve25519_donna(out.data(), secret.data(), basepoint); + BOTAN_ASSERT_EQUAL(rc, 0, "Return value of curve25519_donna is ok"); + return out; } } |