diff --git a/src/communication/data-manager.cpp b/src/communication/data-manager.cpp
index bcae456..f56dd79 100644
--- a/src/communication/data-manager.cpp
+++ b/src/communication/data-manager.cpp
@@ -9,7 +9,7 @@
 #include "data-manager.hpp"
 #include "utility/tokenizer.hpp"
 #include "lsdb.hpp"
-#include "security/key-manager.hpp"
+// #include "security/key-manager.hpp"
 
 namespace nlsr {
 
@@ -30,7 +30,7 @@
   }
   else
   {
-    if (m_nlsr.getKeyManager().verify(data))
+    // if (m_nlsr.getKeyManager().verify(data))
     {
       std::cout << "Verified Data Content" << std::endl;
       chkString = "info";
@@ -46,10 +46,10 @@
         processContentLsa(dataName, dataContent);
       }
     }
-    else
-    {
-      std::cout << "Unverified Data Content. Discarded" << std::endl;
-    }
+    // else
+    // {
+    //   std::cout << "Unverified Data Content. Discarded" << std::endl;
+    // }
   }
 }
 
@@ -200,14 +200,14 @@
   uint32_t seqNum = boost::lexical_cast<uint32_t>(nt.getToken(
                                                     nt.getTokenNumber() - 2));
   std::cout << "Cert Name: " << certName << " Seq Num: " << seqNum << std::endl;
-  if (m_nlsr.getKeyManager().verify(m_nlsr, *(cert)))
-  {
-    m_nlsr.getKeyManager().addCertificate(cert, seqNum, true);
-  }
-  else
-  {
-    m_nlsr.getKeyManager().addCertificate(cert, seqNum, false);
-  }
-  m_nlsr.getKeyManager().printCertStore();
+  // if (m_nlsr.getKeyManager().verify(m_nlsr, *(cert)))
+  // {
+  //   m_nlsr.getKeyManager().addCertificate(cert, seqNum, true);
+  // }
+  // else
+  // {
+  //   m_nlsr.getKeyManager().addCertificate(cert, seqNum, false);
+  // }
+  // m_nlsr.getKeyManager().printCertStore();
 }
 }//namespace nlsr
diff --git a/src/communication/interest-manager.cpp b/src/communication/interest-manager.cpp
index 226efaf..070c92b 100644
--- a/src/communication/interest-manager.cpp
+++ b/src/communication/interest-manager.cpp
@@ -52,7 +52,8 @@
     Data data(ndn::Name(interest.getName()).appendVersion());
     data.setFreshnessPeriod(time::seconds(10)); // 10 sec
     data.setContent((const uint8_t*)"info", sizeof("info"));
-    m_nlsr.getKeyManager().signData(data);
+    // m_nlsr.getKeyManager().signData(data);
+    m_keyChain.sign(data);
     cout << ">> D: " << data << endl;
     m_nlsr.getNlsrFace()->put(data);
     int status = m_nlsr.getAdl().getStatusOfNeighbor(neighbor);
@@ -125,7 +126,8 @@
       data.setFreshnessPeriod(time::seconds(10)); // 10 sec
       string content = nameLsa->getData();
       data.setContent((const uint8_t*)content.c_str(), content.size());
-      m_nlsr.getKeyManager().signData(data);
+      // m_nlsr.getKeyManager().signData(data);
+      m_keyChain.sign(data);
       std::cout << ">> D: " << data << std::endl;
       m_nlsr.getNlsrFace()->put(data);
     }
@@ -145,7 +147,8 @@
       data.setFreshnessPeriod(time::seconds(10)); // 10 sec
       string content = adjLsa->getData();
       data.setContent((const uint8_t*)content.c_str(), content.size());
-      m_nlsr.getKeyManager().signData(data);
+      // m_nlsr.getKeyManager().signData(data);
+      m_keyChain.sign(data);
       std::cout << ">> D: " << data << std::endl;
       m_nlsr.getNlsrFace()->put(data);
     }
@@ -165,7 +168,8 @@
       data.setFreshnessPeriod(time::seconds(10)); // 10 sec
       string content = corLsa->getData();
       data.setContent((const uint8_t*)content.c_str(), content.size());
-      m_nlsr.getKeyManager().signData(data);
+      // m_nlsr.getKeyManager().signData(data);
+      m_keyChain.sign(data);
       std::cout << ">> D: " << data << std::endl;
       m_nlsr.getNlsrFace()->put(data);
     }
