diff --git a/src/security/certificate-cache-ttl.cpp b/src/security/certificate-cache-ttl.cpp
index 9538d95..0892789 100644
--- a/src/security/certificate-cache-ttl.cpp
+++ b/src/security/certificate-cache-ttl.cpp
@@ -15,8 +15,8 @@
 
 using namespace std;
 
-namespace ndn
-{    
+namespace ndn {
+
 CertificateCacheTtl::CertificateCacheTtl(shared_ptr<boost::asio::io_service> io, int defaultTtl)
   : m_defaultTtl(defaultTtl)
   , m_scheduler(*io)
@@ -66,6 +66,6 @@
     return ptr_lib::shared_ptr<IdentityCertificate>();
 }
 
-}//ndn
+} // namespace ndn
 
 
diff --git a/src/security/certificate-cache-ttl.hpp b/src/security/certificate-cache-ttl.hpp
index 8702c3a..9ac91d5 100644
--- a/src/security/certificate-cache-ttl.hpp
+++ b/src/security/certificate-cache-ttl.hpp
@@ -5,8 +5,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_CERTIFICATE_CACHE_TTL_HPP
-#define NDN_CERTIFICATE_CACHE_TTL_HPP
+#ifndef NDN_SECURITY_CERTIFICATE_CACHE_TTL_HPP
+#define NDN_SECURITY_CERTIFICATE_CACHE_TTL_HPP
 
 #include "../common.hpp"
 #include "certificate-cache.hpp"
@@ -46,6 +46,6 @@
   Scheduler m_scheduler;
 };
 
-}//ndn
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_CERTIFICATE_CACHE_TTL_HPP
diff --git a/src/security/certificate-cache.hpp b/src/security/certificate-cache.hpp
index 14c42d1..9d99dcc 100644
--- a/src/security/certificate-cache.hpp
+++ b/src/security/certificate-cache.hpp
@@ -5,14 +5,13 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_CERTIFICATE_CACHE_HPP
-#define NDN_CERTIFICATE_CACHE_HPP
+#ifndef NDN_SECURITY_CERTIFICATE_CACHE_HPP
+#define NDN_SECURITY_CERTIFICATE_CACHE_HPP
 
 #include "../name.hpp"
 #include "identity-certificate.hpp"
 
-namespace ndn
-{
+namespace ndn {
 
 class CertificateCache
 {
@@ -27,6 +26,6 @@
   getCertificate(const Name& certificateNameWithoutVersion) = 0;
 };
 
-}//ndn
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_CERTIFICATE_CACHE_HPP
diff --git a/src/security/certificate-extension.cpp b/src/security/certificate-extension.cpp
index e3ceff6..69a2d10 100644
--- a/src/security/certificate-extension.cpp
+++ b/src/security/certificate-extension.cpp
@@ -55,4 +55,4 @@
   extension.MessageEnd();
 }
  
-}
+} // namespace ndn
diff --git a/src/security/certificate-extension.hpp b/src/security/certificate-extension.hpp
index 61f7dd2..4eba4f2 100644
--- a/src/security/certificate-extension.hpp
+++ b/src/security/certificate-extension.hpp
@@ -6,8 +6,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_CERTIFICATE_EXTENSION_HPP
-#define NDN_CERTIFICATE_EXTENSION_HPP
+#ifndef NDN_SECURITY_CERTIFICATE_EXTENSION_HPP
+#define NDN_SECURITY_CERTIFICATE_EXTENSION_HPP
 
 #include "../common.hpp"
 #include "../encoding/buffer.hpp"
@@ -73,6 +73,6 @@
   Buffer extensionValue_;
 };
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_CERTIFICATE_EXTENSION_HPP
diff --git a/src/security/certificate-subject-description.cpp b/src/security/certificate-subject-description.cpp
index 63e7b0b..ccf6778 100644
--- a/src/security/certificate-subject-description.cpp
+++ b/src/security/certificate-subject-description.cpp
@@ -63,4 +63,4 @@
   attributeTypeAndValue.MessageEnd();
 }
 
-}
+} // namespace ndn
diff --git a/src/security/certificate-subject-description.hpp b/src/security/certificate-subject-description.hpp
index fc26d37..5510f6e 100644
--- a/src/security/certificate-subject-description.hpp
+++ b/src/security/certificate-subject-description.hpp
@@ -6,8 +6,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
-#define NDN_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
+#ifndef NDN_SECURITY_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
+#define NDN_SECURITY_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
 
 #include "../common.hpp"
 #include "../encoding/oid.hpp"
@@ -59,6 +59,6 @@
   std::string value_;
 };
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
diff --git a/src/security/certificate.cpp b/src/security/certificate.cpp
index 3778a80..f0dfdf2 100644
--- a/src/security/certificate.cpp
+++ b/src/security/certificate.cpp
@@ -265,4 +265,4 @@
   // keyRoot->accept(printVisitor, string(""));
 }
 
-}
+} // namespace ndn
diff --git a/src/security/certificate.hpp b/src/security/certificate.hpp
index 260638a..35934d0 100644
--- a/src/security/certificate.hpp
+++ b/src/security/certificate.hpp
@@ -6,8 +6,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_CERTIFICATE_HPP
-#define NDN_CERTIFICATE_HPP
+#ifndef NDN_SECURITY_CERTIFICATE_HPP
+#define NDN_SECURITY_CERTIFICATE_HPP
 
 #include "../common.hpp"
 #include "../data.hpp"
@@ -153,4 +153,4 @@
 
 } // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_CERTIFICATE_HPP
