diff --git a/examples/consumer.cpp b/examples/consumer.cpp
new file mode 100644
index 0000000..ae79848
--- /dev/null
+++ b/examples/consumer.cpp
@@ -0,0 +1,124 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2018, Regents of the University of California
+ *
+ * NAC library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * NAC library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of NAC library authors and contributors.
+ */
+
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/validator-config.hpp>
+
+// #include <ndn-nac/decryptor.hpp>
+#include "decryptor.hpp"
+
+#include <iostream>
+
+// Enclosing code in ndn simplifies coding (can also use `using namespace ndn`)
+namespace ndn {
+namespace nac {
+// Additional nested namespaces can be used to prevent/limit name conflicts
+namespace examples {
+
+class Consumer : noncopyable
+{
+public:
+  Consumer()
+    : m_face(nullptr, m_keyChain)
+    , m_validator(m_face)
+    , m_decryptor(m_keyChain.getPib().getDefaultIdentity().getDefaultKey(), m_validator, m_keyChain, m_face)
+  {
+    m_validator.load(R"CONF(
+        trust-anchor
+        {
+          type any
+        }
+      )CONF", "fake-config");
+  }
+
+  void
+  run()
+  {
+    Interest interest(Name("/example/testApp/randomData"));
+    interest.setInterestLifetime(2_s); // 2 seconds
+    interest.setMustBeFresh(true);
+
+    m_face.expressInterest(interest,
+                           bind(&Consumer::onData, this,  _1, _2),
+                           bind(&Consumer::onNack, this, _1, _2),
+                           bind(&Consumer::onTimeout, this, _1));
+
+    std::cout << "Sending " << interest << std::endl;
+
+    // processEvents will block until the requested data received or timeout occurs
+    m_face.processEvents();
+  }
+
+private:
+  void
+  onData(const Interest& interest, const Data& data)
+  {
+    m_validator.validate(data,
+      [=] (const Data& data) {
+        m_decryptor.decrypt(data.getContent().blockFromValue(),
+          [=] (ConstBufferPtr content) {
+            std::cout << "Decrypted content: "
+                      << std::string(reinterpret_cast<const char*>(content->data()), content->size())
+                      << std::endl;
+          },
+          [=] (const ErrorCode&, const std::string& error) {
+            std::cerr << "Cannot decrypt data: " << error << std::endl;
+          });
+      },
+      [=] (const Data& data, const ValidationError& error) {
+        std::cerr << "Cannot validate retrieved data: " << error << std::endl;
+      });
+  }
+
+  void
+  onNack(const Interest& interest, const lp::Nack& nack)
+  {
+    std::cout << "received Nack with reason " << nack.getReason()
+              << " for interest " << interest << std::endl;
+  }
+
+  void
+  onTimeout(const Interest& interest)
+  {
+    std::cout << "Timeout " << interest << std::endl;
+  }
+
+private:
+  KeyChain m_keyChain;
+  Face m_face;
+  ValidatorConfig m_validator;
+  Decryptor m_decryptor;
+};
+
+} // namespace examples
+} // namespace nac
+} // namespace ndn
+
+int
+main(int argc, char** argv)
+{
+  ndn::nac::examples::Consumer consumer;
+  try {
+    consumer.run();
+  }
+  catch (const std::exception& e) {
+    std::cerr << "ERROR: " << e.what() << std::endl;
+  }
+  return 0;
+}
diff --git a/examples/producer.cpp b/examples/producer.cpp
new file mode 100644
index 0000000..ac3165e
--- /dev/null
+++ b/examples/producer.cpp
@@ -0,0 +1,135 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2018, Regents of the University of California
+ *
+ * NAC library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * NAC library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of NAC library authors and contributors.
+ */
+
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/security/validator-config.hpp>
+
+#include "encryptor.hpp"
+#include "access-manager.hpp"
+
+#include <iostream>
+
+// Enclosing code in ndn simplifies coding (can also use `using namespace ndn`)
+namespace ndn {
+namespace nac {
+// Additional nested namespaces can be used to prevent/limit name conflicts
+namespace examples {
+
+class Producer : noncopyable
+{
+public:
+  Producer()
+    : m_face(nullptr, m_keyChain)
+    , m_validator(m_face)
+    , m_accessManager(m_keyChain.createIdentity("/nac/example", RsaKeyParams()), "test",
+                      m_keyChain, m_face)
+    , m_encryptor("/nac/example/NAC/test",
+                  "/nac/example/CK", signingWithSha256(),
+                  [] (auto...) {
+                    std::cerr << "Failed to publish CK";
+                  }, m_validator, m_keyChain, m_face)\
+  {
+    m_validator.load(R"CONF(
+        trust-anchor
+        {
+          type any
+        }
+      )CONF", "fake-config");
+  }
+
+  void
+  run()
+  {
+    // give access to default identity. If consumer uses the same default identity, he will be able to decrypt
+    m_accessManager.addMember(m_keyChain.getPib().getDefaultIdentity().getDefaultKey().getDefaultCertificate());
+
+    m_face.setInterestFilter("/example/testApp",
+                             bind(&Producer::onInterest, this, _1, _2),
+                             RegisterPrefixSuccessCallback(),
+                             bind(&Producer::onRegisterFailed, this, _1, _2));
+    m_face.processEvents();
+  }
+
+private:
+  void
+  onInterest(const InterestFilter& filter, const Interest& interest)
+  {
+    std::cout << "<< I: " << interest << std::endl;
+
+    // Create new name, based on Interest's name
+    Name dataName(interest.getName());
+    dataName
+      .append("testApp") // add "testApp" component to Interest name
+      .appendVersion();  // add "version" component (current UNIX timestamp in milliseconds)
+
+    static const std::string content = "HELLO KITTY";
+
+    // Create Data packet
+    shared_ptr<Data> data = make_shared<Data>();
+    data->setName(dataName);
+    data->setFreshnessPeriod(10_s); // 10 seconds
+
+    auto blob = m_encryptor.encrypt(reinterpret_cast<const uint8_t*>(content.data()), content.size());
+    data->setContent(blob.wireEncode());
+
+    // Sign Data packet with default identity
+    m_keyChain.sign(*data);
+    // m_keyChain.sign(data, <identityName>);
+    // m_keyChain.sign(data, <certificate>);
+
+    // Return Data packet to the requester
+    std::cout << ">> D: " << *data << std::endl;
+    m_face.put(*data);
+  }
+
+
+  void
+  onRegisterFailed(const Name& prefix, const std::string& reason)
+  {
+    std::cerr << "ERROR: Failed to register prefix \""
+              << prefix << "\" in local hub's daemon (" << reason << ")"
+              << std::endl;
+    m_face.shutdown();
+  }
+
+private:
+  KeyChain m_keyChain;
+  Face m_face;
+  ValidatorConfig m_validator;
+  AccessManager m_accessManager;
+  Encryptor m_encryptor;
+};
+
+} // namespace examples
+} // namespace nac
+} // namespace ndn
+
+int
+main(int argc, char** argv)
+{
+  ndn::nac::examples::Producer producer;
+  try {
+    producer.run();
+  }
+  catch (const std::exception& e) {
+    std::cerr << "ERROR: " << e.what() << std::endl;
+  }
+  return 0;
+}
diff --git a/examples/wscript b/examples/wscript
new file mode 100644
index 0000000..2620281
--- /dev/null
+++ b/examples/wscript
@@ -0,0 +1,25 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+top = '..'
+
+def build(bld):
+    # List all .cpp files (whole example should be in one .cpp)
+    for example in bld.path.ant_glob(['*.cpp']):
+        name = example.change_ext('').path_from(bld.path.get_bld())
+        bld(features=['cxx', 'cxxprogram'],
+            target=name,
+            source=[example] + bld.path.ant_glob(['%s/**/*.cpp' % name]),
+            use='NDN_CXX libndn-nac',
+            install_path=None
+            )
+
+    # List all directories files (example can has multiple .cpp in the directory)
+    for name in bld.path.ant_glob(['*'], dir=True, src=False):
+        name = subdir.path_from(bld.path)
+        bld(features=['cxx', 'cxxprogram'],
+            target="%s/%s" % (name, name),
+            source=bld.path.ant_glob(['%s/**/*.cpp' % name]),
+            use='NDN_CXX libndn-nac',
+            install_path=None,
+            includes='%s' % name,
+            )
