diff --git a/src/security/pib/identity.cpp b/src/security/pib/identity.cpp
index 79cb090..0f7dc26 100644
--- a/src/security/pib/identity.cpp
+++ b/src/security/pib/identity.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -103,6 +103,24 @@
   return impl;
 }
 
+bool
+operator!=(const Identity& lhs, const Identity& rhs)
+{
+  return lhs.m_impl.owner_before(rhs.m_impl) || rhs.m_impl.owner_before(lhs.m_impl);
+}
+
+std::ostream&
+operator<<(std::ostream& os, const Identity& id)
+{
+  if (id) {
+    os << id.getName();
+  }
+  else {
+    os << "(empty)";
+  }
+  return os;
+}
+
 } // namespace pib
 } // namespace security
 } // namespace ndn
diff --git a/src/security/pib/identity.hpp b/src/security/pib/identity.hpp
index cc46bfd..228ef16 100644
--- a/src/security/pib/identity.hpp
+++ b/src/security/pib/identity.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -100,6 +100,7 @@
   /*
    * @return True if the identity instance is valid
    */
+  explicit
   operator bool() const;
 
   /**
@@ -157,8 +158,21 @@
   weak_ptr<detail::IdentityImpl> m_impl;
 
   friend class v2::KeyChain;
+  friend bool operator!=(const Identity&, const Identity&);
 };
 
+bool
+operator!=(const Identity& lhs, const Identity& rhs);
+
+inline bool
+operator==(const Identity& lhs, const Identity& rhs)
+{
+  return !(lhs != rhs);
+}
+
+std::ostream&
+operator<<(std::ostream& os, const Identity& id);
+
 } // namespace pib
 
 using pib::Identity;
diff --git a/src/security/pib/key.cpp b/src/security/pib/key.cpp
index 3d7b83c..7396a5a 100644
--- a/src/security/pib/key.cpp
+++ b/src/security/pib/key.cpp
@@ -123,6 +123,24 @@
   return impl;
 }
 
+bool
+operator!=(const Key& lhs, const Key& rhs)
+{
+  return lhs.m_impl.owner_before(rhs.m_impl) || rhs.m_impl.owner_before(lhs.m_impl);
+}
+
+std::ostream&
+operator<<(std::ostream& os, const Key& key)
+{
+  if (key) {
+    os << key.getName();
+  }
+  else {
+    os << "(empty)";
+  }
+  return os;
+}
+
 } // namespace pib
 
 namespace v2 {
diff --git a/src/security/pib/key.hpp b/src/security/pib/key.hpp
index 90f4f5c..fbbed24 100644
--- a/src/security/pib/key.hpp
+++ b/src/security/pib/key.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -125,6 +125,7 @@
   /**
    * @brief Check if the Key instance is valid.
    */
+  explicit
   operator bool() const;
 
   /**
@@ -181,8 +182,21 @@
   weak_ptr<detail::KeyImpl> m_impl;
 
   friend class v2::KeyChain;
+  friend bool operator!=(const Key&, const Key&);
 };
 
+bool
+operator!=(const Key& lhs, const Key& rhs);
+
+inline bool
+operator==(const Key& lhs, const Key& rhs)
+{
+  return !(lhs != rhs);
+}
+
+std::ostream&
+operator<<(std::ostream& os, const Key& key);
+
 } // namespace pib
 
 using pib::Key;
diff --git a/tests/unit-tests/security/pib/identity.t.cpp b/tests/unit-tests/security/pib/identity.t.cpp
index 49bd8da..239da12 100644
--- a/tests/unit-tests/security/pib/identity.t.cpp
+++ b/tests/unit-tests/security/pib/identity.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -78,6 +78,9 @@
   auto identityImpl = make_shared<IdentityImpl>(id1, make_shared<pib::PibMemory>(), true);
   Identity identity1(identityImpl);
   Identity identity2(identityImpl);
+  BOOST_CHECK_EQUAL(identity1, identity2);
+  BOOST_CHECK_NE(identity1, Identity());
+  BOOST_CHECK_EQUAL(Identity(), Identity());
 
   identity1.addKey(id1Key1.buf(), id1Key1.size(), id1Key1Name);
   BOOST_CHECK_NO_THROW(identity2.getKey(id1Key1Name));
diff --git a/tests/unit-tests/security/pib/key.t.cpp b/tests/unit-tests/security/pib/key.t.cpp
index 2275c2e..a3543a3 100644
--- a/tests/unit-tests/security/pib/key.t.cpp
+++ b/tests/unit-tests/security/pib/key.t.cpp
@@ -79,6 +79,9 @@
   auto keyImpl = make_shared<KeyImpl>(id1Key1Name, id1Key1.buf(), id1Key1.size(), make_shared<pib::PibMemory>());
   Key key1(keyImpl);
   Key key2(keyImpl);
+  BOOST_CHECK_EQUAL(key1, key2);
+  BOOST_CHECK_NE(key1, Key());
+  BOOST_CHECK_EQUAL(Key(), Key());
 
   key1.addCertificate(id1Key1Cert1);
   BOOST_CHECK_NO_THROW(key2.getCertificate(id1Key1Cert1.getName()));
diff --git a/tools/ndnsec/list.cpp b/tools/ndnsec/list.cpp
index 36026d7..955fb6f 100644
--- a/tools/ndnsec/list.cpp
+++ b/tools/ndnsec/list.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -157,7 +157,7 @@
   // TODO add API to check for default identity (may be from the identity itself)
   security::Identity defaultIdentity;
   try {
-    keyChain.getPib().getDefaultIdentity();
+    defaultIdentity = keyChain.getPib().getDefaultIdentity();
   }
   catch (const security::Pib::Error&) {
     // no default identity
