diff --git a/include/ndn-cpp/security/identity/identity-manager.hpp b/include/ndn-cpp/security/identity/identity-manager.hpp
index 5ed7771..e1c11df 100644
--- a/include/ndn-cpp/security/identity/identity-manager.hpp
+++ b/include/ndn-cpp/security/identity/identity-manager.hpp
@@ -14,11 +14,10 @@
 #include "../certificate/public-key.hpp"
 
 #include "../../data.hpp"
+#include "../certificate/identity-certificate.hpp"
 
 namespace ndn {
 
-class IdentityCertificate;
-
 /**
  * An IdentityManager is the interface of operations related to identity, keys, and certificates.
  */
@@ -26,8 +25,8 @@
 public:
   struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} };
 
-  IdentityManager(const ptr_lib::shared_ptr<IdentityStorage>   &identityStorage   = DefaultIdentityStorage,
-                  const ptr_lib::shared_ptr<PrivateKeyStorage> &privateKeyStorage = DefaultPrivateKeyStorage);
+  IdentityManager(const ptr_lib::shared_ptr<IdentityStorage>   &identityStorage,
+                  const ptr_lib::shared_ptr<PrivateKeyStorage> &privateKeyStorage);
 
   inline IdentityStorage&
   info();
@@ -261,10 +260,6 @@
   void
   selfSign (IdentityCertificate& cert);
 
-public:
-  static const ptr_lib::shared_ptr<IdentityStorage>   DefaultIdentityStorage;
-  static const ptr_lib::shared_ptr<PrivateKeyStorage> DefaultPrivateKeyStorage;
-
 private:
   /**
    * Generate a key pair for the specified identity.
diff --git a/include/ndn-cpp/security/key-chain.hpp b/include/ndn-cpp/security/key-chain.hpp
index c39736e..29bd164 100644
--- a/include/ndn-cpp/security/key-chain.hpp
+++ b/include/ndn-cpp/security/key-chain.hpp
@@ -29,7 +29,8 @@
 public:
   struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} };
 
-  KeyChain(const ptr_lib::shared_ptr<IdentityManager>   &identityManager   = DefaultIdentityManager,
+  KeyChain(const ptr_lib::shared_ptr<IdentityStorage>   &identityStorage   = DefaultIdentityStorage,
+           const ptr_lib::shared_ptr<PrivateKeyStorage> &privateKeyStorage = DefaultPrivateKeyStorage,
            const ptr_lib::shared_ptr<PolicyManager>     &policyManager     = DefaultPolicyManager,
            const ptr_lib::shared_ptr<EncryptionManager> &encryptionManager = DefaultEncryptionManager);
 
@@ -146,7 +147,8 @@
   // todo
 
 public:
-  static const ptr_lib::shared_ptr<IdentityManager>   DefaultIdentityManager;
+  static const ptr_lib::shared_ptr<IdentityStorage>   DefaultIdentityStorage;
+  static const ptr_lib::shared_ptr<PrivateKeyStorage> DefaultPrivateKeyStorage;
   static const ptr_lib::shared_ptr<PolicyManager>     DefaultPolicyManager;
   static const ptr_lib::shared_ptr<EncryptionManager> DefaultEncryptionManager;
     
@@ -161,7 +163,10 @@
      const ptr_lib::shared_ptr<Data> &data, ptr_lib::shared_ptr<ValidationRequest> nextStep);
 
 private:
-  ptr_lib::shared_ptr<IdentityManager>   identityManager_;
+  ptr_lib::shared_ptr<IdentityStorage>   publicInfoStorage_;
+  ptr_lib::shared_ptr<PrivateKeyStorage> privateKeyStorage_;
+  ptr_lib::shared_ptr<IdentityManager>   identityManager_; // uses publicInfo and privateKey storages
+
   ptr_lib::shared_ptr<PolicyManager>     policyManager_;
   ptr_lib::shared_ptr<EncryptionManager> encryptionManager_;
 
diff --git a/src/security/identity/identity-manager.cpp b/src/security/identity/identity-manager.cpp
index ce6ff21..0c57212 100644
--- a/src/security/identity/identity-manager.cpp
+++ b/src/security/identity/identity-manager.cpp
@@ -30,9 +30,6 @@
 
 namespace ndn {
 
-const ptr_lib::shared_ptr<IdentityStorage>   IdentityManager::DefaultIdentityStorage   = ptr_lib::shared_ptr<IdentityStorage>();
-const ptr_lib::shared_ptr<PrivateKeyStorage> IdentityManager::DefaultPrivateKeyStorage = ptr_lib::shared_ptr<PrivateKeyStorage>();
-
 IdentityManager::IdentityManager(const ptr_lib::shared_ptr<IdentityStorage>   &identityStorage   /* = DefaultIdentityStorage */,
                                  const ptr_lib::shared_ptr<PrivateKeyStorage> &privateKeyStorage /* = DefaultPrivateKeyStorage */)
   : identityStorage_(identityStorage)