diff --git a/src/security/identity-certificate.cpp b/src/security/identity-certificate.cpp
index 44d6588..5fddbfc 100644
--- a/src/security/identity-certificate.cpp
+++ b/src/security/identity-certificate.cpp
@@ -90,4 +90,4 @@
   return tmpName.getSubName(0, i).append(tmpName.getSubName(i + 1, tmpName.size() - i - 1));
 }
 
-}
+} // namespace ndn
diff --git a/src/security/identity-certificate.hpp b/src/security/identity-certificate.hpp
index fa31966..6d6d334 100644
--- a/src/security/identity-certificate.hpp
+++ b/src/security/identity-certificate.hpp
@@ -6,8 +6,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_IDENTITY_CERTIFICATE_HPP
-#define NDN_IDENTITY_CERTIFICATE_HPP
+#ifndef NDN_SECURITY_IDENTITY_CERTIFICATE_HPP
+#define NDN_SECURITY_IDENTITY_CERTIFICATE_HPP
 
 #include "../common.hpp"
 #include "certificate.hpp"
@@ -108,6 +108,6 @@
   return publicKeyName_;
 }
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_IDENTITY_CERTIFICATE_HPP
diff --git a/src/security/key-chain.hpp b/src/security/key-chain.hpp
index 981dfce..7a3ff42 100644
--- a/src/security/key-chain.hpp
+++ b/src/security/key-chain.hpp
@@ -6,8 +6,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_KEY_CHAIN_HPP
-#define NDN_KEY_CHAIN_HPP
+#ifndef NDN_SECURITY_KEY_CHAIN_HPP
+#define NDN_SECURITY_KEY_CHAIN_HPP
 
 #include "identity-certificate.hpp"
 #include "public-key.hpp"
@@ -539,7 +539,7 @@
 
 };
 
-}
+} // namespace ndn
 
 
 
@@ -559,4 +559,4 @@
 
 #endif //NDN_CPP_HAVE_OSX_SECURITY
 
-#endif
+#endif //NDN_SECURITY_KEY_CHAIN_HPP
diff --git a/src/security/public-key.cpp b/src/security/public-key.cpp
index 09222a4..c8362af 100644
--- a/src/security/public-key.cpp
+++ b/src/security/public-key.cpp
@@ -115,4 +115,4 @@
   return os;
 }
 
-}
+} // namespace ndn
diff --git a/src/security/public-key.hpp b/src/security/public-key.hpp
index 8fc5dab..a332f02 100644
--- a/src/security/public-key.hpp
+++ b/src/security/public-key.hpp
@@ -6,8 +6,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_PUBLIC_KEY_HPP
-#define NDN_PUBLIC_KEY_HPP
+#ifndef NDN_SECURITY_PUBLIC_KEY_HPP
+#define NDN_SECURITY_PUBLIC_KEY_HPP
 
 #include "../common.hpp"
 
@@ -80,6 +80,6 @@
 std::ostream &
 operator <<(std::ostream &os, const PublicKey &key);
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_PUBLIC_KEY_HPP
diff --git a/src/security/sec-public-info-memory.cpp b/src/security/sec-public-info-memory.cpp
index e9f93f2..1e41df1 100644
--- a/src/security/sec-public-info-memory.cpp
+++ b/src/security/sec-public-info-memory.cpp
@@ -219,6 +219,4 @@
   throw runtime_error("SecPublicInfoMemory::deleteIdentityInfo not implemented");
 }
 
-
-
-}
+} // namespace ndn
diff --git a/src/security/sec-public-info-memory.hpp b/src/security/sec-public-info-memory.hpp
index e598ebf..04104ea 100644
--- a/src/security/sec-public-info-memory.hpp
+++ b/src/security/sec-public-info-memory.hpp
@@ -5,8 +5,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_SEC_PUBLIC_INFO_MEMORY_HPP
-#define NDN_SEC_PUBLIC_INFO_MEMORY_HPP
+#ifndef NDN_SECURITY_SEC_PUBLIC_INFO_MEMORY_HPP
+#define NDN_SECURITY_SEC_PUBLIC_INFO_MEMORY_HPP
 
 #include "../common.hpp"
 #include "sec-public-info.hpp"
@@ -232,6 +232,6 @@
   CertificateStore certificateStore_;                    
 };
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_SEC_PUBLIC_INFO_MEMORY_HPP
diff --git a/src/security/sec-public-info-sqlite3.cpp b/src/security/sec-public-info-sqlite3.cpp
index bc16d9d..fbef713 100644
--- a/src/security/sec-public-info-sqlite3.cpp
+++ b/src/security/sec-public-info-sqlite3.cpp
@@ -30,8 +30,7 @@
 
 using namespace std;
 
