diff --git a/daemon/mgmt/command-authenticator.cpp b/daemon/mgmt/command-authenticator.cpp
index c146962..833400c 100644
--- a/daemon/mgmt/command-authenticator.cpp
+++ b/daemon/mgmt/command-authenticator.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -27,17 +27,17 @@
 #include "common/logger.hpp"
 
 #include <ndn-cxx/tag.hpp>
-#include <ndn-cxx/security/v2/certificate-fetcher-offline.hpp>
-#include <ndn-cxx/security/v2/certificate-request.hpp>
-#include <ndn-cxx/security/v2/validation-policy.hpp>
-#include <ndn-cxx/security/v2/validation-policy-accept-all.hpp>
-#include <ndn-cxx/security/v2/validation-policy-command-interest.hpp>
-#include <ndn-cxx/security/v2/validator.hpp>
+#include <ndn-cxx/security/certificate-fetcher-offline.hpp>
+#include <ndn-cxx/security/certificate-request.hpp>
+#include <ndn-cxx/security/validation-policy.hpp>
+#include <ndn-cxx/security/validation-policy-accept-all.hpp>
+#include <ndn-cxx/security/validation-policy-command-interest.hpp>
+#include <ndn-cxx/security/validator.hpp>
 #include <ndn-cxx/util/io.hpp>
 
 #include <boost/filesystem.hpp>
 
