diff --git a/tools/ndnsec/cert-dump.hpp b/tools/ndnsec/cert-dump.hpp
index cd56e6e..2cfc661 100644
--- a/tools/ndnsec/cert-dump.hpp
+++ b/tools/ndnsec/cert-dump.hpp
@@ -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).
  *
@@ -130,7 +130,7 @@
 
   shared_ptr<v1::IdentityCertificate> certificate;
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   if (isIdentityName || isKeyName || isCertName) {
     if (isIdentityName) {
diff --git a/tools/ndnsec/cert-gen.hpp b/tools/ndnsec/cert-gen.hpp
index 04da040..4be98a1 100644
--- a/tools/ndnsec/cert-gen.hpp
+++ b/tools/ndnsec/cert-gen.hpp
@@ -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).
  *
@@ -37,7 +37,7 @@
   using namespace ndn::security;
   namespace po = boost::program_options;
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   std::string notBeforeStr;
   std::string notAfterStr;
@@ -46,7 +46,7 @@
   Name signId;
   std::string subjectInfo;
   std::vector<std::string> signedInfo;
-  Name certPrefix = KeyChain::DEFAULT_PREFIX; // to avoid displaying the default value
+  Name certPrefix = ndn::security::v1::KeyChain::DEFAULT_PREFIX; // to avoid displaying the default value
 
   po::options_description description(
     "General Usage\n"
diff --git a/tools/ndnsec/cert-install.hpp b/tools/ndnsec/cert-install.hpp
index a1416ff..f37f04a 100644
--- a/tools/ndnsec/cert-install.hpp
+++ b/tools/ndnsec/cert-install.hpp
@@ -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).
  *
@@ -188,7 +188,7 @@
   if (!static_cast<bool>(cert))
     return 1;
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   if (isSystemDefault) {
     keyChain.addCertificateAsIdentityDefault(*cert);
diff --git a/tools/ndnsec/cert-revoke.hpp b/tools/ndnsec/cert-revoke.hpp
index 6aa8d02..6e948e0 100644
--- a/tools/ndnsec/cert-revoke.hpp
+++ b/tools/ndnsec/cert-revoke.hpp
@@ -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).
  *
@@ -33,12 +33,12 @@
   using namespace ndn::security;
   namespace po = boost::program_options;
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   std::string requestFile("-");
   Name signId = keyChain.getDefaultIdentity();
   bool hasSignId = false;
-  Name certPrefix = KeyChain::DEFAULT_PREFIX;
+  Name certPrefix = ndn::security::v1::KeyChain::DEFAULT_PREFIX;
 
   po::options_description description("General Usage\n  ndnsec cert-revoke [-h] request\n"
                                       "General options");
@@ -108,7 +108,7 @@
     }
 
     Name certName;