-namespace ndn
-{
+namespace ndn {
 
 static const string INIT_ID_TABLE = "\
 CREATE TABLE IF NOT EXISTS                                           \n \
diff --git a/src/security/sec-public-info-sqlite3.hpp b/src/security/sec-public-info-sqlite3.hpp
index 94dc0fa..2cecb04 100644
--- a/src/security/sec-public-info-sqlite3.hpp
+++ b/src/security/sec-public-info-sqlite3.hpp
@@ -6,16 +6,15 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_SEC_PUBLIC_INFO_SQLITE3_HPP
-#define NDN_SEC_PUBLIC_INFO_SQLITE3_HPP
+#ifndef NDN_SECURITY_SEC_PUBLIC_INFO_SQLITE3_HPP
+#define NDN_SECURITY_SEC_PUBLIC_INFO_SQLITE3_HPP
 
 #include "../common.hpp"
 #include "sec-public-info.hpp"
 
 struct sqlite3;
 
-namespace ndn
-{
+namespace ndn {
   
 /**
  * BasicIdentityStorage extends IdentityStorage to implement a basic storage of identity, public keys and certificates
@@ -234,6 +233,6 @@
   updateKeyStatus(keyName, false);
 }
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_SEC_PUBLIC_INFO_SQLITE3_HPP
diff --git a/src/security/sec-public-info.hpp b/src/security/sec-public-info.hpp
index aa35ff9..b68875b 100644
--- a/src/security/sec-public-info.hpp
+++ b/src/security/sec-public-info.hpp
@@ -6,8 +6,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_SEC_PUBLIC_INFO_HPP
-#define NDN_SEC_PUBLIC_INFO_HPP
+#ifndef NDN_SECURITY_SEC_PUBLIC_INFO_HPP
+#define NDN_SECURITY_SEC_PUBLIC_INFO_HPP
 
 #include "../name.hpp"
 #include "security-common.hpp"
@@ -399,6 +399,6 @@
     defaultCertificate_ = getCertificate(certName);
 }
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_SEC_PUBLIC_INFO_HPP
diff --git a/src/security/sec-rule-relative.cpp b/src/security/sec-rule-relative.cpp
index cdfdeac..db3e653 100644
--- a/src/security/sec-rule-relative.cpp
+++ b/src/security/sec-rule-relative.cpp
@@ -18,8 +18,7 @@
 
 using namespace std;
 
-namespace ndn
-{
+namespace ndn {
 
 SecRuleRelative::SecRuleRelative (const string& dataRegex, const string& signerRegex, const string& op, 
                                   const string& dataExpand, const string& signerExpand, bool isPositive)
@@ -111,4 +110,4 @@
     return true;
 }
 
-}//ndn
+} // namespace ndn
diff --git a/src/security/sec-rule-relative.hpp b/src/security/sec-rule-relative.hpp
index 1d763de..59c8f09 100644
--- a/src/security/sec-rule-relative.hpp
+++ b/src/security/sec-rule-relative.hpp
@@ -6,14 +6,13 @@
  */
 
 
-#ifndef NDN_SEC_RULE_RELATIVE_HPP
-#define NDN_SEC_RULE_RELATIVE_HPP
+#ifndef NDN_SECURITY_SEC_RULE_RELATIVE_HPP
+#define NDN_SECURITY_SEC_RULE_RELATIVE_HPP
 
 #include "sec-rule.hpp"
 #include "../util/regex.hpp"
 
-namespace ndn
-{
+namespace ndn {
   
 class SecRuleRelative : public SecRule
 {
@@ -53,6 +52,6 @@
   Regex m_signerNameRegex;
 };
 
-}//ndn
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_SEC_RULE_RELATIVE_HPP
diff --git a/src/security/sec-rule-specific.cpp b/src/security/sec-rule-specific.cpp
index b1973de..484a08e 100644
--- a/src/security/sec-rule-specific.cpp
+++ b/src/security/sec-rule-specific.cpp
@@ -10,10 +10,9 @@
 #include "sec-rule-specific.hpp"
 #include "signature-sha256-with-rsa.hpp"
 
-using namespace ndn;
 using namespace std;
 
-namespace ndn{
+namespace ndn {
 
 SecRuleSpecific::SecRuleSpecific(shared_ptr<Regex> dataRegex,
                                  shared_ptr<Regex> signerRegex)
@@ -48,10 +47,14 @@
 
 bool
 SecRuleSpecific::satisfy(const Data & data)
-{ return (matchDataName(data) && matchSignerName(data)) ? true : false ; }
+{ 
+  return (matchDataName(data) && matchSignerName(data)) ? true : false ; 
+}
 
 bool
 SecRuleSpecific::satisfy(const Name & dataName, const Name & signerName)
-{ return (m_dataRegex->match(dataName) && m_signerRegex->match(signerName)); }
-
+{ 
+  return (m_dataRegex->match(dataName) && m_signerRegex->match(signerName)); 
 }
+
+} // namespace ndn
diff --git a/src/security/sec-rule-specific.hpp b/src/security/sec-rule-specific.hpp
index 2b7b355..1e961a0 100644
--- a/src/security/sec-rule-specific.hpp
+++ b/src/security/sec-rule-specific.hpp
@@ -5,14 +5,14 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_SEC_RULE_SPECIFIC_H
-#define NDN_SEC_RULE_SPECIFIC_H
+#ifndef NDN_SECURITY_SEC_RULE_SPECIFIC_H
+#define NDN_SECURITY_SEC_RULE_SPECIFIC_H
 
 #include "../common.hpp"
 #include "sec-rule.hpp"
 #include "../util/regex.hpp"
 
-namespace ndn{
+namespace ndn {
 
 class SecRuleSpecific : public ndn::SecRule
 {
@@ -43,6 +43,6 @@
   ndn::shared_ptr<ndn::Regex> m_signerRegex;
 };
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_SEC_RULE_SPECIFIC_H
diff --git a/src/security/sec-rule.hpp b/src/security/sec-rule.hpp
index c175863..496b33d 100644
--- a/src/security/sec-rule.hpp
+++ b/src/security/sec-rule.hpp
@@ -5,14 +5,13 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_SEC_RULE_HPP
-#define NDN_SEC_RULE_HPP
+#ifndef NDN_SECURITY_SEC_RULE_HPP
+#define NDN_SECURITY_SEC_RULE_HPP
 
 #include "../common.hpp"
 #include "../data.hpp"
 
-namespace ndn
-{
+namespace ndn {
 
 class SecRule
 {
@@ -52,6 +51,6 @@
   return m_isPositive;
 }
     
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_SEC_RULE_HPP
diff --git a/src/security/sec-tpm-file.cpp b/src/security/sec-tpm-file.cpp
index 78d7ef7..ecb8237 100644
--- a/src/security/sec-tpm-file.cpp
+++ b/src/security/sec-tpm-file.cpp
@@ -33,8 +33,7 @@
 
 using namespace std;
 
-namespace ndn
-{
+namespace ndn {
 
 class SecTpmFile::Impl {
 public:
@@ -243,7 +242,7 @@
 
 
 ConstBufferPtr
-SecTpmFile::decryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric)
+SecTpmFile::decryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric)
 {
   string keyURI = keyName.toUri();
   if (!isSymmetric)
@@ -303,7 +302,7 @@
 }
 
 ConstBufferPtr
-SecTpmFile::encryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric)
+SecTpmFile::encryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric)
 {
   string keyURI = keyName.toUri();
 
@@ -437,4 +436,4 @@
   }
 }
 
-} //ndn
+} // namespace ndn
diff --git a/src/security/sec-tpm-file.hpp b/src/security/sec-tpm-file.hpp
index f1e6fa8..5f40200 100644
--- a/src/security/sec-tpm-file.hpp
+++ b/src/security/sec-tpm-file.hpp
@@ -6,15 +6,14 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_SEC_TPM_FILE_HPP
-#define NDN_SEC_TPM_FILE_HPP
+#ifndef NDN_SECURITY_SEC_TPM_FILE_HPP
+#define NDN_SECURITY_SEC_TPM_FILE_HPP
 
 #include "../common.hpp"
 
 #include "sec-tpm.hpp"
 
-namespace ndn 
-{
+namespace ndn {
 
 class SecTpmFile : public SecTpm
 {
@@ -23,9 +22,6 @@
 
   SecTpmFile(const std::string & dir = "");
 
-  /**
-   * @brief destructor
-   */
   virtual
   ~SecTpmFile() {};
 
@@ -38,71 +34,24 @@
   virtual void
   generateKeyPairInTpm(const Name & keyName, KeyType keyType, int keySize);
 
-  /**
-   * Delete a key pair of asymmetric keys.
-   * @param keyName The name of the key pair.
-   */
   virtual void
   deleteKeyPairInTpm(const Name &keyName);
 
-  /**
-   * Get the public key
-   * @param keyName The name of public key.
-   * @return The public key.
-   */
-  virtual ptr_lib::shared_ptr<PublicKey>
+  virtual shared_ptr<PublicKey>
   getPublicKeyFromTpm(const Name & keyName);
 
-  /**
-   * Fetch the private key for keyName and sign the data, returning a signature block.
-   * Throw Error if signing fails.
-   * @param data Pointer to the input byte array.
-   * @param dataLength The length of data.
-   * @param keyName The name of the signing key.
-   * @param digestAlgorithm the digest algorithm.
-   * @return The signature block.
-   */  
   virtual Block
   signInTpm(const uint8_t *data, size_t dataLength, const Name& keyName, DigestAlgorithm digestAlgorithm);
 
-  /**
-   * Decrypt data.
-   * @param keyName The name of the decrypting key.
-   * @param data The byte to be decrypted.
-   * @param dataLength the length of data.
-   * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric encryption is used.
-   * @return The decrypted data.
-   */
   virtual ConstBufferPtr 
-  decryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric);
+  decryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric);
 
-  /**
-   * Encrypt data.
-   * @param keyName The name of the encrypting key.
-   * @param data The byte to be encrypted.
-   * @param dataLength the length of data.
-   * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric decryption is used.
-   * @return The encrypted data.
-   */
   virtual ConstBufferPtr
-  encryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric);
+  encryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric);
 
-
-  /**
-   * Generate a symmetric key.
-   * @param keyName The name of the key.
-   * @param keyType The type of the key, e.g. KEY_TYPE_AES.
-   * @param keySize The size of the key.
-   */
   virtual void 
   generateSymmetricKeyInTpm(const Name& keyName, KeyType keyType, int keySize);
 
-  /**
-   * Check if a particular key exists.
-   * @param keyName The name of the key.
-   * @param keyClass The class of the key, e.g. KEY_CLASS_PUBLIC, KEY_CLASS_PRIVATE, or KEY_CLASS_SYMMETRIC.
-   * @return True if the key exists, otherwise false.
-   */
   virtual bool
   doesKeyExistInTpm(const Name& keyName, KeyClass keyClass);
 
@@ -127,6 +76,6 @@
   shared_ptr<Impl> m_impl;
 };
 
-}//ndn
+} // namespace ndn
 
-#endif
+#endif  //NDN_SECURITY_SEC_TPM_FILE_HPP
diff --git a/src/security/sec-tpm-memory.cpp b/src/security/sec-tpm-memory.cpp
index 231a195..638a174 100644
--- a/src/security/sec-tpm-memory.cpp
+++ b/src/security/sec-tpm-memory.cpp
@@ -138,7 +138,7 @@
 }
 
 ConstBufferPtr
-SecTpmMemory::decryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric)
+SecTpmMemory::decryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric)
 {
 #if 1
   throw Error("MemoryPrivateKeyStorage::decrypt not implemented");
@@ -146,7 +146,7 @@
 }
 
 ConstBufferPtr
