aboutsummaryrefslogtreecommitdiffstats
path: root/checks/ecdh.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-04-08 18:13:41 +0000
committerlloyd <[email protected]>2011-04-08 18:13:41 +0000
commit8b543e804375a788ae71d461c0f8cf5d4193fc25 (patch)
tree6177931cd84a9be204cdab6e62729954e69e0421 /checks/ecdh.cpp
parent3b66bfd4da97189ec275e5f85b9f85009d3f8370 (diff)
ECC private keys had two different constructors, one taking a group
and a random number generator, and the other taking a group and a preset private key value. The DL private keys instead have on constructor for this; if the x value is zero, then a new random key is created. For consistency, do this with ECC as well. ECDH actually didn't have one of these constructors, forcing you to either load from PKCS #8 or else use a random key. Rename EC_Domain_Params to EC_Group, with a typedef for compatability. More doc updates. Update mtn ignores for Sphinx output
Diffstat (limited to 'checks/ecdh.cpp')
-rw-r--r--checks/ecdh.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/checks/ecdh.cpp b/checks/ecdh.cpp
index a63742f2f..c641796d6 100644
--- a/checks/ecdh.cpp
+++ b/checks/ecdh.cpp
@@ -33,7 +33,7 @@ void test_ecdh_normal_derivation(RandomNumberGenerator& rng)
{
std::cout << "." << std::flush;
- EC_Domain_Params dom_pars(OID("1.3.132.0.8"));
+ EC_Group dom_pars(OID("1.3.132.0.8"));
ECDH_PrivateKey private_a(rng, dom_pars);
@@ -65,7 +65,7 @@ void test_ecdh_some_dp(RandomNumberGenerator& rng)
std::cout << "." << std::flush;
OID oid(oids[i]);
- EC_Domain_Params dom_pars(oid);
+ EC_Group dom_pars(oid);
ECDH_PrivateKey private_a(rng, dom_pars);
ECDH_PrivateKey private_b(rng, dom_pars);
@@ -91,7 +91,7 @@ void test_ecdh_der_derivation(RandomNumberGenerator& rng)
for(u32bit i = 0; i< oids.size(); i++)
{
OID oid(oids[i]);
- EC_Domain_Params dom_pars(oid);
+ EC_Group dom_pars(oid);
ECDH_PrivateKey private_a(rng, dom_pars);
ECDH_PrivateKey private_b(rng, dom_pars);