diff --git a/ndn-cpp/encoding/der/der.cpp b/ndn-cpp/encoding/der/der.cpp
index 419ffae..e569819 100644
--- a/ndn-cpp/encoding/der/der.cpp
+++ b/ndn-cpp/encoding/der/der.cpp
@@ -213,7 +213,7 @@
   return size_ + header_.size();
 }
 
-shared_ptr<vector<uint8_t> >
+Blob
 DerComplex::getRaw()
 {
   shared_ptr<vector<uint8_t> > blob(new vector<uint8_t>());
@@ -221,7 +221,7 @@
 
   DerNodePtrList::iterator it = nodeList_.begin();
   for (; it != nodeList_.end(); it++) {
-    shared_ptr<vector<uint8_t> > childBlob = (*it)->getRaw();
+    Blob childBlob = (*it)->getRaw();
     blob->insert(blob->end(), childBlob->begin(), childBlob->end());
   }
   return blob;
diff --git a/ndn-cpp/encoding/der/der.hpp b/ndn-cpp/encoding/der/der.hpp
index a02a2e9..d8753be 100644
--- a/ndn-cpp/encoding/der/der.hpp
+++ b/ndn-cpp/encoding/der/der.hpp
@@ -17,6 +17,7 @@
 
 #include <ndn-cpp/common.hpp>
 #include <ndn-cpp/encoding/oid.hpp>
+#include <ndn-cpp/util/blob.hpp>
 
 #include "visitor/visitor.hpp"
 #include "visitor/void-visitor.hpp"
@@ -117,7 +118,7 @@
   const DerType& 
   getType() { return type_; }
 
-  virtual ptr_lib::shared_ptr<std::vector<uint8_t> >
+  virtual Blob
   getRaw()
   { 
     ptr_lib::shared_ptr<std::vector<uint8_t> > blob(new std::vector<uint8_t>());
@@ -179,7 +180,7 @@
   DerNodePtrList& 
   getChildren() { return nodeList_; }
 
-  virtual ptr_lib::shared_ptr<std::vector<uint8_t> >
+  virtual Blob
   getRaw();
 
 private:
diff --git a/ndn-cpp/encoding/der/visitor/certificate-data-visitor.cpp b/ndn-cpp/encoding/der/visitor/certificate-data-visitor.cpp
new file mode 100644
index 0000000..e2ea049
--- /dev/null
+++ b/ndn-cpp/encoding/der/visitor/certificate-data-visitor.cpp
@@ -0,0 +1,158 @@
+/* -*- 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 "simple-visitor.hpp"
+#include "public-key-visitor.hpp"
+#include "../der.hpp"
+
+#include <ndn-cpp/security/certificate/certificate.hpp>
+#include <ndn-cpp/security/certificate/certificate-subject-description.hpp>
+#include <ndn-cpp/security/certificate/certificate-extension.hpp>
+
+#include "../../../util/logging.hpp"
+#include "certificate-data-visitor.hpp"
+
+using namespace std;
+using namespace ndn::ptr_lib;
+
+INIT_LOGGER("ndn.der.CertificateDataVisitor");
+
+namespace ndn {
+
+namespace der {
+  
+/*
+ * CertificateDataVisitor
+ */
+void 
+CertificateDataVisitor::visit(DerSequence& derSeq, ndnboost::any param)
+{
+  // _LOG_DEBUG("CertificateDataVisitor::visit");
+
+  const DerNodePtrList& children = derSeq.getChildren();
+  CertValidityVisitor validityVisitor;
+  children[0]->accept(validityVisitor, param);
+  CertSubjectVisitor subjectVisitor;
+  children[1]->accept(subjectVisitor, param);
+  PublicKeyVisitor pubkeyVisitor;
+  Certificate* certData = ndnboost::any_cast<Certificate*>(param);
+  certData->setPublicKeyInfo(*ndnboost::any_cast<shared_ptr<PublicKey> >(children[2]->accept(pubkeyVisitor)));
+      
+  if(children.size() > 3)
+    {
+      CertExtensionVisitor extnVisitor;
+      children[3]->accept(extnVisitor, param);
+    }
+}
+
+/*
+ * CertValidityVisitor
+ */
+void 
+CertValidityVisitor::visit(DerSequence& derSeq, ndnboost::any param)
+{
+  // _LOG_DEBUG("CertValidityVisitor::visit");
+  
+  Certificate* certData = ndnboost::any_cast<Certificate*>(param); 
+
+  const DerNodePtrList& children = derSeq.getChildren();
+  
+  SimpleVisitor simpleVisitor;
+
+  MillisecondsSince1970 notBefore = ndnboost::any_cast<MillisecondsSince1970>(children[0]->accept(simpleVisitor));
+  MillisecondsSince1970 notAfter = ndnboost::any_cast<MillisecondsSince1970>(children[1]->accept(simpleVisitor));
+
+  // _LOG_DEBUG("parsed notBefore: " << notBefore);
+  // _LOG_DEBUG("parsed notAfter: " << notAfter);
+
+  certData->setNotBefore(notBefore);
+  certData->setNotAfter(notAfter);
+}
+
+/*
+ * CertSubDescryptVisitor
+ */
+void
+CertSubDescryptVisitor::visit(DerSequence& derSeq, ndnboost::any param)
+{
+  Certificate* certData = ndnboost::any_cast<Certificate*>(param); 
+  
+  const DerNodePtrList& children = derSeq.getChildren();
+  
+  SimpleVisitor simpleVisitor;
+
+  OID oid = ndnboost::any_cast<OID>(children[0]->accept(simpleVisitor));
+  string value = ndnboost::any_cast<string>(children[1]->accept(simpleVisitor));
+
+  CertificateSubjectDescription subDescrypt(oid, value);
+
+  certData->addSubjectDescription(subDescrypt);
+}
+
+/*
+ * CertSubjectVisitor
+ */
+void 
+CertSubjectVisitor::visit(DerSequence& derSeq, ndnboost::any param)
+{
+  // _LOG_DEBUG("CertSubjectVisitor::visit");
+
+  const DerNodePtrList& children = derSeq.getChildren();
+  
+  CertSubDescryptVisitor descryptVisitor;
+
+  DerNodePtrList::const_iterator it = children.begin();
+
+  while(it != children.end()) {
+    (*it)->accept(descryptVisitor, param);
+    it++;
+  }
+}
+
+/*
+ * CertExtnEntryVisitor
+ */
+void 
+CertExtnEntryVisitor::visit(DerSequence& derSeq, ndnboost::any param)
+{
+  Certificate* certData = ndnboost::any_cast<Certificate*>(param); 
+  
+  const DerNodePtrList& children = derSeq.getChildren();
+  
+  SimpleVisitor simpleVisitor;
+
+  OID oid = ndnboost::any_cast<OID>(children[0]->accept(simpleVisitor));
+  bool critical = ndnboost::any_cast<bool>(children[1]->accept(simpleVisitor));
+  const Blob& value = ndnboost::any_cast<const Blob&>(children[2]->accept(simpleVisitor));
+
+  CertificateExtension extension(oid, critical, value);
+
+  certData->addExtension(extension);
+}
+
+/*
+ * CertExtensionVisitor
+ */
+void 
+CertExtensionVisitor::visit(DerSequence& derSeq, ndnboost::any param)
+{
+  const DerNodePtrList& children = derSeq.getChildren();
+  
+  CertExtnEntryVisitor extnEntryVisitor;
+
+  DerNodePtrList::const_iterator it = children.begin();
+
+  while(it != children.end()) {
+    (*it)->accept(extnEntryVisitor, param);
+    it++;
+  }
+}
+
+} // der
+
+}
diff --git a/ndn-cpp/encoding/der/visitor/certificate-data-visitor.hpp b/ndn-cpp/encoding/der/visitor/certificate-data-visitor.hpp
new file mode 100644
index 0000000..3df60be
--- /dev/null
+++ b/ndn-cpp/encoding/der/visitor/certificate-data-visitor.hpp
@@ -0,0 +1,51 @@
+/* -*- 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.
+ */
+
+#ifndef NDN_CERTIFICATE_DATA_VISITOR_HPP
+#define NDN_CERTIFICATE_DATA_VISITOR_HPP
+
+#include "void-visitor.hpp"
+
+namespace ndn {
+
+namespace der {
+  
+class CertificateDataVisitor : public VoidVisitor {
+  virtual void visit(DerSequence&,         ndnboost::any);
+};
+
+class CertValidityVisitor : public VoidVisitor {
+public:
+  virtual void visit(DerSequence&,         ndnboost::any);
+};
+
+class CertSubDescryptVisitor : public VoidVisitor {
+public:
+  virtual void visit(DerSequence&,         ndnboost::any);
+};
+
+class CertSubjectVisitor : public VoidVisitor {
+public:
+  virtual void visit(DerSequence&,         ndnboost::any);
+};
+
+class CertExtnEntryVisitor : public VoidVisitor {
+public:
+  virtual void visit(DerSequence&,         ndnboost::any);
+};
+
+class CertExtensionVisitor : public VoidVisitor {
+public:
+  virtual void visit(DerSequence&,         ndnboost::any);
+};
+
+} // der
+
+}
+
+#endif
diff --git a/ndn-cpp/encoding/der/visitor/no-arguments-visitor.hpp b/ndn-cpp/encoding/der/visitor/no-arguments-visitor.hpp
index 8358066..09c24c1 100644
--- a/ndn-cpp/encoding/der/visitor/no-arguments-visitor.hpp
+++ b/ndn-cpp/encoding/der/visitor/no-arguments-visitor.hpp
@@ -18,15 +18,15 @@
 class NoArgumentsVisitor
 {
 public:
-  virtual ndnboost::any visit(DerBool&           ) = 0;
-  virtual ndnboost::any visit(DerInteger&        ) = 0;
-  virtual ndnboost::any visit(DerPrintableString&) = 0;
-  virtual ndnboost::any visit(DerBitString&      ) = 0;
-  virtual ndnboost::any visit(DerNull&           ) = 0;
-  virtual ndnboost::any visit(DerOctetString&    ) = 0;
-  virtual ndnboost::any visit(DerOid&            ) = 0;
-  virtual ndnboost::any visit(DerSequence&       ) = 0;
-  virtual ndnboost::any visit(DerGtime&          ) = 0;
+  virtual ndnboost::any visit(DerBool&           );
+  virtual ndnboost::any visit(DerInteger&        );
+  virtual ndnboost::any visit(DerPrintableString&);
+  virtual ndnboost::any visit(DerBitString&      );
+  virtual ndnboost::any visit(DerNull&           );
+  virtual ndnboost::any visit(DerOctetString&    );
+  virtual ndnboost::any visit(DerOid&            );
+  virtual ndnboost::any visit(DerSequence&       );
+  virtual ndnboost::any visit(DerGtime&          );
 };
 
 } // der