-SecTpmMemory::encryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric)
+SecTpmMemory::encryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric)
 {
 #if 1
   throw Error("MemoryPrivateKeyStorage::encrypt not implemented");
@@ -185,4 +185,4 @@
   }
 }
 
-}
+} // namespace ndn
diff --git a/src/security/sec-tpm-memory.hpp b/src/security/sec-tpm-memory.hpp
index b24246b..01860e2 100644
--- a/src/security/sec-tpm-memory.hpp
+++ b/src/security/sec-tpm-memory.hpp
@@ -5,8 +5,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_SEC_TPM_MEMORY_HPP
-#define NDN_SEC_TPM_MEMORY_HPP
+#ifndef NDN_SECURITY_SEC_TPM_MEMORY_HPP
+#define NDN_SECURITY_SEC_TPM_MEMORY_HPP
 
 #include "../common.hpp"
 #include "sec-tpm.hpp"
@@ -23,9 +23,6 @@
 public:
   struct Error : public SecTpm::Error { Error(const std::string &what) : SecTpm::Error(what) {} };
 
-  /**
-   * The virtual destructor
-   */    
   virtual 
   ~SecTpmMemory();
 
@@ -36,60 +33,21 @@
   virtual void 
   generateKeyPairInTpm(const Name& keyName, KeyType keyType, int keySize);
 