-namespace sec2 = ndn::security::v2;
+namespace security = ndn::security;
 
 namespace nfd {
 
@@ -65,11 +65,11 @@
 
 /** \brief a validation policy that only permits Interest signed by a trust anchor
  */
-class CommandAuthenticatorValidationPolicy : public sec2::ValidationPolicy
+class CommandAuthenticatorValidationPolicy : public security::ValidationPolicy
 {
 public:
   void
-  checkPolicy(const Interest& interest, const shared_ptr<sec2::ValidationState>& state,
+  checkPolicy(const Interest& interest, const shared_ptr<security::ValidationState>& state,
               const ValidationContinuation& continueValidation) final
   {
     Name klName = getKeyLocatorName(interest, *state);
@@ -80,14 +80,14 @@
     // SignerTag must be placed on the 'original Interest' in ValidationState to be available for
     // InterestValidationSuccessCallback. The 'interest' parameter refers to a different instance
     // which is copied into 'original Interest'.
-    auto state1 = dynamic_pointer_cast<sec2::InterestValidationState>(state);
+    auto state1 = dynamic_pointer_cast<security::InterestValidationState>(state);
     state1->getOriginalInterest().setTag(make_shared<SignerTag>(klName));
 
-    continueValidation(make_shared<sec2::CertificateRequest>(Interest(klName)), state);
+    continueValidation(make_shared<security::CertificateRequest>(Interest(klName)), state);
   }
 
   void
-  checkPolicy(const Data& data, const shared_ptr<sec2::ValidationState>& state,
+  checkPolicy(const Data& data, const shared_ptr<security::ValidationState>& state,
               const ValidationContinuation& continueValidation) final
   {
     // Non-certificate Data are not handled by CommandAuthenticator.
@@ -117,9 +117,9 @@
   if (!isDryRun) {
     NFD_LOG_INFO("clear-authorizations");
     for (auto& kv : m_validators) {
-      kv.second = make_shared<sec2::Validator>(
-        make_unique<sec2::ValidationPolicyCommandInterest>(make_unique<CommandAuthenticatorValidationPolicy>()),
-        make_unique<sec2::CertificateFetcherOffline>());
+      kv.second = make_shared<security::Validator>(
+        make_unique<security::ValidationPolicyCommandInterest>(make_unique<CommandAuthenticatorValidationPolicy>()),
+        make_unique<security::CertificateFetcherOffline>());
     }
   }
 
@@ -144,7 +144,7 @@
     }
 
     bool isAny = false;
-    shared_ptr<sec2::Certificate> cert;
+    shared_ptr<security::Certificate> cert;
     if (certfile == "any") {
       isAny = true;
       NFD_LOG_WARN("'certfile any' is intended for demo purposes only and "
@@ -153,7 +153,7 @@
     else {
       using namespace boost::filesystem;
       path certfilePath = absolute(certfile, path(filename).parent_path());
-      cert = ndn::io::load<sec2::Certificate>(certfilePath.string());
+      cert = ndn::io::load<security::Certificate>(certfilePath.string());
       if (cert == nullptr) {
         NDN_THROW(ConfigFile::Error("cannot load certfile " + certfilePath.string() +
                                     " for authorize[" + to_string(authSectionIndex) + "]"));
@@ -185,13 +185,13 @@
       }
 
       if (isAny) {
-        found->second = make_shared<sec2::Validator>(make_unique<sec2::ValidationPolicyAcceptAll>(),
-                                                     make_unique<sec2::CertificateFetcherOffline>());
+        found->second = make_shared<security::Validator>(make_unique<security::ValidationPolicyAcceptAll>(),
+                                                         make_unique<security::CertificateFetcherOffline>());
         NFD_LOG_INFO("authorize module=" << module << " signer=any");
       }
       else {
         const Name& keyName = cert->getKeyName();
-        sec2::Certificate certCopy = *cert;
+        security::Certificate certCopy = *cert;
         found->second->loadAnchor(certfile, std::move(certCopy));
         NFD_LOG_INFO("authorize module=" << module << " signer=" << keyName << " certfile=" << certfile);
       }
@@ -215,20 +215,20 @@
     auto successCb = [accept, validator] (const Interest& interest1) {
       auto signer1 = getSignerFromTag(interest1);
       BOOST_ASSERT(signer1 || // signer must be available unless 'certfile any'
-                   dynamic_cast<sec2::ValidationPolicyAcceptAll*>(&validator->getPolicy()) != nullptr);
+                   dynamic_cast<security::ValidationPolicyAcceptAll*>(&validator->getPolicy()) != nullptr);
       std::string signer = signer1.value_or("*");
       NFD_LOG_DEBUG("accept " << interest1.getName() << " signer=" << signer);
       accept(signer);
     };
-    auto failureCb = [reject] (const Interest& interest1, const sec2::ValidationError& err) {
+    auto failureCb = [reject] (const Interest& interest1, const security::ValidationError& err) {
       using ndn::mgmt::RejectReply;
       RejectReply reply = RejectReply::STATUS403;
       switch (err.getCode()) {
-      case sec2::ValidationError::NO_SIGNATURE:
-      case sec2::ValidationError::INVALID_KEY_LOCATOR:
+      case security::ValidationError::NO_SIGNATURE:
+      case security::ValidationError::INVALID_KEY_LOCATOR:
         reply = RejectReply::SILENT;
         break;
-      case sec2::ValidationError::POLICY_ERROR:
+      case security::ValidationError::POLICY_ERROR:
         if (interest1.getName().size() < ndn::command_interest::MIN_SIZE) { // "name too short"
           reply = RejectReply::SILENT;
         }
diff --git a/daemon/mgmt/command-authenticator.hpp b/daemon/mgmt/command-authenticator.hpp
index 9f136a8..8d5158e 100644
--- a/daemon/mgmt/command-authenticator.hpp
+++ b/daemon/mgmt/command-authenticator.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -29,14 +29,7 @@
 #include "common/config-file.hpp"
 
 #include <ndn-cxx/mgmt/dispatcher.hpp>
-
-namespace ndn {
-namespace security {
-namespace v2 {
-class Validator;
-} // namespace v2
-} // namespace security
-} // namespace ndn
+#include <ndn-cxx/security/validator.hpp>
 
 namespace nfd {
 
@@ -70,7 +63,7 @@
 
 private:
   /// module => validator
-  std::unordered_map<std::string, shared_ptr<ndn::security::v2::Validator>> m_validators;
+  std::unordered_map<std::string, shared_ptr<ndn::security::Validator>> m_validators;
 };
 
 } // namespace nfd
diff --git a/daemon/mgmt/rib-manager.cpp b/daemon/mgmt/rib-manager.cpp
index 768526b..68b061e 100644
--- a/daemon/mgmt/rib-manager.cpp
+++ b/daemon/mgmt/rib-manager.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -33,7 +33,7 @@
 #include <ndn-cxx/lp/tags.hpp>
 #include <ndn-cxx/mgmt/nfd/face-status.hpp>
 #include <ndn-cxx/mgmt/nfd/rib-entry.hpp>
-#include <ndn-cxx/security/v2/certificate-fetcher-direct-fetch.hpp>
+#include <ndn-cxx/security/certificate-fetcher-direct-fetch.hpp>
 
 namespace nfd {
 
@@ -57,8 +57,8 @@
   , m_dispatcher(dispatcher)
   , m_faceMonitor(face)
   , m_localhostValidator(face)
-  , m_localhopValidator(make_unique<ndn::security::v2::CertificateFetcherDirectFetch>(face))
-  , m_paValidator(make_unique<ndn::security::v2::CertificateFetcherDirectFetch>(face))
+  , m_localhopValidator(make_unique<ndn::security::CertificateFetcherDirectFetch>(face))
+  , m_paValidator(make_unique<ndn::security::CertificateFetcherDirectFetch>(face))
   , m_isLocalhopEnabled(false)
 {
   registerCommandHandler<ndn::nfd::RibRegisterCommand>("register",
@@ -370,7 +370,7 @@
           cb(res);
         });
     },
-    [=] (const Data&, ndn::security::v2::ValidationError err) {
+    [=] (const Data&, ndn::security::ValidationError err) {
       NFD_LOG_INFO("slAnnounce " << pa.getAnnouncedName() << " " << faceId <<
                    " validation error: " << err);
       cb(SlAnnounceResult::VALIDATION_FAILURE);
diff --git a/tests/daemon/mgmt/rib-manager.t.cpp b/tests/daemon/mgmt/rib-manager.t.cpp
index d21b878..6ed5b0a 100644
--- a/tests/daemon/mgmt/rib-manager.t.cpp
+++ b/tests/daemon/mgmt/rib-manager.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -235,7 +235,7 @@
   ConfigurationStatus m_status;
   Name m_anchorId;
   Name m_derivedId;
-  ndn::security::v2::Certificate m_derivedCert;
+  ndn::security::Certificate m_derivedCert;
 
   ndn::nfd::Controller m_nfdController;
   rib::Rib m_rib;
diff --git a/tests/key-chain-fixture.cpp b/tests/key-chain-fixture.cpp
index acefabe..9e20dd3 100644
--- a/tests/key-chain-fixture.cpp
+++ b/tests/key-chain-fixture.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -25,11 +25,11 @@
 
 #include "tests/key-chain-fixture.hpp"
 
+#include <ndn-cxx/security/certificate.hpp>
 #include <ndn-cxx/security/pib/identity.hpp>
 #include <ndn-cxx/security/pib/key.hpp>
 #include <ndn-cxx/security/pib/pib.hpp>
 #include <ndn-cxx/security/transform.hpp>
-#include <ndn-cxx/security/v2/certificate.hpp>
 #include <ndn-cxx/util/io.hpp>
 
 #include <boost/filesystem.hpp>
@@ -66,7 +66,7 @@
 bool
 KeyChainFixture::saveIdentityCertificate(const Name& identity, const std::string& filename, bool allowAdd)
 {
-  ndn::security::v2::Certificate cert;
+  ndn::security::Certificate cert;
   try {
     cert = m_keyChain.getPib().getIdentity(identity).getDefaultKey().getDefaultCertificate();
   }
@@ -90,7 +90,7 @@
 std::string
 KeyChainFixture::getIdentityCertificateBase64(const Name& identity, bool allowAdd)
 {
-  ndn::security::v2::Certificate cert;
+  ndn::security::Certificate cert;
   try {
     cert = m_keyChain.getPib().getIdentity(identity).getDefaultKey().getDefaultCertificate();
   }
diff --git a/tests/tools/ndn-autoconfig-server/program.t.cpp b/tests/tools/ndn-autoconfig-server/program.t.cpp
index 88488a1..e4268a0 100644
--- a/tests/tools/ndn-autoconfig-server/program.t.cpp
+++ b/tests/tools/ndn-autoconfig-server/program.t.cpp
@@ -97,7 +97,7 @@
 
   Name baseName("/localhop/nfd/rib/routable-prefixes");
   auto fetcher = util::SegmentFetcher::start(clientFace, Interest(baseName),
-                                             security::v2::getAcceptAllValidator());
+                                             security::getAcceptAllValidator());
   fetcher->afterSegmentReceived.connect([baseName] (const Data& data) {
     const Name& dataName = data.getName();
     BOOST_CHECK_EQUAL(dataName.size(), baseName.size() + 2);
diff --git a/tests/tools/nfdc/status-fixture.hpp b/tests/tools/nfdc/status-fixture.hpp
index 4517254..f5fc2ec 100644
--- a/tests/tools/nfdc/status-fixture.hpp
+++ b/tests/tools/nfdc/status-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -44,8 +44,8 @@
 
 using ndn::Face;
 using ndn::KeyChain;
-using ndn::security::v2::Validator;
-using ndn::security::v2::ValidatorNull;
+using ndn::security::Validator;
+using ndn::security::ValidatorNull;
 using boost::test_tools::output_test_stream;
 
 class MakeValidatorNull
diff --git a/tools/nfdc/status-report.hpp b/tools/nfdc/status-report.hpp
index 1658852..f88b175 100644
--- a/tools/nfdc/status-report.hpp
+++ b/tools/nfdc/status-report.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -29,7 +29,7 @@
 #include "module.hpp"
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/security/v2/validator.hpp>
+#include <ndn-cxx/security/validator.hpp>
 
 namespace nfd {
 namespace tools {
@@ -37,7 +37,7 @@
 
 using ndn::Face;
 using ndn::KeyChain;
-using ndn::security::v2::Validator;
+using ndn::security::Validator;
 
 enum class ReportFormat {
   XML = 1,
diff --git a/tools/nfdc/status.cpp b/tools/nfdc/status.cpp
index a47d12b..441c3a9 100644
--- a/tools/nfdc/status.cpp
+++ b/tools/nfdc/status.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -72,7 +72,7 @@
   }
 
   uint32_t code = report.collect(ctx.face, ctx.keyChain,
-                                 ndn::security::v2::getAcceptAllValidator(),
+                                 ndn::security::getAcceptAllValidator(),
                                  CommandOptions());
   if (code != 0) {
     ctx.exitCode = 1;
