diff --git a/Makefile.am b/Makefile.am
index d6654b6..75cc28b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -136,6 +136,7 @@
   src/security/certificate/public-key.cpp \
   src/security/identity/basic-identity-storage.cpp \
   src/security/identity/identity-manager.cpp \
+  src/security/identity/identity-storage.cpp \
   src/security/identity/memory-identity-storage.cpp \
   src/security/identity/memory-private-key-storage.cpp \
   src/security/identity/osx-private-key-storage.cpp \
diff --git a/Makefile.in b/Makefile.in
index 4b4f7ea..47b6a9e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -196,6 +196,7 @@
 	src/security/certificate/public-key.lo \
 	src/security/identity/basic-identity-storage.lo \
 	src/security/identity/identity-manager.lo \
+	src/security/identity/identity-storage.lo \
 	src/security/identity/memory-identity-storage.lo \
 	src/security/identity/memory-private-key-storage.lo \
 	src/security/identity/osx-private-key-storage.lo \
@@ -682,6 +683,7 @@
   src/security/certificate/public-key.cpp \
   src/security/identity/basic-identity-storage.cpp \
   src/security/identity/identity-manager.cpp \
+  src/security/identity/identity-storage.cpp \
   src/security/identity/memory-identity-storage.cpp \
   src/security/identity/memory-private-key-storage.cpp \
   src/security/identity/osx-private-key-storage.cpp \
@@ -959,6 +961,9 @@
 src/security/identity/identity-manager.lo:  \
 	src/security/identity/$(am__dirstamp) \
 	src/security/identity/$(DEPDIR)/$(am__dirstamp)
+src/security/identity/identity-storage.lo:  \
+	src/security/identity/$(am__dirstamp) \
+	src/security/identity/$(DEPDIR)/$(am__dirstamp)
 src/security/identity/memory-identity-storage.lo:  \
 	src/security/identity/$(am__dirstamp) \
 	src/security/identity/$(DEPDIR)/$(am__dirstamp)
@@ -1141,6 +1146,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@src/security/certificate/$(DEPDIR)/public-key.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/security/identity/$(DEPDIR)/basic-identity-storage.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/security/identity/$(DEPDIR)/identity-manager.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/security/identity/$(DEPDIR)/identity-storage.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/security/identity/$(DEPDIR)/memory-identity-storage.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/security/identity/$(DEPDIR)/memory-private-key-storage.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/security/identity/$(DEPDIR)/osx-private-key-storage.Plo@am__quote@
diff --git a/include/ndn-cpp/security/identity/basic-identity-storage.hpp b/include/ndn-cpp/security/identity/basic-identity-storage.hpp
index 84f5374..476df56 100644
--- a/include/ndn-cpp/security/identity/basic-identity-storage.hpp
+++ b/include/ndn-cpp/security/identity/basic-identity-storage.hpp
@@ -2,6 +2,7 @@
 /**
  * Copyright (C) 2013 Regents of the University of California.
  * @author: Yingdi Yu <yingdi@cs.ucla.edu>
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
  * See COPYING for copyright and distribution information.
  */
 
@@ -56,15 +57,6 @@
   revokeIdentity();
 
   /**
-   * Generate a name for a new key belonging to the identity.
-   * @param identityName The identity name.
-   * @param useKsk If true, generate a KSK name, otherwise a DSK name.
-   * @return The generated key name.
-   */
-  virtual Name 
-  getNewKeyName(const Name& identityName, bool useKsk);
-
-  /**
    * Check if the specified key already exists.
    * @param keyName The name of the key.
    * @return true if the key exists, otherwise false.
@@ -73,13 +65,6 @@
   doesKeyExist(const Name& keyName);
 
   /**
-   * Extract the key name from the certificate name.
-   * @param certificateName The certificate name to be processed.
-   */
-  virtual Name 
-  getKeyNameForCertificate(const Name& certificateName);
-
-  /**
    * Add a public key to the identity storage.
    * @param keyName The name of the public key to be added.
    * @param keyType Type of the public key to be added.
diff --git a/include/ndn-cpp/security/identity/identity-storage.hpp b/include/ndn-cpp/security/identity/identity-storage.hpp
index fdf3d0c..d54bc10 100644
--- a/include/ndn-cpp/security/identity/identity-storage.hpp
+++ b/include/ndn-cpp/security/identity/identity-storage.hpp
@@ -59,8 +59,8 @@
    * @param useKsk If true, generate a KSK name, otherwise a DSK name.
    * @return The generated key name.
    */