-  /**
-   * Get the public key
-   * @param keyName The name of public key.
-   * @return The public key.
-   */
   virtual ptr_lib::shared_ptr<PublicKey> 
   getPublicKeyFromTpm(const Name& keyName);
 
-  /**
-   * Delete a key pair of asymmetric keys.
-   * @param keyName The name of the key pair.
-   */
   virtual void
   deleteKeyPairInTpm(const Name &keyName);
-  
-  /**
-   * Fetch the private key for keyName and sign the data, returning a signature Blob.
-   * @param data Pointer to the input byte array.
-   * @param dataLength The length of data.
-   * @param keyName The name of the signing key.
-   * @param digestAlgorithm the digest algorithm.
-   * @return The signature, or a null pointer if signing fails.
-   */  
+
   virtual Block 
   signInTpm(const uint8_t *data, size_t dataLength, const Name& keyName, DigestAlgorithm digestAlgorithm);
   
-  /**
-   * Decrypt data.
-   * @param keyName The name of the decrypting key.
-   * @param data The byte to be decrypted.
-   * @param dataLength the length of data.
-   * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric decryption is used.
-   * @return The decrypted data.
-   */
   virtual ConstBufferPtr 
-  decryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric);
+  decryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric);
 
-  /**
-   * Encrypt data.
-   * @param keyName The name of the encrypting key.
-   * @param data The byte to be encrypted.
-   * @param dataLength the length of data.
-   * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric decryption is used.
-   * @return The encrypted data.
-   */
   virtual ConstBufferPtr
-  encryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric);
+  encryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric);
 
-  /**
-   * @brief Generate a symmetric key.
-   * @param keyName The name of the key.
-   * @param keyType The type of the key, e.g. KEY_TYPE_AES.
-   * @param keySize The size of the key.
-   */
   virtual void 
   generateSymmetricKeyInTpm(const Name& keyName, KeyType keyType, int keySize);
 
@@ -140,6 +98,6 @@
   PrivateKeyStore privateKeyStore_; /**< The map key is the keyName.toUri() */
 };
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_SEC_TPM_MEMORY_HPP
diff --git a/src/security/sec-tpm-osx.cpp b/src/security/sec-tpm-osx.cpp
index d85636d..94d3bfe 100644
--- a/src/security/sec-tpm-osx.cpp
+++ b/src/security/sec-tpm-osx.cpp
@@ -28,8 +28,8 @@
 
 INIT_LOGGER("SecTpmOsx");
 