-    if (certPrefix == KeyChain::DEFAULT_PREFIX) {
+    if (certPrefix == ndn::security::v1::KeyChain::DEFAULT_PREFIX) {
       certName = revokedCertificate->getName().getPrefix(-1);
     }
     else {
@@ -157,7 +157,7 @@
     std::cerr << "ERROR: Cannot determine the signing key!" << std::endl;
     return 1;
   }
-  catch (const SecPublicInfo::Error& e) {
+  catch (const v1::SecPublicInfo::Error& e) {
     std::cerr << "ERROR: Incomplete or corrupted PIB (" << e.what() << ")" << std::endl;
     return 1;
   }
diff --git a/tools/ndnsec/delete.hpp b/tools/ndnsec/delete.hpp
index 0c96af4..420af1c 100644
--- a/tools/ndnsec/delete.hpp
+++ b/tools/ndnsec/delete.hpp
@@ -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).
  *
@@ -82,7 +82,7 @@
   else if (vm.count("delete-key") != 0 || vm.count("delete-key2") != 0)
     isDeleteKey = true;
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   try {
     if (isDeleteCert) {
@@ -114,15 +114,15 @@
       std::cerr << "OK: Delete identity: " << name << std::endl;
     }
   }
-  catch (const SecPublicInfo::Error& e) {
+  catch (const ndn::security::v1::SecPublicInfo::Error& e) {
     std::cerr << "ERROR: Cannot delete the item: " << e.what() << std::endl;
     return 2;
   }
-  catch (const SecTpm::Error& e) {
+  catch (const ndn::security::v1::SecTpm::Error& e) {
     std::cerr << "ERROR: Cannot delete the item: " << e.what() << std::endl;
     return 2;
   }
-  catch (const KeyChain::Error& e) {
+  catch (const ndn::security::v1::KeyChain::Error& e) {
     std::cerr << "ERROR: " << e.what() << std::endl;
     return 2;
   }
diff --git a/tools/ndnsec/dsk-gen.hpp b/tools/ndnsec/dsk-gen.hpp
index 4f994c3..207100e 100644
--- a/tools/ndnsec/dsk-gen.hpp
+++ b/tools/ndnsec/dsk-gen.hpp
@@ -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).
  *
@@ -77,7 +77,7 @@
   shared_ptr<v1::IdentityCertificate> kskCert;
   Name signingCertName;
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   try {
     Name defaultCertName = keyChain.getDefaultCertificateNameForIdentity(identityName);
diff --git a/tools/ndnsec/export.hpp b/tools/ndnsec/export.hpp
index cd0c786..45c3d32 100644
--- a/tools/ndnsec/export.hpp
+++ b/tools/ndnsec/export.hpp
@@ -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).
  *
@@ -79,7 +79,7 @@
 
   Name identity(identityStr);
   if (!isPrivateExport) {
-    KeyChain keyChain;
+    ndn::security::v1::KeyChain keyChain;
     shared_ptr<security::v1::IdentityCertificate> cert
       = keyChain.getCertificate(keyChain.getDefaultCertificateNameForIdentity(identity));
 
@@ -93,7 +93,7 @@
   else {
     Block wire;
     try {
-      KeyChain keyChain;
+      ndn::security::v1::KeyChain keyChain;
 
       int count = 3;
       while (!getPassword(exportPassword, "Passphrase for the private key: ")) {
@@ -104,7 +104,7 @@
           return 1;
         }
       }
-      shared_ptr<SecuredBag> securedBag = keyChain.exportIdentity(identity, exportPassword);
+      shared_ptr<ndn::security::v1::SecuredBag> securedBag = keyChain.exportIdentity(identity, exportPassword);
       memset(const_cast<char*>(exportPassword.c_str()), 0, exportPassword.size());
 
       if (output == "-")
diff --git a/tools/ndnsec/get-default.hpp b/tools/ndnsec/get-default.hpp
index 41f4f2a..b701015 100644
--- a/tools/ndnsec/get-default.hpp
+++ b/tools/ndnsec/get-default.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 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).
  *
@@ -26,7 +26,6 @@
 
 #include "util.hpp"
 
-
 int
 ndnsec_get_default(int argc, char** argv)
 {
@@ -85,7 +84,7 @@
       isQuiet = true;
     }
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   if (vm.count("key") != 0)
     {
diff --git a/tools/ndnsec/import.hpp b/tools/ndnsec/import.hpp
index 3a42c1b..41cf602 100644
--- a/tools/ndnsec/import.hpp
+++ b/tools/ndnsec/import.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 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).
  *
@@ -79,13 +79,13 @@
     {
       try
         {
-          KeyChain keyChain;
+          ndn::security::v1::KeyChain keyChain;
 
-          shared_ptr<SecuredBag> securedBag;
+          shared_ptr<ndn::security::v1::SecuredBag> securedBag;
           if (input == "-")
-            securedBag = io::load<SecuredBag>(std::cin);
+            securedBag = io::load<ndn::security::v1::SecuredBag>(std::cin);
           else
-            securedBag = io::load<SecuredBag>(input);
+            securedBag = io::load<ndn::security::v1::SecuredBag>(input);
 
           int count = 3;
           while (!getPassword(importPassword, "Passphrase for the private key: "))
diff --git a/tools/ndnsec/key-gen.hpp b/tools/ndnsec/key-gen.hpp
index 1384ac8..5be5ce7 100644
--- a/tools/ndnsec/key-gen.hpp
+++ b/tools/ndnsec/key-gen.hpp
@@ -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).
  *
@@ -85,7 +85,7 @@
 
   bool isKsk = (vm.count("dsk") == 0);
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
   Name keyName;
 
   try {
diff --git a/tools/ndnsec/list.hpp b/tools/ndnsec/list.hpp
index 8a750f2..d7d3c4f 100644
--- a/tools/ndnsec/list.hpp
+++ b/tools/ndnsec/list.hpp
@@ -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).
  *
@@ -27,7 +27,7 @@
 #include "util.hpp"
 
 void
-printCertificate(ndn::KeyChain& keyChain,
+printCertificate(ndn::security::v1::KeyChain& keyChain,
                  const ndn::Name& certName,
                  bool isDefault,
                  int verboseLevel)
@@ -47,7 +47,7 @@
 }
 
 void
-printKey(ndn::KeyChain& keyChain,
+printKey(ndn::security::v1::KeyChain& keyChain,
          const ndn::Name& keyName,
          bool isDefault,
          int verboseLevel)
@@ -74,7 +74,7 @@
 }
 
 void
-printIdentity(ndn::KeyChain& keyChain,
+printIdentity(ndn::security::v1::KeyChain& keyChain,
               const ndn::Name& identity,
               bool isDefault,
               int verboseLevel)
@@ -154,7 +154,7 @@
 
   verboseLevel = std::max(verboseLevel, tmpVerboseLevel);
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   std::vector<Name> defaultIdentities;
   keyChain.getAllIdentities(defaultIdentities, true);
diff --git a/tools/ndnsec/main.cpp b/tools/ndnsec/main.cpp
index f0c97b7..b86fee1 100644
--- a/tools/ndnsec/main.cpp
+++ b/tools/ndnsec/main.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 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).
  *
@@ -23,6 +23,10 @@
 
 #include "version.hpp"
 
+#include "security/key-chain.hpp"
+#include "security/v1/certificate-subject-description.hpp"
+#include "security/v1/secured-bag.hpp"
+
 #include "util.hpp"
 #include "list.hpp"
 #include "get-default.hpp"
@@ -37,12 +41,13 @@
 #include "export.hpp"
 #include "import.hpp"
 #include "delete.hpp"
-#include "sig-verify.hpp"
 #include "set-acl.hpp"
 #include "unlock-tpm.hpp"
 #include "op-tool.hpp"
 
 using namespace ndn;
+using namespace ndn::security;
+using namespace ndn::security::v1;
 
 std::string ndnsec_helper("\
   help         Show all commands.\n\
@@ -60,7 +65,6 @@
   delete       Delete identity/key/certificate.\n\
   export       Export an identity package.\n\
   import       Import an identity package.\n\
-  sig-verify   Verify the signature of a Data packet.\n\
   set-acl      Configure ACL of a private key.\n\
   unlock-tpm   Unlock Tpm.\n\
   op-tool      Operator tool.\n\
@@ -95,7 +99,6 @@
       else if (command == "delete")       { return ndnsec_delete(argc - 1, argv + 1); }
       else if (command == "export")       { return ndnsec_export(argc - 1, argv + 1); }
       else if (command == "import")       { return ndnsec_import(argc - 1, argv + 1); }
-      else if (command == "sig-verify")   { return ndnsec_sig_verify(argc - 1, argv + 1); }
       else if (command == "set-acl")      { return ndnsec_set_acl(argc - 1, argv + 1); }
       else if (command == "unlock-tpm")   { return ndnsec_unlock_tpm(argc - 1, argv + 1); }
       else if (command == "op-tool")      { return ndnsec_op_tool(argc - 1, argv + 1); }
diff --git a/tools/ndnsec/op-tool.hpp b/tools/ndnsec/op-tool.hpp
index 5766949..971ad98 100644
--- a/tools/ndnsec/op-tool.hpp
+++ b/tools/ndnsec/op-tool.hpp
@@ -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).
  *
@@ -72,7 +72,7 @@
 
   if (command == "sign") // the content to be signed from stdin
     {
-      KeyChain keyChain;
+      ndn::security::v1::KeyChain keyChain;
 
       Buffer dataToSign((std::istreambuf_iterator<char>(std::cin)), std::istreambuf_iterator<char>());
 
diff --git a/tools/ndnsec/set-acl.hpp b/tools/ndnsec/set-acl.hpp
index ca639b6..cf12d55 100644
--- a/tools/ndnsec/set-acl.hpp
+++ b/tools/ndnsec/set-acl.hpp
@@ -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).
  *
@@ -79,7 +79,7 @@
       return 1;
     }
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
   keyChain.addAppToAcl(keyName, KeyClass::PRIVATE, appPath, AclType::PRIVATE);
 
   return 0;
diff --git a/tools/ndnsec/set-default.hpp b/tools/ndnsec/set-default.hpp
index ed23b6f..d1ff7fa 100644
--- a/tools/ndnsec/set-default.hpp
+++ b/tools/ndnsec/set-default.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 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).
  *
@@ -73,7 +73,7 @@
       return 1;
     }
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   if (vm.count("default_key") != 0)
     {
diff --git a/tools/ndnsec/sig-verify.hpp b/tools/ndnsec/sig-verify.hpp
deleted file mode 100644
index 28107ce..0000000
--- a/tools/ndnsec/sig-verify.hpp
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2015 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- *
- * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
- */
-
-#ifndef NDN_TOOLS_NDNSEC_SIG_VERIFY_HPP
-#define NDN_TOOLS_NDNSEC_SIG_VERIFY_HPP
-
-#include "util.hpp"
-
-// using namespace ndn;
-// namespace po = boost::program_options;
-
-// shared_ptr<IdentityCertificate>
-// getCertificate(const std::string& certString)
-// {
-//   std::string decoded;
-//   CryptoPP::StringSource ss2(reinterpret_cast<const unsigned char *>(certString.c_str()), certString.size(), true,
-//                              new CryptoPP::Base64Decoder(new CryptoPP::StringSink(decoded)));
-
-//   Data data;
-//   data.wireDecode(Block(make_shared<Buffer>(decoded.begin(), decoded.end())));
-
-//   shared_ptr<IdentityCertificate> identityCertificate = make_shared<IdentityCertificate>(data);
-
-//   return identityCertificate;
-// }
-
-// bool
-// verifySignature(shared_ptr<IdentityCertificate> certificate, bool isDataPacket)
-// {
-//   throw std::runtime_error("Not supported yet");
-//   // if(isDataPacket)
-//   //   {
-//   //     std::string decoded;
-//   //     CryptoPP::FileSource ss2(cin, true,
-//   //                              new CryptoPP::Base64Decoder(new CryptoPP::StringSink(decoded)));
-
-//   //     Data data;
-//   //     data.wireDecode(make_shared<Buffer>(decoded.c_str(), decoded.size()));
-//   //     return PolicyManager::verifySignature(data, certificate->getPublicKeyInfo());
-//   //   }
-//   // else
-//   //   {
-//   //     // The first two bytes indicates the boundary of the of the signed data and signature.
-//   //     // for example, if the size of the signed data is 300, then the boundary should be 300, so the first two bytes should be: 0x01 0x2C
-//   //     shared_ptr<Blob> input = shared_ptr<Blob>(new Blob ((istreambuf_iterator<char>(cin)), istreambuf_iterator<char>()));
-//   //     size_t size = input->at(0);
-//   //     size = ((size << 8) + input->at(1));
-
-//   //     Blob signedBlob(input->buf()+2, size);
-//   //     Blob signature(input->buf()+2+size, input->size()-2-size);
-
-//   //     return PolicyManager::verifySignature(signedBlob, signature, certificate->getPublicKeyInfo());
-//   //   }
-// }
-
-int
-ndnsec_sig_verify(int argc, char** argv)
-{
-  std::cerr << "Not supported yet" << std::endl;
-  return 1;
-  // bool isDataPacket = false;
-  // std::string certString;
-
-  // po::options_description desc("General Usage\n  ndn-sig-verify [-h] [-d] certificate\nGeneral options");
-  // desc.add_options()
-  //   ("help,h", "produce help message")
-  //   ("data,d", "if specified, input from stdin will be treated as a Data packet, otherwise binary data")
-  //   ("certificate,c", po::value<std::string>(&certString), "the certificate bits")
-  //   ;
-
-  // po::positional_options_description p;
-  // p.add("certificate", 1);
-
-  // po::variables_map vm;
-  // try
-  //   {
-  //     po::store(po::command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
-  //     po::notify(vm);
-  //   }
-  // catch( const std::exception& e)
-  //   {
-  //     std::cerr << e.what() << std::endl;
-  //     std::cerr << desc << std::endl;
-  //     return 1;
-  //   }
-
-  // if (vm.count("help") || vm.count("certificate")==0)
-  //   {
-  //     std::cerr << desc << std::endl;
-  //     return 1;
-  //   }
-  // if (vm.count("data"))
-  //   isDataPacket = true;
-
-  // try
-  //   {
-  //     shared_ptr<IdentityCertificate> certificate = getCertificate(certString);
-  //     bool res = verifySignature(certificate, isDataPacket);
-  //     return (res ? 0 : 1);
-  //   }
-  // catch(const std::exception &e)
-  //   {
-  //     std::cerr << "ERROR: " << e.what() << std::endl;
-  //     return 1;
-  //   }
-}
-
-#endif // NDN_TOOLS_NDNSEC_SIG_VERIFY_HPP
diff --git a/tools/ndnsec/sign-req.hpp b/tools/ndnsec/sign-req.hpp
index bb8906e..425839f 100644
--- a/tools/ndnsec/sign-req.hpp
+++ b/tools/ndnsec/sign-req.hpp
@@ -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).
  *
@@ -78,7 +78,7 @@
 
   shared_ptr<v1::IdentityCertificate> selfSignCert;
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   if (isKeyName)
     selfSignCert = keyChain.selfSign(name);
diff --git a/tools/ndnsec/unlock-tpm.hpp b/tools/ndnsec/unlock-tpm.hpp
index 2127848..927bc81 100644
--- a/tools/ndnsec/unlock-tpm.hpp
+++ b/tools/ndnsec/unlock-tpm.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 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).
  *
@@ -62,7 +62,7 @@
 
   bool isUnlocked = false;
 
-  KeyChain keyChain;
+  ndn::security::v1::KeyChain keyChain;
 
   char* password;
   password = getpass("Password to unlock the TPM: ");