diff --git a/ndn-cpp/encoding/der/visitor/public-key-visitor.cpp b/ndn-cpp/encoding/der/visitor/public-key-visitor.cpp
new file mode 100644
index 0000000..87e4e6c
--- /dev/null
+++ b/ndn-cpp/encoding/der/visitor/public-key-visitor.cpp
@@ -0,0 +1,35 @@
+/* -*- 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 "simple-visitor.hpp"
+#include <ndn-cpp/security/certificate/public-key.hpp>
+#include "../der.hpp"
+#include "public-key-visitor.hpp"
+
+using namespace std;
+using namespace ndn::ptr_lib;
+
+namespace ndn {
+
+namespace der {
+  
+ndnboost::any 
+PublicKeyVisitor::visit(DerSequence& derSeq)
+{
+  const DerNodePtrList& children = derSeq.getChildren();
+
+  SimpleVisitor simpleVisitor;
+  shared_ptr<DerSequence> algoSeq = dynamic_pointer_cast<DerSequence>(children[0]); 
+  OID algorithm = ndnboost::any_cast<OID>(algoSeq->getChildren()[0]->accept(simpleVisitor));  
+  Blob raw = derSeq.getRaw();   
+  return ndnboost::any(shared_ptr<PublicKey>(new PublicKey(algorithm, raw)));    
+}
+
+} // der
+
+}
diff --git a/ndn-cpp/encoding/der/visitor/public-key-visitor.hpp b/ndn-cpp/encoding/der/visitor/public-key-visitor.hpp
new file mode 100644
index 0000000..54dfb66
--- /dev/null
+++ b/ndn-cpp/encoding/der/visitor/public-key-visitor.hpp
@@ -0,0 +1,27 @@
+/* -*- 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.
+ */
+
+#ifndef NDN_PUBLIC_KEY_VISITOR_HPP
+#define NDN_PUBLIC_KEY_VISITOR_HPP
+
+#include "no-arguments-visitor.hpp"
+
+namespace ndn {
+
+namespace der {
+
+class PublicKeyVisitor : public NoArgumentsVisitor {
+  public:
+    virtual ndnboost::any visit(DerSequence&       );
+};
+
+} // der
+
+}
+
+#endif
diff --git a/ndn-cpp/encoding/der/visitor/simple-visitor.hpp b/ndn-cpp/encoding/der/visitor/simple-visitor.hpp
index 73991f2..3f0584e 100644
--- a/ndn-cpp/encoding/der/visitor/simple-visitor.hpp
+++ b/ndn-cpp/encoding/der/visitor/simple-visitor.hpp
@@ -18,15 +18,15 @@
 class SimpleVisitor : public NoArgumentsVisitor
 {
 public:
-  virtual ndnboost::any visit(DerBool&           ) = 0;
-  virtual ndnboost::any visit(DerInteger&        ) = 0;
-  virtual ndnboost::any visit(DerPrintableString&) = 0;
-  virtual ndnboost::any visit(DerBitString&      ) = 0;
-  virtual ndnboost::any visit(DerNull&           ) = 0;
-  virtual ndnboost::any visit(DerOctetString&    ) = 0;
-  virtual ndnboost::any visit(DerOid&            ) = 0;
-  virtual ndnboost::any visit(DerSequence&       ) = 0;
-  virtual ndnboost::any visit(DerGtime&          ) = 0;
+  virtual ndnboost::any visit(DerBool&           );
+  virtual ndnboost::any visit(DerInteger&        );
+  virtual ndnboost::any visit(DerPrintableString&);
+  virtual ndnboost::any visit(DerBitString&      );
+  virtual ndnboost::any visit(DerNull&           );
+  virtual ndnboost::any visit(DerOctetString&    );
+  virtual ndnboost::any visit(DerOid&            );
+  virtual ndnboost::any visit(DerSequence&       );
+  virtual ndnboost::any visit(DerGtime&          );
 };
 
 } // der