-namespace ndn
-{
+namespace ndn {
+
 class SecTpmOsx::Impl {
 public:
   Impl()
@@ -38,8 +38,8 @@
   /**
    * @brief Convert NDN name of a key to internal name of the key.
    *
-   * @param keyName the NDN name of the key
-   * @param keyClass the class of the key
+   * @param keyName
+   * @param keyClass
    * @return the internal key name
    */
   std::string 
@@ -47,15 +47,17 @@
   
   /**
    * @brief Get key.
-   * @param keyName the name of the key
-   * @param keyClass the class of the key
+   *
+   * @param keyName 
+   * @param keyClass
    * @returns pointer to the key
    */
   SecKeychainItemRef 
   getKey(const Name & keyName, KeyClass keyClass);
   
   /**
-   * convert keyType to MAC OS symmetric key key type
+   * @brief Convert keyType to MAC OS symmetric key key type
+   *
    * @param keyType
    * @returns MAC OS key type
    */
@@ -63,7 +65,8 @@
   getSymKeyType(KeyType keyType);
   
   /**
-   * convert keyType to MAC OS asymmetirc key type
+   * @brief Convert keyType to MAC OS asymmetirc key type
+   *
    * @param keyType
    * @returns MAC OS key type
    */
@@ -71,7 +74,8 @@
   getAsymKeyType(KeyType keyType);
   
   /**
-   * convert keyClass to MAC OS key class
+   * @brief Convert keyClass to MAC OS key class
+   *
    * @param keyClass
    * @returns MAC OS key class
    */
@@ -79,7 +83,8 @@
   getKeyClass(KeyClass keyClass);
   
   /**
-   * convert digestAlgo to MAC OS algorithm id
+   * @brief Convert digestAlgo to MAC OS algorithm id
+   *
    * @param digestAlgo
    * @returns MAC OS algorithm id
    */
@@ -87,8 +92,9 @@
   getDigestAlgorithm(DigestAlgorithm digestAlgo);
   
   /**
-   * get the digest size of the corresponding algorithm
-   * @param digestAlgo the digest algorithm
+   * @brief Get the digest size of the corresponding algorithm
+   *
+   * @param digestAlgo
    * @return digest size
    */
   long 
@@ -522,7 +528,7 @@
 }
 
 ConstBufferPtr
-SecTpmOsx::decryptInTpm(const Name & keyName, const uint8_t* data, size_t dataLength, bool sym)
+SecTpmOsx::decryptInTpm(const uint8_t* data, size_t dataLength, const Name & keyName, bool sym)
 {
   _LOG_TRACE("OSXPrivateKeyStorage::Decrypt");
 
@@ -614,55 +620,8 @@
   return true;
 }
 
-// bool
-// OSXPrivateKeyStorage::verifyData(const Name & keyName, const Blob & pData, const Blob & pSig, DigestAlgorithm digestAlgo)
-// {
-//   _LOG_TRACE("OSXPrivateKeyStorage::Verify");
-    
-//   CFDataRef dataRef = CFDataCreate(NULL,
-//                                     reinterpret_cast<const unsigned char*>(pData.buf()),
-//                                     pData.size());
-
-//   CFDataRef sigRef = CFDataCreate(NULL,
-//                                    reinterpret_cast<const unsigned char*>(pSig.buf()),
-//                                    pSig.size());
-
-//   SecKeyRef publicKey = (SecKeyRef)m_impl->getKey(keyName, KEY_CLASS_PUBLIC);
-    
-//   CFErrorRef error;
-//   SecTransformRef verifier = SecVerifyTransformCreate(publicKey, sigRef, &error);
-//   if (error) throw Error("Fail to create verifier");
-    
-//   Boolean set_res = SecTransformSetAttribute(verifier,
-//                                              kSecTransformInputAttributeName,
-//                                              dataRef,
-//                                              &error);
-//   if (error) throw Error("Fail to configure input of verifier");
-
-//   set_res = SecTransformSetAttribute(verifier,
-//                                      kSecDigestTypeAttribute,
-//                                      m_impl->getDigestAlgorithm(digestAlgo),
-//                                      &error);
-//   if (error) throw Error("Fail to configure digest algorithm of verifier");
-
-//   long digestSize = m_impl->getDigestSize(digestAlgo);
-//   set_res = SecTransformSetAttribute(verifier,
-//                                      kSecDigestLengthAttribute,
-//                                      CFNumberCreate(NULL, kCFNumberLongType, &digestSize),
-//                                      &error);
-//   if (error) throw Error("Fail to configure digest size of verifier");
-
-//   CFBooleanRef result = (CFBooleanRef) SecTransformExecute(verifier, &error);
-//   if (error) throw Error("Fail to verify data");
-
-//   if (result == kCFBooleanTrue)
-//     return true;
-//   else
-//     return false;
-// }
-
 ConstBufferPtr
-SecTpmOsx::encryptInTpm(const Name & keyName, const uint8_t* data, size_t dataLength, bool sym)
+SecTpmOsx::encryptInTpm(const uint8_t* data, size_t dataLength, const Name & keyName, bool sym)
 {
   _LOG_TRACE("OSXPrivateKeyStorage::Encrypt");
 
@@ -854,4 +813,4 @@
   }
 }
   
-}// ndn
+} // namespace ndn
diff --git a/src/security/sec-tpm-osx.hpp b/src/security/sec-tpm-osx.hpp
index 251df24..d10ce7d 100644
--- a/src/security/sec-tpm-osx.hpp
+++ b/src/security/sec-tpm-osx.hpp
@@ -5,28 +5,20 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_SEC_TPM_OSX_HPP
-#define NDN_SEC_TPM_OSX_HPP
+#ifndef NDN_SECURITY_SEC_TPM_OSX_HPP
+#define NDN_SECURITY_SEC_TPM_OSX_HPP
 
 #include "../common.hpp"
 #include "sec-tpm.hpp"
 
-namespace ndn
-{
+namespace ndn {
   
 class SecTpmOsx : public SecTpm {
 public:
   struct Error : public SecTpm::Error { Error(const std::string& what) : SecTpm::Error(what) {} };
 
-  /**
-   * constructor of OSXKeyChainTpm
-   * @param keychainName the name of keychain
-   */
   SecTpmOsx();
 
-  /**
-   * destructor of OSXKeyChainTpm
-   */    
   virtual 
   ~SecTpmOsx();
 
@@ -35,10 +27,6 @@
   virtual void 
   generateKeyPairInTpm(const Name& keyName, KeyType keyType, int keySize);
 
-  /**
-   * Delete a key pair of asymmetric keys.
-   * @param keyName The name of the key pair.
-   */
   virtual void
   deleteKeyPairInTpm(const Name& keyName);
 
@@ -47,44 +35,16 @@
   
   virtual Block
   signInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, DigestAlgorithm digestAlgorithm);
-  
-  /**
-   * Decrypt data.
-   * @param keyName The name of the decrypting key.
-   * @param data The byte to be decrypted.
-   * @param dataLength the length of data.
-   * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric decryption is used.
-   * @return The decrypted data.
-   */
+
   virtual ConstBufferPtr 
-  decryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric);
+  decryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric);
 
