diff --git a/src/validator-invitation.h b/src/validator-invitation.h
new file mode 100644
index 0000000..ede1799
--- /dev/null
+++ b/src/validator-invitation.h
@@ -0,0 +1,132 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ *                     Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#ifndef CHRONOS_VALIDATOR_INVITATION_H
+#define CHRONOS_VALIDATOR_INVITATION_H
+
+#include <ndn-cpp-dev/security/validator.hpp>
+#include <ndn-cpp-dev/security/certificate-cache.hpp>
+#include <ndn-cpp-dev/security/sec-rule-relative.hpp>
+#include <map>
+
+#include "endorse-certificate.h"
+
+namespace chronos{
+
+class ValidatorInvitation : public ndn::Validator
+{
+  typedef ndn::function< void () > OnValidationFailed;
+  typedef ndn::function< void () > OnValidated;
+
+public:
+  struct Error : public Validator::Error { Error(const std::string &what) : Validator::Error(what) {} };
+
+  static const ndn::shared_ptr<ndn::CertificateCache> DefaultCertificateCache;
+
+  ValidatorInvitation(ndn::shared_ptr<ndn::Face> face,                      
+                      const std::string& chatroomName,
+                      const ndn::Name& signingIdentity,
+                      ndn::shared_ptr<ndn::CertificateCache> certificateCache = DefaultCertificateCache,
+                      int stepLimit = 10);
+  
+  virtual
+  ~ValidatorInvitation() {};
+
+  void
+  addTrustAnchor(const EndorseCertificate& cert)
+  { m_trustAnchors[cert.getPublicKeyName()] = cert.getPublicKeyInfo(); }
+
+  void
+  removeTrustAnchor(const ndn::Name& keyName)
+  { m_trustAnchors.erase(keyName); }
+
+  ndn::shared_ptr<ndn::IdentityCertificate> 
+  getValidatedDskCertificate(const ndn::Name& certName)
+  {
+    ValidatedCertifcates::iterator it = m_dskCertificates.find(certName);
+    if(m_dskCertificates.end() != it)
+      return it->second;
+    else
+      return ndn::shared_ptr<ndn::IdentityCertificate>();
+  }
+
+
+protected:
+  void
+  checkPolicy (const ndn::shared_ptr<const ndn::Data>& data, 
+               int stepCount, 
+               const ndn::OnDataValidated& onValidated, 
+               const ndn::OnDataValidationFailed& onValidationFailed,
+               std::vector<ndn::shared_ptr<ndn::ValidationRequest> >& nextSteps);
+
+  void
+  checkPolicy (const ndn::shared_ptr<const ndn::Interest>& interest, 
+               int stepCount, 
+               const ndn::OnInterestValidated& onValidated, 
+               const ndn::OnInterestValidationFailed& onValidationFailed,
+               std::vector<ndn::shared_ptr<ndn::ValidationRequest> >& nextSteps);
+
+private:
+  void 
+  onDskKeyLocatorValidated(const ndn::shared_ptr<const ndn::Data>& certData, 
+                           const uint8_t* buf,
+                           const size_t size,
+                           const ndn::SignatureSha256WithRsa& signature,
+                           const OnValidated& onValidated, 
+                           const OnValidationFailed& onValidationFailed);
+  
+  void
+  onDskKeyLocatorValidationFailed(const ndn::shared_ptr<const ndn::Data>& certData, 
+                                  const OnValidationFailed& onValidationFailed);
+
+  void
+  processSignature (const uint8_t* buf, 
+                    const size_t size,
+                    const ndn::SignatureSha256WithRsa& signature,
+                    const ndn::Name& keyLocatorName,
+                    const OnValidated& onValidated, 
+                    const OnValidationFailed& onValidationFailed,
+                    int stepCount,
+                    std::vector<ndn::shared_ptr<ndn::ValidationRequest> >& nextSteps);
+
+  void
+  processFinalSignature (const uint8_t* buf, 
+                         const size_t size,
+                         const ndn::SignatureSha256WithRsa& signature,
+                         const ndn::Name& keyLocatorName,
+                         const OnValidated& onValidated, 
+                         const OnValidationFailed& onValidationFailed);
+
+private:
+
+  typedef std::map<ndn::Name, ndn::PublicKey> TrustAnchors;
+  typedef std::map<ndn::Name, ndn::shared_ptr<ndn::IdentityCertificate> > ValidatedCertifcates;
+
+  int m_stepLimit;
+  ndn::shared_ptr<ndn::CertificateCache> m_certificateCache;
+
+  std::string m_chatroomName;
+  ndn::Name m_signingIdentity;
+
+  ndn::shared_ptr<ndn::SecRuleRelative> m_invitationRule;
+  ndn::shared_ptr<ndn::SecRuleRelative> m_dskRule;
+
+  ndn::shared_ptr<ndn::Regex> m_kskRegex;
+  ndn::shared_ptr<ndn::Regex> m_keyNameRegex;
+
+  TrustAnchors m_trustAnchors;
+
+  ValidatedCertifcates m_dskCertificates;
+
+};
+
+}//chronos
+
+#endif //CHRONOS_VALIDATOR_INVITATION_H