diff --git a/ndn-cpp/encoding/der/visitor/void-visitor.hpp b/ndn-cpp/encoding/der/visitor/void-visitor.hpp
index 7cd7999..e853ee6 100644
--- a/ndn-cpp/encoding/der/visitor/void-visitor.hpp
+++ b/ndn-cpp/encoding/der/visitor/void-visitor.hpp
@@ -18,15 +18,15 @@
 class VoidVisitor
 {
 public:
-  virtual void visit(DerBool&,             ndnboost::any) = 0;
-  virtual void visit(DerInteger&,          ndnboost::any) = 0;
-  virtual void visit(DerPrintableString&,  ndnboost::any) = 0;
-  virtual void visit(DerBitString&,        ndnboost::any) = 0;
-  virtual void visit(DerNull&,             ndnboost::any) = 0;
-  virtual void visit(DerOctetString&,      ndnboost::any) = 0;
-  virtual void visit(DerOid&,              ndnboost::any) = 0;
-  virtual void visit(DerSequence&,         ndnboost::any) = 0;
-  virtual void visit(DerGtime&,            ndnboost::any) = 0;
+  virtual void visit(DerBool&,             ndnboost::any);
+  virtual void visit(DerInteger&,          ndnboost::any);
+  virtual void visit(DerPrintableString&,  ndnboost::any);
+  virtual void visit(DerBitString&,        ndnboost::any);
+  virtual void visit(DerNull&,             ndnboost::any);
+  virtual void visit(DerOctetString&,      ndnboost::any);
+  virtual void visit(DerOid&,              ndnboost::any);
+  virtual void visit(DerSequence&,         ndnboost::any);
+  virtual void visit(DerGtime&,            ndnboost::any);
 };
 
 } // der