-  /**
-   * Encrypt data.
-   * @param keyName The name of the encrypting key.
-   * @param data The byte to be encrypted.
-   * @param dataLength the length of data.
-   * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric decryption is used.
-   * @return The encrypted data.
-   */
   virtual ConstBufferPtr
-  encryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric);
+  encryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric);
 
-  /**
-   * Generate a symmetric key.
-   * @param keyName The name of the key.
-   * @param keyType The type of the key, e.g. KEY_TYPE_AES.
-   * @param keySize The size of the key.
-   */
   virtual void 
   generateSymmetricKeyInTpm(const Name& keyName, KeyType keyType, int keySize);
 
-  /**
-   * Check if a particular key exists.
-   * @param keyName The name of the key.
-   * @param keyClass The class of the key, e.g. KEY_CLASS_PUBLIC, KEY_CLASS_PRIVATE, or KEY_CLASS_SYMMETRIC.
-   * @return True if the key exists, otherwise false.
-   */
   virtual bool
   doesKeyExistInTpm(const Name& keyName, KeyClass keyClass); 
 
@@ -97,7 +57,8 @@
   ////////////////////////////////////////////////////////////////////////////////////
   
   /**
-   * configure ACL of a particular key
+   * @brief Configure ACL of a particular key.
+   *
    * @param keyName the name of key
    * @param keyClass the class of key, e.g. Private Key
    * @param acl the new acl of the key
@@ -127,4 +88,4 @@
   
 } // namespace ndn
 
-#endif // NDN_SEC_TPM_OSX_HPP
+#endif // NDN_SECURITY_SEC_TPM_OSX_HPP
diff --git a/src/security/sec-tpm.cpp b/src/security/sec-tpm.cpp
index 13b04a8..a52d839 100644
--- a/src/security/sec-tpm.cpp
+++ b/src/security/sec-tpm.cpp
@@ -284,4 +284,4 @@
 }
 
 
-}//ndn
+} // namespace ndn
diff --git a/src/security/sec-tpm.hpp b/src/security/sec-tpm.hpp
index dcdea95..f49518d 100644
--- a/src/security/sec-tpm.hpp
+++ b/src/security/sec-tpm.hpp
@@ -6,8 +6,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_SEC_TPM_HPP
-#define NDN_SEC_TPM_HPP
+#ifndef NDN_SECURITY_SEC_TPM_HPP
+#define NDN_SECURITY_SEC_TPM_HPP
 
 #include "../common.hpp"
 #include "security-common.hpp"
@@ -17,6 +17,11 @@
 
 namespace ndn {
 
+/**
+ * @brief SecTpm is the base class of the TPM classes.
+ *
+ * It specifies the interfaces of private/secret key related operations.
+ */
 class SecTpm {
 public:
   struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} };
@@ -28,65 +33,75 @@
   ~SecTpm() {}
 
   /**
-   * Generate a pair of asymmetric keys.
+   * @brief Generate a pair of asymmetric keys.
+   *
    * @param keyName The name of the key pair.
    * @param keyType The type of the key pair, e.g. KEY_TYPE_RSA.
    * @param keySize The size of the key pair.
+   * @throws SecTpm::Error if fails.
    */
   virtual void 
   generateKeyPairInTpm(const Name& keyName, KeyType keyType, int keySize) = 0;
   
   /**
-   * Delete a key pair of asymmetric keys.
+   * @brief Delete a key pair of asymmetric keys.
+   *
    * @param keyName The name of the key pair.
    */
   virtual void
   deleteKeyPairInTpm(const Name &keyName) = 0;
 
   /**
-   * Get the public key
-   * @param keyName The name of public key.
-   * @return The public key.
+   * @brief Get a public key.
+   *
+   * @param keyName The public key name.
+   * @return The public key if exists, otherwise a NULL pointer.
    */
-  virtual ptr_lib::shared_ptr<PublicKey> 
+  virtual shared_ptr<PublicKey> 
   getPublicKeyFromTpm(const Name& keyName) = 0;
   
   /**
-   * Fetch the private key for keyName and sign the data, returning a signature block.
-   * @param data Pointer to the input byte array.
+   * @brief Sign data.
+   *
+   * @param data Pointer to the byte array to be signed.
    * @param dataLength The length of data.
    * @param keyName The name of the signing key.
    * @param digestAlgorithm the digest algorithm.
    * @return The signature block.
-   * @throws SecTpm::Error
+   * @throws SecTpm::Error if signing fails.
    */  
   virtual Block
   signInTpm(const uint8_t *data, size_t dataLength, const Name& keyName, DigestAlgorithm digestAlgorithm) = 0;
   
   /**
-   * Decrypt data.
+   * @brief Decrypt data.
+   *
+   * @param data Pointer to the byte arry to be decrypted.
+   * @param dataLength The length of data.
    * @param keyName The name of the decrypting key.
-   * @param data The byte to be decrypted.
-   * @param dataLength the length of data.
-   * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric encryption is used.
+   * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric encryption.
    * @return The decrypted data.
+   * @throws SecTpm::Error if decryption fails.
    */
   virtual ConstBufferPtr 
