security: Renaming EcdsaKeyParams to EcKeyParams

Change-Id: If27faf095474f5be3f8f454925b389b97bf4425d
Refs: #3135
diff --git a/tests/unit-tests/security/v1/certificate.t.cpp b/tests/unit-tests/security/v1/certificate.t.cpp
index 5b410c5..95188d6 100644
--- a/tests/unit-tests/security/v1/certificate.t.cpp
+++ b/tests/unit-tests/security/v1/certificate.t.cpp
@@ -227,7 +227,7 @@
   "  NotAfter: 20341116T182912\n"
   "Subject Description:\n"
   "  2.5.4.41: /ecdsa/ksk-1416594552827\n"
-  "Public key bits: (ECDSA)\n"
+  "Public key bits: (EC)\n"
   "  MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEg+WBGdn6ZECtfJP8FZBrOB7FyrFr\n"
   "  Cx9kv0iq0JFcJNZ4QP2VXVRk4S0OmGYderBhFwUmE2MlfNqHEclnzRIF\n"
   "Signature Information:\n"
diff --git a/tests/unit-tests/security/v1/key-chain.t.cpp b/tests/unit-tests/security/v1/key-chain.t.cpp
index 4caba4f..ef10ca4 100644
--- a/tests/unit-tests/security/v1/key-chain.t.cpp
+++ b/tests/unit-tests/security/v1/key-chain.t.cpp
@@ -412,12 +412,12 @@
                                                DigestAlgorithm::SHA256));
   BOOST_CHECK(nonExistingIdentity.isPrefixOf(data.getSignature().getKeyLocator().getName()));
 
-  Name ecdsaIdentity = Name("/ndn/test/ecdsa").appendVersion();
-  Name ecdsaKeyName = m_keyChain.generateEcdsaKeyPairAsDefault(ecdsaIdentity, false, 256);
-  BOOST_CHECK_NO_THROW(m_keyChain.sign(data, signingByIdentity(ecdsaIdentity)));
+  Name ecIdentity = Name("/ndn/test/ec").appendVersion();
+  Name ecKeyName = m_keyChain.generateEcKeyPairAsDefault(ecIdentity, false, 256);
+  BOOST_CHECK_NO_THROW(m_keyChain.sign(data, signingByIdentity(ecIdentity)));
   BOOST_CHECK_EQUAL(data.getSignature().getType(),
-                    KeyChain::getSignatureType(EcdsaKeyParams().getKeyType(), DigestAlgorithm::SHA256));
-  BOOST_CHECK(ecdsaIdentity.isPrefixOf(data.getSignature().getKeyLocator().getName()));
+                    KeyChain::getSignatureType(EcKeyParams().getKeyType(), DigestAlgorithm::SHA256));
+  BOOST_CHECK(ecIdentity.isPrefixOf(data.getSignature().getKeyLocator().getName()));
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestKeyChain
diff --git a/tests/unit-tests/security/v1/public-key.t.cpp b/tests/unit-tests/security/v1/public-key.t.cpp
index 53df40c..41ee7d6 100644
--- a/tests/unit-tests/security/v1/public-key.t.cpp
+++ b/tests/unit-tests/security/v1/public-key.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -83,7 +83,7 @@
                                 digest.wire() + digest.size());
 }
 
-BOOST_AUTO_TEST_CASE(Ecdsa)
+BOOST_AUTO_TEST_CASE(Ec)
 {
   using namespace CryptoPP;
 
diff --git a/tests/unit-tests/security/v1/sec-public-info-sqlite3.t.cpp b/tests/unit-tests/security/v1/sec-public-info-sqlite3.t.cpp
index e2d668b..aaa0499 100644
--- a/tests/unit-tests/security/v1/sec-public-info-sqlite3.t.cpp
+++ b/tests/unit-tests/security/v1/sec-public-info-sqlite3.t.cpp
@@ -120,7 +120,7 @@
   pib.deleteIdentityInfo(Name("/TestSecPublicInfoSqlite3/KeyType/RSA"));
 }
 