-  virtual Name 
-  getNewKeyName(const Name& identityName, bool useKsk) = 0;
+  Name 
+  getNewKeyName(const Name& identityName, bool useKsk);
 
   /**
    * Check if the specified key already exists.
@@ -71,13 +71,6 @@
   doesKeyExist(const Name& keyName) = 0;
 
   /**
-   * Extract the key name from the certificate name.
-   * @param certificateName The certificate name to be processed.
-   */
-  virtual Name 
-  getKeyNameForCertificate(const Name& certificateName) = 0;
-
-  /**
    * Add a public key to the identity storage.
    * @param keyName The name of the public key to be added.
    * @param keyType Type of the public key to be added.
@@ -158,10 +151,7 @@
    * @return The default certificate name.
    */
   Name 
-  getDefaultCertificateNameForIdentity(const Name& identityName)
-  {
-    return getDefaultCertificateNameForKey(getDefaultKeyNameForIdentity(identityName));
-  }
+  getDefaultCertificateNameForIdentity(const Name& identityName);
 
   /**
    * Get the default certificate name for the specified key.
diff --git a/include/ndn-cpp/security/identity/memory-identity-storage.hpp b/include/ndn-cpp/security/identity/memory-identity-storage.hpp
index 0fb09c0..b86b7d9 100644
--- a/include/ndn-cpp/security/identity/memory-identity-storage.hpp
+++ b/include/ndn-cpp/security/identity/memory-identity-storage.hpp
@@ -49,15 +49,6 @@
   revokeIdentity();
 
   /**
-   * Generate a name for a new key belonging to the identity.
-   * @param identityName The identity name.
-   * @param useKsk If true, generate a KSK name, otherwise a DSK name.
-   * @return The generated key name.
-   */
-  virtual Name 
-  getNewKeyName(const Name& identityName, bool useKsk);
-
-  /**
    * Check if the specified key already exists.
    * @param keyName The name of the key.
    * @return true if the key exists, otherwise false.
@@ -66,13 +57,6 @@
   doesKeyExist(const Name& keyName);
 
   /**
-   * Extract the key name from the certificate name.
-   * @param certificateName The certificate name to be processed.
-   */
-  virtual Name 
-  getKeyNameForCertificate(const Name& certificateName);
-
-  /**
    * Add a public key to the identity storage.
    * @param keyName The name of the public key to be added.
    * @param keyType Type of the public key to be added.
diff --git a/src/security/identity/basic-identity-storage.cpp b/src/security/identity/basic-identity-storage.cpp
index f453cfb..67a68f0 100644
--- a/src/security/identity/basic-identity-storage.cpp
+++ b/src/security/identity/basic-identity-storage.cpp
@@ -2,6 +2,7 @@
 /**
  * Copyright (C) 2013 Regents of the University of California.
  * @author: Yingdi Yu <yingdi@cs.ucla.edu>
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
  * See COPYING for copyright and distribution information.
  */
 
@@ -68,7 +69,7 @@
       not_before        TIMESTAMP,                                   \n \
       not_after         TIMESTAMP,                                   \n \
       certificate_data  BLOB NOT NULL,                               \n \
-      valid_flag        INTEGER DEFAULT 0,                           \n \
+      valid_flag        INTEGER DEFAULT 1,                           \n \
       default_cert      INTEGER DEFAULT 0,                           \n \
                                                                      \
       PRIMARY KEY (cert_name)                                        \n \
@@ -219,30 +220,6 @@
   return false;
 }
 
-Name 
-BasicIdentityStorage::getNewKeyName(const Name& identityName, bool useKsk)
-{
-  MillisecondsSince1970 ti = ::ndn_getNowMilliseconds();
-  // Get the number of seconds.
-  ostringstream oss;
-  oss << floor(ti / 1000.0);
-
-  string keyIdStr;
-  
-  if (useKsk)
-    keyIdStr = ("KSK-" + oss.str());
-  else
-    keyIdStr = ("DSK-" + oss.str());
-
-
-  Name keyName = Name(identityName).append(keyIdStr);
-
-  if (doesKeyExist(keyName))
-    throw SecurityException("Key name already exists");
-
-  return keyName;
-}
-
 bool 
 BasicIdentityStorage::doesKeyExist(const Name& keyName)
 {
@@ -269,19 +246,6 @@
   return keyIdExist;
 }
 