@@ -176,56 +180,56 @@
 InterestManager::processInterestKeys(const ndn::Interest& interest)
 {
   std::cout << "processInterestKeys called " << std::endl;
-  string intName = interest.getName().toUri();
-  std::cout << "Interest Name for Key: " << intName << std::endl;
-  Tokenizer nt(intName, "/");
-  std::string chkString("ID-CERT");
-  std::string certName;
-  uint32_t seqNum;
-  ndn::Name dataName;
-  std::pair<ndn::shared_ptr<ndn::IdentityCertificate>, bool> chkCert;
-  if (nt.getTokenPosition(chkString) == nt.getTokenNumber() - 1)
-  {
-    certName = nt.getTokenString(0, nt.getTokenNumber() - 1);
-    cout << "Cert Name: " << certName << std::endl;
-    chkCert = m_nlsr.getKeyManager().getCertificateFromStore(certName);
-  }
-  else
-  {
-    certName = nt.getTokenString(0, nt.getTokenNumber() - 2);
-    seqNum = boost::lexical_cast<uint32_t>(nt.getToken(nt.getTokenNumber() - 1));
-    std::cout << "Cert Name: " << certName << " Seq Num: " << seqNum << std::endl;
-    chkCert = m_nlsr.getKeyManager().getCertificateFromStore(certName, seqNum);
-  }
-  if (chkCert.second)
-  {
-    if (nt.getTokenPosition(chkString) == nt.getTokenNumber() - 1)
-    {
-      std::string dn;
-      dataName = ndn::Name(interest.getName()).appendVersion();
-      std::pair<uint32_t, bool> seqChk =
-        m_nlsr.getKeyManager().getCertificateSeqNum(certName);
-      if (seqChk.second)
-      {
-        dn = dataName.toUri() + "/" + boost::lexical_cast<std::string>(seqChk.first);
-        dataName = ndn::Name(dn);
-      }
-      else
-      {
-        dn = dataName.toUri() + "/" + boost::lexical_cast<std::string>(10);
-        dataName = ndn::Name(dn);
-      }
-    }
-    else
-    {
-      dataName = ndn::Name(interest.getName());
-    }
-    Data data(dataName.appendVersion());
-    data.setFreshnessPeriod(time::seconds(10)); //10 sec
-    data.setContent(chkCert.first->wireEncode());
-    m_nlsr.getKeyManager().signData(data);
-    m_nlsr.getNlsrFace()->put(data);
-  }
+  // string intName = interest.getName().toUri();
+  // std::cout << "Interest Name for Key: " << intName << std::endl;
+  // Tokenizer nt(intName, "/");
+  // std::string chkString("ID-CERT");
+  // std::string certName;
+  // uint32_t seqNum;
+  // ndn::Name dataName;
+  // std::pair<ndn::shared_ptr<ndn::IdentityCertificate>, bool> chkCert;
+  // if (nt.getTokenPosition(chkString) == nt.getTokenNumber() - 1)
+  // {
+  //   certName = nt.getTokenString(0, nt.getTokenNumber() - 1);
+  //   cout << "Cert Name: " << certName << std::endl;
+  //   chkCert = m_nlsr.getKeyManager().getCertificateFromStore(certName);
+  // }
+  // else
+  // {
+  //   certName = nt.getTokenString(0, nt.getTokenNumber() - 2);
+  //   seqNum = boost::lexical_cast<uint32_t>(nt.getToken(nt.getTokenNumber() - 1));
+  //   std::cout << "Cert Name: " << certName << " Seq Num: " << seqNum << std::endl;
+  //   chkCert = m_nlsr.getKeyManager().getCertificateFromStore(certName, seqNum);
+  // }
+  // if (chkCert.second)
+  // {
+  //   if (nt.getTokenPosition(chkString) == nt.getTokenNumber() - 1)
+  //   {
+  //     std::string dn;
+  //     dataName = ndn::Name(interest.getName()).appendVersion();
+  //     std::pair<uint32_t, bool> seqChk =
+  //       m_nlsr.getKeyManager().getCertificateSeqNum(certName);
+  //     if (seqChk.second)
+  //     {
+  //       dn = dataName.toUri() + "/" + boost::lexical_cast<std::string>(seqChk.first);
+  //       dataName = ndn::Name(dn);
+  //     }
+  //     else
+  //     {
+  //       dn = dataName.toUri() + "/" + boost::lexical_cast<std::string>(10);
+  //       dataName = ndn::Name(dn);
+  //     }
+  //   }
+  //   else
+  //   {
+  //     dataName = ndn::Name(interest.getName());
+  //   }
+  //   Data data(dataName.appendVersion());
+  //   data.setFreshnessPeriod(time::seconds(10)); //10 sec
+  //   data.setContent(chkCert.first->wireEncode());
+  //   m_nlsr.getKeyManager().signData(data);
+  //   m_nlsr.getNlsrFace()->put(data);
+  // }
 }
 
 
