diff options
author | lloyd <[email protected]> | 2010-03-02 15:16:45 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-02 15:16:45 +0000 |
commit | e60403e98ebe6b1dc5f1f512e1e06924ef07ba04 (patch) | |
tree | e55f60c7056b252f1c387446cfd6e96ed426d496 /src/pubkey | |
parent | febfb73f1e260c9b98c57501f9d259b063755696 (diff) |
Make two variants of OS2ECP, one taking pointer + length, and other
(inlined) taking a MemoryRegion& that just forwards. This makes it
possible to avoid an extra copy in ECDH::derive_key.
Diffstat (limited to 'src/pubkey')
-rw-r--r-- | src/pubkey/ecdh/ecdh.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pubkey/ecdh/ecdh.cpp b/src/pubkey/ecdh/ecdh.cpp index 7577a8569..7ecc40ae4 100644 --- a/src/pubkey/ecdh/ecdh.cpp +++ b/src/pubkey/ecdh/ecdh.cpp @@ -17,9 +17,7 @@ namespace Botan { SecureVector<byte> ECDH_PrivateKey::derive_key(const byte key[], u32bit key_len) const { - MemoryVector<byte> key_x(key, key_len); // FIXME: nasty/slow - PointGFp point = OS2ECP(key_x, public_point().get_curve()); - + PointGFp point = OS2ECP(key, key_len, public_point().get_curve()); return derive_key(point); } |