-BOOST_AUTO_TEST_CASE(KeyTypeEcdsa)
+BOOST_AUTO_TEST_CASE(KeyTypeEc)
 {
   using namespace CryptoPP;
 
@@ -128,14 +128,14 @@
   StringSource ss(reinterpret_cast<const uint8_t*>(ECDSA_DER.c_str()), ECDSA_DER.size(),
                   true, new Base64Decoder(new FileSink(os)));
 
-  shared_ptr<v1::PublicKey> ecdsaKey;
-  BOOST_REQUIRE_NO_THROW(ecdsaKey = make_shared<v1::PublicKey>(os.buf()->buf(), os.buf()->size()));
-  Name ecdsaKeyName("/TestSecPublicInfoSqlite3/KeyType/ECDSA/ksk-123");
+  shared_ptr<v1::PublicKey> ecKey;
+  BOOST_REQUIRE_NO_THROW(ecKey = make_shared<v1::PublicKey>(os.buf()->buf(), os.buf()->size()));
+  Name ecKeyName("/TestSecPublicInfoSqlite3/KeyType/EC/ksk-123");
   SecPublicInfoSqlite3 pib;
-  pib.addKey(ecdsaKeyName, *ecdsaKey);
+  pib.addKey(ecKeyName, *ecKey);
 
-  BOOST_CHECK_EQUAL(KeyType::EC, pib.getPublicKeyType(ecdsaKeyName));
-  pib.deleteIdentityInfo(Name("/TestSecPublicInfoSqlite3/KeyType/ECDSA"));
+  BOOST_CHECK_EQUAL(KeyType::EC, pib.getPublicKeyType(ecKeyName));
+  pib.deleteIdentityInfo(Name("/TestSecPublicInfoSqlite3/KeyType/EC"));
 }
 
 BOOST_AUTO_TEST_CASE(KeyTypeNonExistent)
diff --git a/tests/unit-tests/security/v1/sec-tpm-file.t.cpp b/tests/unit-tests/security/v1/sec-tpm-file.t.cpp
index 79e3645..54518d8 100644
--- a/tests/unit-tests/security/v1/sec-tpm-file.t.cpp
+++ b/tests/unit-tests/security/v1/sec-tpm-file.t.cpp
@@ -252,7 +252,7 @@
 
   Name keyName("/TestSecTpmFile/EcdsaSigning/ksk-" +
                boost::lexical_cast<std::string>(time::toUnixTimestamp(time::system_clock::now())));
-  EcdsaKeyParams params;
+  EcKeyParams params;
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, params));
 
   Data data("/TestSecTpmFile/EcdsaSigning/Data/1");
@@ -293,7 +293,7 @@
 }
 
 