diff --git a/src/communication/interest-manager.hpp b/src/communication/interest-manager.hpp
index 86d590b..725103d 100644
--- a/src/communication/interest-manager.hpp
+++ b/src/communication/interest-manager.hpp
@@ -62,6 +62,7 @@
 private:
   Nlsr& m_nlsr;
 
+  ndn::KeyChain m_keyChain;
 };
 
 }//namespace nlsr
diff --git a/src/communication/sync-logic-handler.cpp b/src/communication/sync-logic-handler.cpp
index 696f06a..16b92bc 100644
--- a/src/communication/sync-logic-handler.cpp
+++ b/src/communication/sync-logic-handler.cpp
@@ -1,6 +1,6 @@
 #include "nlsr.hpp"
 #include "sync-logic-handler.hpp"
-#include "security/key-manager.hpp"
+// #include "security/key-manager.hpp"
 #include "utility/tokenizer.hpp"
 
 
@@ -61,7 +61,7 @@
   {
     //process keys update here
     std::string certName = nt.getTokenString(0);
-    processKeysUpdateFromSync(certName, seqNo, pnlsr);
+    // processKeysUpdateFromSync(certName, seqNo, pnlsr);
   }
 }
 
@@ -107,19 +107,19 @@
   }
 }
 
-void
-SyncLogicHandler::processKeysUpdateFromSync(std::string certName,
-                                            uint64_t seqNo, Nlsr& pnlsr)
-{
-  std::cout << "Cert Name: " << certName << std::endl;
-  if (pnlsr.getKeyManager().isNewCertificate(certName, seqNo))
-  {
-    string certNamePrefix = certName + "/" +
-                            boost::lexical_cast<string>(seqNo);
-    pnlsr.getIm().expressInterest(certNamePrefix, 3,
-                                  pnlsr.getConfParameter().getInterestResendTime());
-  }
-}
+// void
+// SyncLogicHandler::processKeysUpdateFromSync(std::string certName,
+//                                             uint64_t seqNo, Nlsr& pnlsr)
+// {
+//   std::cout << "Cert Name: " << certName << std::endl;
+//   // if (pnlsr.getKeyManager().isNewCertificate(certName, seqNo))
+//   {
+//     string certNamePrefix = certName + "/" +
+//                             boost::lexical_cast<string>(seqNo);
+//     pnlsr.getIm().expressInterest(certNamePrefix, 3,
+//                                   pnlsr.getConfParameter().getInterestResendTime());
+//   }
+// }
 
 void
 SyncLogicHandler::publishRoutingUpdate(SequencingManager& sm,
@@ -129,11 +129,11 @@
   publishSyncUpdate(updatePrefix, sm.getCombinedSeqNo());
 }
 
-void
-SyncLogicHandler::publishKeyUpdate(KeyManager& km)
-{
-  publishSyncUpdate(km.getProcessCertName().toUri(), km.getCertSeqNo());
-}
+// void
+// SyncLogicHandler::publishKeyUpdate(KeyManager& km)
+// {
+//   publishSyncUpdate(km.getProcessCertName().toUri(), km.getCertSeqNo());
+// }
 
 void
 SyncLogicHandler::publishIdentityUpdate(string identityName)
diff --git a/src/communication/sync-logic-handler.hpp b/src/communication/sync-logic-handler.hpp
index 8fd29fe..05123ff 100644
--- a/src/communication/sync-logic-handler.hpp
+++ b/src/communication/sync-logic-handler.hpp
@@ -10,7 +10,7 @@
 
 #include "sequencing-manager.hpp"
 