diff --git a/src/security/identity/osx-private-key-storage.cpp b/src/security/identity/osx-private-key-storage.cpp
index f41f89f..fec7671 100644
--- a/src/security/identity/osx-private-key-storage.cpp
+++ b/src/security/identity/osx-private-key-storage.cpp
@@ -277,13 +277,19 @@
 
     if (!signature) throw Error("Signature is NULL!\n");
 
-    return Block(Tlv::SignatureValue, ptr_lib::make_shared<Buffer>(CFDataGetBytePtr(signature), CFDataGetLength(signature)));
+    return Block(Tlv::SignatureValue,
+                 ptr_lib::make_shared<Buffer>(CFDataGetBytePtr(signature), CFDataGetLength(signature)));
   }
 
   void
   OSXPrivateKeyStorage::sign(Data &data,
                              const Name& keyName, DigestAlgorithm digestAlgorithm/* = DIGEST_ALGORITHM_SHA256 */)
   {
+    const uint8_t *begin = data.wireEncode().value();
+    const uint8_t *end   = &*data.getSignature().getInfo().end();
+    
+    data.setSignature
+      (sign(begin, end-begin, keyName, digestAlgorithm));
   }
 
   ConstBufferPtr
diff --git a/src/security/key-chain.cpp b/src/security/key-chain.cpp
index ba9060d..47db4c1 100644
--- a/src/security/key-chain.cpp
+++ b/src/security/key-chain.cpp
@@ -10,6 +10,9 @@
 
 #include <ndn-cpp/security/policy/policy-manager.hpp>
 
+#include "identity/basic-identity-storage.hpp"
+
+
 using namespace std;
 using namespace ndn::func_lib;
 #if NDN_CPP_HAVE_STD_FUNCTION