-Name 
-BasicIdentityStorage::getKeyNameForCertificate(const Name& certificateName)
-{
-  int i = certificateName.size() - 1;
-
-  for (; i >= 0; --i) {
-    if (certificateName.get(i).toEscapedString() == string("ID-CERT"))
-      break; 
-  }
-  
-  return certificateName.getSubName(0, i);
-}
-
 void
 BasicIdentityStorage::addKey(const Name& keyName, KeyType keyType, const Blob& publicKeyDer)
 {
@@ -392,7 +356,7 @@
 BasicIdentityStorage::addAnyCertificate(const IdentityCertificate& certificate)
 {
   const Name& certificateName = certificate.getName();
-  Name keyName = getKeyNameForCertificate(certificateName);
+  Name keyName = certificate.getPublicKeyName();
 
   string keyId = keyName.get(keyName.size() - 1).toEscapedString();
   Name identityName = keyName.getSubName(0, keyName.size() - 1);
@@ -430,22 +394,16 @@
 void 
 BasicIdentityStorage::addCertificate(const IdentityCertificate& certificate)
 {
-  _LOG_DEBUG("1");
   const Name& certificateName = certificate.getName();
-  Name keyName = getKeyNameForCertificate(certificateName);
+  Name keyName = certificate.getPublicKeyName();
 
-  _LOG_DEBUG("2");
   if (!doesKeyExist(keyName))
-    {
-      _LOG_DEBUG("here wrong");
-      throw SecurityException("No corresponding Key record for the certificate!");
-    }
+    throw SecurityException("No corresponding Key record for certificate!" + keyName.toUri() + " " + certificateName.toUri());
 
   // Check if certificate has already existed!
   if (doesCertificateExist(certificateName))
     throw SecurityException("Certificate has already been installed!");
 
-  _LOG_DEBUG("3");
   string keyId = keyName.get(keyName.size() - 1).toEscapedString();
   Name identity = keyName.getSubName(0, keyName.size() - 1);
   
@@ -456,7 +414,6 @@
   if (!keyBlob || (*keyBlob) != *(certificate.getPublicKeyInfo().getKeyDer()))
     throw SecurityException("Certificate does not match the public key!");
 
-  _LOG_DEBUG("4");
   // Insert the certificate
   sqlite3_stmt *statement;
   sqlite3_prepare_v2(database_, 
diff --git a/src/security/identity/identity-storage.cpp b/src/security/identity/identity-storage.cpp
new file mode 100644
index 0000000..6859332
--- /dev/null
+++ b/src/security/identity/identity-storage.cpp
@@ -0,0 +1,48 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Yingdi Yu <yingdi@cs.ucla.edu>
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#include <math.h>
+#include "../../c/util/time.h"
+#include <ndn-cpp/security/security-exception.hpp>
+#include <ndn-cpp/security/identity/identity-storage.hpp>
+
+using namespace std;
+
+namespace ndn {
+
+Name
+IdentityStorage::getNewKeyName (const Name& identityName, bool useKsk)
+{
+  MillisecondsSince1970 ti = ::ndn_getNowMilliseconds();
+  // Get the number of seconds.
+  ostringstream oss;
+  oss << floor(ti / 1000.0);  
+
+  string keyIdStr;
+    
+  if (useKsk)
+    keyIdStr = ("KSK-" + oss.str());
+  else
+    keyIdStr = ("DSK-" + oss.str());
+
+  Name keyName = Name(identityName).append(keyIdStr);
+
+  if (doesKeyExist(keyName))
+    throw SecurityException("Key name already exists");
+
+  return keyName;
+}
+
+Name 
+IdentityStorage::getDefaultCertificateNameForIdentity (const Name& identityName)
+{
+  Name keyName = getDefaultKeyNameForIdentity(identityName);    
+  return getDefaultCertificateNameForKey(keyName);
+}
+
+}
diff --git a/src/security/identity/memory-identity-storage.cpp b/src/security/identity/memory-identity-storage.cpp
index eb77865..b3b7c69 100644
--- a/src/security/identity/memory-identity-storage.cpp
+++ b/src/security/identity/memory-identity-storage.cpp
@@ -46,14 +46,6 @@
 #endif
 }
 
-Name 
-MemoryIdentityStorage::getNewKeyName(const Name& identityName, bool useKsk)
-{
-#if 1
-  throw runtime_error("MemoryIdentityStorage::getNewKeyName not implemented");
-#endif
-}
-
 bool 
 MemoryIdentityStorage::doesKeyExist(const Name& keyName)
 {
@@ -62,19 +54,6 @@
 #endif
 }
 
-Name 
-MemoryIdentityStorage::getKeyNameForCertificate(const Name& certificateName)
-{
-  int i = certificateName.getComponentCount() - 1;
-
-  for (; i >= 0; --i) {
-    if(certificateName.getComponent(i).toEscapedString() == string("ID-CERT"))
-      break; 
-  }
-    
-  return certificateName.getSubName(0, i);
-}
-
 void 
 MemoryIdentityStorage::addKey(const Name& keyName, KeyType keyType, const Blob& publicKeyDer)
 {
