diff options
author | Jack Lloyd <[email protected]> | 2018-03-10 10:24:25 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-03-10 10:27:12 -0500 |
commit | 9141f982c7679a27a265a84ba34d9695017883c9 (patch) | |
tree | 2853c6c86ab7ac70dde74692a82ec01c15bbbb20 /src/tests/test_ecies.cpp | |
parent | ea0f46dfcab59938fc863ca8d01552392c3c5a34 (diff) |
Add PointGFp::encode as replacement for EC2OSP
Literally every single call to EC2OSP is converting the returned
secure_vector to a std::vector. Which makes sense since private
points are not really a thing in any protocol I know of.
Diffstat (limited to 'src/tests/test_ecies.cpp')
-rw-r--r-- | src/tests/test_ecies.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tests/test_ecies.cpp b/src/tests/test_ecies.cpp index 2ce931bae..911d0c3a3 100644 --- a/src/tests/test_ecies.cpp +++ b/src/tests/test_ecies.cpp @@ -137,8 +137,7 @@ class ECIES_ISO_Tests final : public Text_Based_Test // (ephemeral) keys of alice const Botan::ECDH_PrivateKey eph_private_key(Test::rng(), domain, r); const Botan::PointGFp eph_public_key_point = eph_private_key.public_point(); - const std::vector<uint8_t> eph_public_key_bin = Botan::unlock( - Botan::EC2OSP(eph_public_key_point, compression_type)); + const std::vector<uint8_t> eph_public_key_bin = eph_public_key_point.encode(compression_type); result.test_eq("encoded (ephemeral) public key", eph_public_key_bin, c0); // test secret derivation: ISO 18033 test vectors use KDF1 from ISO 18033 |