-  decryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric) = 0;
+  decryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric) = 0;
 
   /**
-   * Encrypt data.
+   * @brief Encrypt data.
+   *
+   * @param data Pointer to the byte arry to be decrypted.
+   * @param dataLength The length of data.
    * @param keyName The name of the encrypting key.
-   * @param data The byte to be encrypted.
-   * @param dataLength the length of data.
-   * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric encryption is used.
+   * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric encryption.
    * @return The encrypted data.
+   * @throws SecTpm::Error if encryption fails.
    */
   virtual ConstBufferPtr
-  encryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric) = 0;
+  encryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric) = 0;
 
   /**
    * @brief Generate a symmetric key.
+   *
    * @param keyName The name of the key.
    * @param keyType The type of the key, e.g. KEY_TYPE_AES.
    * @param keySize The size of the key.
@@ -95,7 +110,8 @@
   generateSymmetricKeyInTpm(const Name& keyName, KeyType keyType, int keySize) = 0;
 
   /**
-   * Check if a particular key exists.
+   * @brief Check if a particular key exists.
+   *
    * @param keyName The name of the key.
    * @param keyClass The class of the key, e.g. KEY_CLASS_PUBLIC, KEY_CLASS_PRIVATE, or KEY_CLASS_SYMMETRIC.
    * @return True if the key exists, otherwise false.
@@ -213,6 +229,6 @@
   return result;
 }
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_SEC_TPM_HPP
diff --git a/src/security/signature-sha256-with-rsa.hpp b/src/security/signature-sha256-with-rsa.hpp
index b1dd6e1..c9db4a3 100644
--- a/src/security/signature-sha256-with-rsa.hpp
+++ b/src/security/signature-sha256-with-rsa.hpp
@@ -5,8 +5,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_SIGNATURE_SHA256_WITH_RSA_HPP
-#define NDN_SIGNATURE_SHA256_WITH_RSA_HPP
+#ifndef NDN_SECURITY_SIGNATURE_SHA256_WITH_RSA_HPP
+#define NDN_SECURITY_SIGNATURE_SHA256_WITH_RSA_HPP
 
 #include "../data.hpp"
 #include "../encoding/tlv.hpp"
@@ -62,4 +62,4 @@
 
 } // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_SIGNATURE_SHA256_WITH_RSA_HPP
diff --git a/src/security/validator-null.hpp b/src/security/validator-null.hpp
index d1d8faa..eb186c6 100644
--- a/src/security/validator-null.hpp
+++ b/src/security/validator-null.hpp
@@ -6,8 +6,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_VALIDATOR_NULL_HPP
-#define NDN_VALIDATOR_NULL_HPP
+#ifndef NDN_SECURITY_VALIDATOR_NULL_HPP
+#define NDN_SECURITY_VALIDATOR_NULL_HPP
 
 #include "validator.hpp"
 
@@ -37,6 +37,6 @@
   { onValidated(interest.shared_from_this()); }
 };
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_VALIDATOR_NULL_HPP
diff --git a/src/security/validator-regex.cpp b/src/security/validator-regex.cpp
index b85bad2..6569b58 100644
--- a/src/security/validator-regex.cpp
+++ b/src/security/validator-regex.cpp
@@ -17,8 +17,7 @@
 
 using namespace std;
 
-namespace ndn
-{
+namespace ndn {
 
 const shared_ptr<CertificateCache> ValidatorRegex::DefaultCertificateCache = shared_ptr<CertificateCache>();
 
@@ -62,7 +61,7 @@
     }
   else
     {
-      _LOG_DEBUG("Wrong Invalidity:");
+      _LOG_DEBUG("Wrong validity:");
       onValidationFailed(data);
       return;
     }
@@ -150,4 +149,4 @@
   return;
 }
 
-}//ndn
+} // namespace ndn
diff --git a/src/security/validator-regex.hpp b/src/security/validator-regex.hpp
index d6b9b1d..f57d128 100644
--- a/src/security/validator-regex.hpp
+++ b/src/security/validator-regex.hpp
@@ -5,8 +5,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_VALIDATOR_REGEX_HPP
-#define NDN_VALIDATOR_REGEX_HPP
+#ifndef NDN_SECURITY_VALIDATOR_REGEX_HPP
+#define NDN_SECURITY_VALIDATOR_REGEX_HPP
 
 #include "validator.hpp"
 #include "identity-certificate.hpp"
@@ -92,6 +92,6 @@
 ValidatorRegex::addTrustAnchor(shared_ptr<IdentityCertificate> certificate)
 { m_trustAnchors[certificate->getName().getPrefix(-1)] = certificate; }
 
-}//ndn
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_VALIDATOR_REGEX_HPP
diff --git a/src/security/validator.cpp b/src/security/validator.cpp
index 6eec2d0..d0c808b 100644
--- a/src/security/validator.cpp
+++ b/src/security/validator.cpp
@@ -256,4 +256,4 @@
   return result;
 }
 
-}
+} // namespace ndn
diff --git a/src/security/validator.hpp b/src/security/validator.hpp
index 5a1062d..7a75f70 100644
--- a/src/security/validator.hpp
+++ b/src/security/validator.hpp
@@ -6,8 +6,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_VALIDATOR_HPP
-#define NDN_VALIDATOR_HPP
+#ifndef NDN_SECURITY_VALIDATOR_HPP
+#define NDN_SECURITY_VALIDATOR_HPP
 
 #include "../common.hpp"
 
@@ -152,6 +152,6 @@
   shared_ptr<Face> m_face;
 };
 
-}
+} // namespace ndn
 
-#endif
+#endif //NDN_SECURITY_VALIDATOR_HPP
