diff --git a/src/security/pib/detail/identity-impl.cpp b/src/security/pib/detail/identity-impl.cpp
index af01dc5..284f14c 100644
--- a/src/security/pib/detail/identity-impl.cpp
+++ b/src/security/pib/detail/identity-impl.cpp
@@ -49,10 +49,6 @@
 {
   BOOST_ASSERT(m_keys.isConsistent());
 
-  if (m_keys.find(keyName) != m_keys.end()) {
-    BOOST_THROW_EXCEPTION(Pib::Error("Cannot overwrite existing key " + keyName.toUri()));
-  }
-
   return m_keys.add(key, keyLen, keyName);
 }
 
diff --git a/src/security/pib/detail/identity-impl.hpp b/src/security/pib/detail/identity-impl.hpp
index b654348..ceff37d 100644
--- a/src/security/pib/detail/identity-impl.hpp
+++ b/src/security/pib/detail/identity-impl.hpp
@@ -64,10 +64,10 @@
    * @brief Add a @p key of @p keyLen bytes with @p keyName (in PKCS#8 format).
    *
    * If no default key is set before, the new key will be set as the default key of the identity.
+   * If a key with the same name already exists, overwrite the key.
    *
    * @return the added key.
    * @throw std::invalid_argument key name does not match identity
-   * @throw Pib::Error a key with the same name already exists
    */
   Key
   addKey(const uint8_t* key, size_t keyLen, const Name& keyName);
diff --git a/src/security/pib/detail/key-impl.cpp b/src/security/pib/detail/key-impl.cpp
index 35a0de6..c0cd839 100644
--- a/src/security/pib/detail/key-impl.cpp
+++ b/src/security/pib/detail/key-impl.cpp
@@ -39,15 +39,11 @@
 {
   BOOST_ASSERT(impl != nullptr);
 
-  if (m_impl->hasKey(m_keyName)) {
-    BOOST_THROW_EXCEPTION(Pib::Error("Cannot overwrite existing key " + m_keyName.toUri()));
-  }
-
   transform::PublicKey publicKey;
   try {
     publicKey.loadPkcs8(key, keyLen);
   }
-  catch (transform::PublicKey::Error&) {
+  catch (const transform::PublicKey::Error&) {
     BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid key bits"));
   }
   m_keyType = publicKey.getKeyType();
@@ -75,11 +71,6 @@
 KeyImpl::addCertificate(const v2::Certificate& certificate)
 {
   BOOST_ASSERT(m_certificates.isConsistent());
-
-  if (m_certificates.find(certificate.getName()) != m_certificates.end()) {
-    BOOST_THROW_EXCEPTION(Pib::Error("Cannot overwrite existing certificate " + certificate.getName().toUri()));
-  }
-
   m_certificates.add(certificate);
 }
 
diff --git a/src/security/pib/detail/key-impl.hpp b/src/security/pib/detail/key-impl.hpp
index c05e77e..a7e683f 100644
--- a/src/security/pib/detail/key-impl.hpp
+++ b/src/security/pib/detail/key-impl.hpp
@@ -107,8 +107,10 @@
    * If no default certificate is set before, the new certificate will be set as the default
    * certificate of the key.
    *
+   * If a certificate with the same name (without implicit digest) already exists, overwrite
+   * the certificate.
+   *
    * @throw std::invalid_argument certificate name does not match key name
-   * @throw Pib::Error a certificate with the same name already exists
    */
   void
   addCertificate(const v2::Certificate& certificate);
diff --git a/src/security/pib/identity.hpp b/src/security/pib/identity.hpp
index 2bb1706..cc46bfd 100644
--- a/src/security/pib/identity.hpp
+++ b/src/security/pib/identity.hpp
@@ -113,7 +113,8 @@
    * @brief Add a @p key of @p keyLen bytes (in PKCS#8 format) with @p keyName.
    * @return the handle of added key
    * @throw std::invalid_argument key name does not match identity
-   * @throw Pib::Error a key with the same name already exists
+   *
+   * If a key with the same name already exists, overwrite the key.
    */
   Key
   addKey(const uint8_t* key, size_t keyLen, const Name& keyName) const;
diff --git a/src/security/pib/key-container.cpp b/src/security/pib/key-container.cpp
index 34f96d0..4084cd3 100644
--- a/src/security/pib/key-container.cpp
+++ b/src/security/pib/key-container.cpp
@@ -120,10 +120,8 @@
                                                 "`" + m_identity.toUri() + "`"));
   }
 
-  if (m_keyNames.count(keyName) == 0) {
-    m_keyNames.insert(keyName);
-    m_keys[keyName] = shared_ptr<detail::KeyImpl>(new detail::KeyImpl(keyName, key, keyLen, m_impl));
-  }
+  m_keyNames.insert(keyName);
+  m_keys[keyName] = shared_ptr<detail::KeyImpl>(new detail::KeyImpl(keyName, key, keyLen, m_impl));
 
   return get(keyName);
 }
diff --git a/src/security/pib/key-container.hpp b/src/security/pib/key-container.hpp
index 45d9127..0c88249 100644
--- a/src/security/pib/key-container.hpp
+++ b/src/security/pib/key-container.hpp
@@ -94,6 +94,8 @@
   /**
    * @brief Add @p key of @p keyLen bytes with @p keyName into the container
    * @throw std::invalid_argument @p keyName does not match the identity
+   *
+   * If a key with the same name already exists, overwrite the key.
    */
   Key
   add(const uint8_t* key, size_t keyLen, const Name& keyName);
diff --git a/src/security/pib/key.hpp b/src/security/pib/key.hpp
index 4acc54a..90f4f5c 100644
--- a/src/security/pib/key.hpp
+++ b/src/security/pib/key.hpp
@@ -137,7 +137,9 @@
   /**
    * @brief Add @p certificate.
    * @throw std::invalid_argument certificate name does not match key name
-   * @throw Pib::Error a certificate with the same name already exists
+   *
+   * If a certificate with the same name (without implicit digest) already exists, overwrite
+   * the certificate.
    */
   void
   addCertificate(const v2::Certificate& certificate) const;
@@ -161,7 +163,6 @@
   /**
    * @brief Add @p certificate and set it as the default certificate of the key
    * @throw std::invalid_argument @p certificate does not match key name
-   * @throw Pib::Error the certificate with the same name already exists.
    * @return the default certificate
    */
   const v2::Certificate&
diff --git a/src/security/v2/key-chain.hpp b/src/security/v2/key-chain.hpp
index 7cb71f2..f0299c3 100644
--- a/src/security/v2/key-chain.hpp
+++ b/src/security/v2/key-chain.hpp
@@ -207,7 +207,6 @@
    *
    * @pre @p key must be valid.
    * @throw std::invalid_argument @p key does not match @p certificate
-   * @throw Pib::Error a certificate with the same name already exists
    */
   void
   addCertificate(const Key& key, const Certificate& certificate);