@@ -19,43 +22,66 @@
 
 namespace ndn {
 
-const ptr_lib::shared_ptr<IdentityManager>   KeyChain::DefaultIdentityManager   = ptr_lib::shared_ptr<IdentityManager>();
+const ptr_lib::shared_ptr<IdentityStorage>   KeyChain::DefaultIdentityStorage   = ptr_lib::shared_ptr<IdentityStorage>();
+const ptr_lib::shared_ptr<PrivateKeyStorage> KeyChain::DefaultPrivateKeyStorage = ptr_lib::shared_ptr<PrivateKeyStorage>();
 const ptr_lib::shared_ptr<PolicyManager>     KeyChain::DefaultPolicyManager     = ptr_lib::shared_ptr<PolicyManager>();
 const ptr_lib::shared_ptr<EncryptionManager> KeyChain::DefaultEncryptionManager = ptr_lib::shared_ptr<EncryptionManager>();
 
-
-KeyChain::KeyChain(const ptr_lib::shared_ptr<IdentityManager>   &identityManager   /* = DefaultIdentityManager */,
+KeyChain::KeyChain(const ptr_lib::shared_ptr<IdentityStorage>   &publicInfoStorage /* = DefaultIdentityStorage */,
+                   const ptr_lib::shared_ptr<PrivateKeyStorage> &privateKeyStorage /* = DefaultPrivateKeyStorage */,
                    const ptr_lib::shared_ptr<PolicyManager>     &policyManager     /* = DefaultPolicyManager */,
                    const ptr_lib::shared_ptr<EncryptionManager> &encryptionManager /* = DefaultEncryptionManager */)
-  : identityManager_(identityManager)
+  : publicInfoStorage_(publicInfoStorage)
+  , privateKeyStorage_(privateKeyStorage)
   , policyManager_(policyManager)
   , encryptionManager_(encryptionManager)
   , maxSteps_(100)
-{  
-// #ifdef USE_SIMPLE_POLICY_MANAGER
-//   Ptr<SimplePolicyManager> policyManager = Ptr<SimplePolicyManager>(new SimplePolicyManager());
-//   Ptr<IdentityPolicyRule> rule1 = Ptr<IdentityPolicyRule>(new IdentityPolicyRule("^([^<KEY>]*)<KEY>(<>*)<ksk-.*><ID-CERT>",
-//                                                                                  "^([^<KEY>]*)<KEY><dsk-.*><ID-CERT>",
-//                                                                                  ">", "\\1\\2", "\\1", true));
-//   Ptr<IdentityPolicyRule> rule2 = Ptr<IdentityPolicyRule>(new IdentityPolicyRule("^([^<KEY>]*)<KEY><dsk-.*><ID-CERT>",
-//                                                                                  "^([^<KEY>]*)<KEY>(<>*)<ksk-.*><ID-CERT>",
-//                                                                                  "==", "\\1", "\\1\\2", true));
-//   Ptr<IdentityPolicyRule> rule3 = Ptr<IdentityPolicyRule>(new IdentityPolicyRule("^(<>*)$", 
-//                                                                                  "^([^<KEY>]*)<KEY><dsk-.*><ID-CERT>", 
-//                                                                                  ">", "\\1", "\\1", true));
-//   policyManager->addVerificationPolicyRule(rule1);
-//   policyManager->addVerificationPolicyRule(rule2);
-//   policyManager->addVerificationPolicyRule(rule3);
+{
+  if (publicInfoStorage_ == DefaultIdentityStorage)
+    {
+      publicInfoStorage_ = ptr_lib::make_shared<BasicIdentityStorage>();
+    }
+
+  if (privateKeyStorage_ == DefaultPrivateKeyStorage)
+    {
+#ifdef USE_OSX_PRIVATEKEY_STORAGE
+      privateStorage_ = ptr_lib::make_shared<OSXPrivatekeyStorage>();
+      // #else
+      //       m_privateStorage = Ptr<SimpleKeyStore>::Create();
+#endif  
+    }
+
+  identityManager_ = ptr_lib::make_shared<IdentityManager>(publicInfoStorage_, privateKeyStorage_);
+
+  if (policyManager_ == DefaultPolicyManager)
+    {
+      // #ifdef USE_SIMPLE_POLICY_MANAGER
+      //   Ptr<SimplePolicyManager> policyManager = Ptr<SimplePolicyManager>(new SimplePolicyManager());
+      //   Ptr<IdentityPolicyRule> rule1 = Ptr<IdentityPolicyRule>(new IdentityPolicyRule("^([^<KEY>]*)<KEY>(<>*)<ksk-.*><ID-CERT>",
+      //                                                                                  "^([^<KEY>]*)<KEY><dsk-.*><ID-CERT>",
+      //                                                                                  ">", "\\1\\2", "\\1", true));
+      //   Ptr<IdentityPolicyRule> rule2 = Ptr<IdentityPolicyRule>(new IdentityPolicyRule("^([^<KEY>]*)<KEY><dsk-.*><ID-CERT>",
+      //                                                                                  "^([^<KEY>]*)<KEY>(<>*)<ksk-.*><ID-CERT>",
+      //                                                                                  "==", "\\1", "\\1\\2", true));
+      //   Ptr<IdentityPolicyRule> rule3 = Ptr<IdentityPolicyRule>(new IdentityPolicyRule("^(<>*)$", 
+      //                                                                                  "^([^<KEY>]*)<KEY><dsk-.*><ID-CERT>", 
+      //                                                                                  ">", "\\1", "\\1", true));
+      //   policyManager->addVerificationPolicyRule(rule1);
+      //   policyManager->addVerificationPolicyRule(rule2);
+      //   policyManager->addVerificationPolicyRule(rule3);
     
-//   policyManager->addSigningPolicyRule(rule3);
+      //   policyManager->addSigningPolicyRule(rule3);
 
-//   m_policyManager = policyManager;
-// #endif
-
-//   if (!policyManager_)
-//     {
-//       policyManager_ = new NoVerifyPolicyManager();
-//     }
+      //   m_policyManager = policyManager;
+      //
+      // #else
+      //   policyManager_ = new NoVerifyPolicyManager();
+      // #endif
+    }
+  
+  if (encryptionManager_ == DefaultEncryptionManager)
+    {
+    }
 
 // #ifdef USE_BASIC_ENCRYPTION_MANAGER
 //     encryptionManager_ = new BasicEncryptionManager(m_identityManager->getPrivateStorage(), "/tmp/encryption.db");