-BOOST_AUTO_TEST_CASE(ImportExportEcdsaKey)
+BOOST_AUTO_TEST_CASE(ImportExportEcKey)
 {
   using namespace CryptoPP;
 
@@ -309,7 +309,7 @@
 
   SecTpmFile tpm;
 
-  Name keyName("/TestSecTpmFile/ImportExportEcdsaKey/ksk-" +
+  Name keyName("/TestSecTpmFile/ImportExportEcKey/ksk-" +
                boost::lexical_cast<std::string>(time::toUnixTimestamp(time::system_clock::now())));
 
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KeyClass::PRIVATE), false);
@@ -336,16 +336,16 @@
     {
       using namespace CryptoPP;
 
-      ECDSA<ECP, SHA256>::PublicKey ecdsaPublicKey;
+      ECDSA<ECP, SHA256>::PublicKey ecPublicKey;
       ByteQueue queue;
       queue.Put(reinterpret_cast<const byte*>(publicKey->get().buf()), publicKey->get().size());
-      ecdsaPublicKey.Load(queue);
+      ecPublicKey.Load(queue);
 
       uint8_t buffer[64];
       size_t usedSize = DSAConvertSignatureFormat(buffer, 64, DSA_P1363,
                                                   sigBlock.value(), sigBlock.value_size(), DSA_DER);
 
-      ECDSA<ECP, SHA256>::Verifier verifier(ecdsaPublicKey);
+      ECDSA<ECP, SHA256>::Verifier verifier(ecPublicKey);
       bool isVerified = verifier.VerifyMessage(content, sizeof(content),
                                                buffer, usedSize);
 
@@ -379,17 +379,17 @@
     {
       using namespace CryptoPP;
 
-      ECDSA<ECP, SHA256>::PublicKey ecdsaPublicKey;
+      ECDSA<ECP, SHA256>::PublicKey ecPublicKey;
       ByteQueue queue;
       queue.Put(reinterpret_cast<const byte*>(publicKey->get().buf()), publicKey->get().size());
-      ecdsaPublicKey.Load(queue);
+      ecPublicKey.Load(queue);
 
       uint8_t buffer[64];
       size_t usedSize = DSAConvertSignatureFormat(buffer, 64, DSA_P1363,
                                                   sigBlock2.value(), sigBlock2.value_size(),
                                                   DSA_DER);
 
-      ECDSA<ECP, SHA256>::Verifier verifier(ecdsaPublicKey);
+      ECDSA<ECP, SHA256>::Verifier verifier(ecPublicKey);
       bool isVerified = verifier.VerifyMessage(content2, sizeof(content2),
                                                buffer, usedSize);
 
diff --git a/tests/unit-tests/security/v1/sec-tpm-osx.t.cpp b/tests/unit-tests/security/v1/sec-tpm-osx.t.cpp
index 2d6fbcc..7c36328 100644
--- a/tests/unit-tests/security/v1/sec-tpm-osx.t.cpp
+++ b/tests/unit-tests/security/v1/sec-tpm-osx.t.cpp
@@ -246,7 +246,7 @@
 
   Name keyName("/TestSecTpmOsx/EcdsaSigning/ksk-" +
                boost::lexical_cast<std::string>(time::toUnixTimestamp(time::system_clock::now())));
-  EcdsaKeyParams params;
+  EcKeyParams params;
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, params));
 
   Data data("/TestSecTpmOsx/EcdsaSigning/Data/1");
@@ -287,17 +287,17 @@
 }
 
 
-BOOST_AUTO_TEST_CASE(ExportImportEcdsaKey)
+BOOST_AUTO_TEST_CASE(ExportImportEcKey)
 {
   using namespace CryptoPP;
 
   SecTpmOsx tpm;
 
-  Name keyName("/TestSecTpmOsx/ExportImportEcdsaKey/ksk-" +
+  Name keyName("/TestSecTpmOsx/ExportImportEcKey/ksk-" +
                boost::lexical_cast<std::string>(
                  time::toUnixTimestamp(time::system_clock::now()).count()));
 
-  EcdsaKeyParams params;
+  EcKeyParams params;
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, params));
 
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KeyClass::PRIVATE), true);
@@ -330,17 +330,17 @@
     {
       using namespace CryptoPP;
 
-      ECDSA<ECP, SHA256>::PublicKey ecdsaPublicKey;
+      ECDSA<ECP, SHA256>::PublicKey ecPublicKey;
       ByteQueue queue;
       queue.Put(reinterpret_cast<const byte*>(publicKey->get().buf()), publicKey->get().size());
-      ecdsaPublicKey.Load(queue);
+      ecPublicKey.Load(queue);
 
       uint8_t buffer[64];
       size_t usedSize = DSAConvertSignatureFormat(buffer, 64, DSA_P1363,
                                                   sigBlock.value(), sigBlock.value_size(),
                                                   DSA_DER);
 
-      ECDSA<ECP, SHA256>::Verifier verifier(ecdsaPublicKey);
+      ECDSA<ECP, SHA256>::Verifier verifier(ecPublicKey);
       bool isVerified = verifier.VerifyMessage(content, sizeof(content),
                                                buffer, usedSize);