-class KeyManager;
+// class KeyManager;
 
 extern "C" {
 #include <unistd.h>
@@ -46,8 +46,8 @@
   void
   publishRoutingUpdate(SequencingManager& sm, string updatePrefix);
 
-  void
-  publishKeyUpdate(KeyManager& km);
+  // void
+  // publishKeyUpdate(KeyManager& km);
 
   void
   publishIdentityUpdate(string identityName);
@@ -67,8 +67,8 @@
   processRoutingUpdateFromSync(std::string routerName, uint64_t seqNo,
                                Nlsr& pnlsr);
 
-  void
-  processKeysUpdateFromSync(std::string certName, uint64_t seqNo, Nlsr& pnlsr);
+  // void
+  // processKeysUpdateFromSync(std::string certName, uint64_t seqNo, Nlsr& pnlsr);
 
   void
   publishSyncUpdate(string updatePrefix, uint64_t seqNo);
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 70a07cf..53a9556 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -39,14 +39,14 @@
   m_nlsrLsdb.setLsaRefreshTime(m_confParam.getLsaRefreshTime());
   m_nlsrLsdb.setThisRouterPrefix(m_confParam.getRouterPrefix());
   m_fib.setEntryRefreshTime(2 * m_confParam.getLsaRefreshTime());
-  if (!m_km.initialize(m_confParam))
-  {
-    std::cerr << "Can not initiate/load certificate" << endl;
-  }
+  // if (!m_km.initialize(m_confParam))
+  // {
+  //   std::cerr << "Can not initiate/load certificate" << endl;
+  // }
   m_sm.setSeqFileName(m_confParam.getSeqFileDir());
   m_sm.initiateSeqNoFromFile();
   /* debugging purpose start */
-  cout <<	m_confParam;
+  cout << m_confParam;
   m_adl.printAdl();
   m_npl.print();
   /* debugging purpose end */
@@ -58,7 +58,7 @@
   setInterestFilterNlsr(m_confParam.getRootKeyPrefix());
   m_slh.setSyncPrefix(m_confParam.getChronosyncSyncPrefix());
   m_slh.createSyncSocket(boost::ref(*this));
-  m_slh.publishKeyUpdate(m_km);
+  // m_slh.publishKeyUpdate(m_km);
   m_im.scheduleInfoInterest(10);
 }
 
diff --git a/src/nlsr.hpp b/src/nlsr.hpp
index ac254c3..ffa4b05 100644
--- a/src/nlsr.hpp
+++ b/src/nlsr.hpp
@@ -15,7 +15,7 @@
 #include "route/routing-table.hpp"
 #include "route/npt.hpp"
 #include "route/fib.hpp"
-#include "security/key-manager.hpp"
+// #include "security/key-manager.hpp"
 #include "communication/sync-logic-handler.hpp"
 
 
@@ -41,7 +41,7 @@
     , m_im(*this)
     , m_dm(*this)
     , m_sm()
-    , m_km()
+    // , m_km()
     , m_isDaemonProcess(false)
     , m_configFileName("nlsr.conf")
     , m_nlsrLsdb()
@@ -127,11 +127,11 @@
     return m_nlsrFace;
   }
 
-  KeyManager&
-  getKeyManager()
-  {
-    return m_km;
-  }
+  // KeyManager&
+  // getKeyManager()
+  // {
+  //   return m_km;
+  // }
 
 
   InterestManager&
@@ -262,7 +262,7 @@
   InterestManager m_im;
   DataManager m_dm;
   SequencingManager m_sm;
-  KeyManager m_km;
+  // KeyManager m_km;
   bool m_isDaemonProcess;
   string m_configFileName;
 
diff --git a/src/security/certificate-store-entry.cpp b/src/security/certificate-store-entry.cpp.disable
similarity index 100%
rename from src/security/certificate-store-entry.cpp
rename to src/security/certificate-store-entry.cpp.disable
diff --git a/src/security/certificate-store-entry.hpp b/src/security/certificate-store-entry.hpp.disable
similarity index 100%
rename from src/security/certificate-store-entry.hpp
rename to src/security/certificate-store-entry.hpp.disable
diff --git a/src/security/certificate-store.cpp b/src/security/certificate-store.cpp.disable
similarity index 100%
rename from src/security/certificate-store.cpp
rename to src/security/certificate-store.cpp.disable
diff --git a/src/security/certificate-store.hpp b/src/security/certificate-store.hpp.disable
similarity index 100%
rename from src/security/certificate-store.hpp
rename to src/security/certificate-store.hpp.disable
diff --git a/src/security/key-manager.cpp b/src/security/key-manager.cpp.disable
similarity index 100%
rename from src/security/key-manager.cpp
rename to src/security/key-manager.cpp.disable
diff --git a/src/security/key-manager.hpp b/src/security/key-manager.hpp.disable
similarity index 100%
rename from src/security/key-manager.hpp
rename to src/security/key-manager.hpp.disable
diff --git a/src/security/waiting-list-entry.cpp b/src/security/waiting-list-entry.cpp.disable
similarity index 100%
rename from src/security/waiting-list-entry.cpp
rename to src/security/waiting-list-entry.cpp.disable
diff --git a/src/security/waiting-list-entry.hpp b/src/security/waiting-list-entry.hpp.disable
similarity index 100%
rename from src/security/waiting-list-entry.hpp
rename to src/security/waiting-list-entry.hpp.disable
diff --git a/src/security/waiting-list.cpp b/src/security/waiting-list.cpp.disable
similarity index 100%
rename from src/security/waiting-list.cpp
rename to src/security/waiting-list.cpp.disable
diff --git a/src/security/waiting-list.hpp b/src/security/waiting-list.hpp.disable
similarity index 100%
rename from src/security/waiting-list.hpp
rename to src/security/waiting-list.hpp.disable
