diff --git a/src/security/conf/checker.hpp b/src/security/conf/checker.hpp
index 9284191..040d343 100644
--- a/src/security/conf/checker.hpp
+++ b/src/security/conf/checker.hpp
@@ -99,15 +99,15 @@
   {
     switch (sigType)
       {
-      case Tlv::SignatureSha256WithRsa:
-      case Tlv::SignatureSha256WithEcdsa:
+      case tlv::SignatureSha256WithRsa:
+      case tlv::SignatureSha256WithEcdsa:
         {
           if (!static_cast<bool>(m_keyLocatorChecker))
             throw Error("Strong signature requires KeyLocatorChecker");
 
           return;
         }
-      case Tlv::DigestSha256:
+      case tlv::DigestSha256:
         return;
       default:
         throw Error("Unsupported signature type");
@@ -139,7 +139,7 @@
         onValidationFailed(interest.shared_from_this(), "Invalid signature");
         return -1;
       }
-    catch (Tlv::Error& e)
+    catch (tlv::Error& e)
       {
         onValidationFailed(interest.shared_from_this(), "Cannot decode signature related TLVs");
         return -1;
@@ -163,15 +163,15 @@
         return -1;
       }
 
-    if (signature.getType() == Tlv::DigestSha256)
+    if (signature.getType() == tlv::DigestSha256)
       return 0;
 
     try
       {
         switch (signature.getType())
           {
-          case Tlv::SignatureSha256WithRsa:
-          case Tlv::SignatureSha256WithEcdsa:
+          case tlv::SignatureSha256WithRsa:
+          case tlv::SignatureSha256WithEcdsa:
             {
               if (!signature.hasKeyLocator()) {
                 onValidationFailed(packet.shared_from_this(),
@@ -188,7 +188,7 @@
             }
           }
       }
-    catch (Tlv::Error& e)
+    catch (tlv::Error& e)
       {
         onValidationFailed(packet.shared_from_this(),
                            "Cannot decode signature");
@@ -241,8 +241,8 @@
          it != signers.end(); it++)
       m_signers[(*it)->getName().getPrefix(-1)] = (*it);
 
-    if (sigType != Tlv::SignatureSha256WithRsa &&
-        sigType != Tlv::SignatureSha256WithEcdsa)
+    if (sigType != tlv::SignatureSha256WithRsa &&
+        sigType != tlv::SignatureSha256WithEcdsa)
       {
         throw Error("FixedSigner is only meaningful for strong signature type");
       }
@@ -274,7 +274,7 @@
         onValidationFailed(interest.shared_from_this(), "Invalid signature");
         return -1;
       }
-    catch (Tlv::Error& e)
+    catch (tlv::Error& e)
       {
         onValidationFailed(interest.shared_from_this(), "Cannot decode signature related TLVs");
         return -1;
@@ -298,7 +298,7 @@
         return -1;
       }
 
-    if (signature.getType() == Tlv::DigestSha256)
+    if (signature.getType() == tlv::DigestSha256)
       {
         onValidationFailed(packet.shared_from_this(),
                            "FixedSigner does not allow Sha256 signature type");
@@ -309,8 +309,8 @@
       {
         switch (signature.getType())
           {
-          case Tlv::SignatureSha256WithRsa:
-          case Tlv::SignatureSha256WithEcdsa:
+          case tlv::SignatureSha256WithRsa:
+          case tlv::SignatureSha256WithEcdsa:
             {
               if (!signature.hasKeyLocator()) {
                 onValidationFailed(packet.shared_from_this(),
@@ -356,7 +356,7 @@
                            "KeyLocator does not have name");
         return -1;
       }
-    catch (Tlv::Error& e)
+    catch (tlv::Error& e)
       {
         onValidationFailed(packet.shared_from_this(),
                            "Cannot decode signature");
@@ -546,11 +546,11 @@
   getSigType(const std::string& sigType)
   {
     if (boost::iequals(sigType, "rsa-sha256"))
-      return Tlv::SignatureSha256WithRsa;
+      return tlv::SignatureSha256WithRsa;
     else if (boost::iequals(sigType, "ecdsa-sha256"))
-      return Tlv::SignatureSha256WithEcdsa;
+      return tlv::SignatureSha256WithEcdsa;
     else if (boost::iequals(sigType, "sha256"))
-      return Tlv::DigestSha256;
+      return tlv::DigestSha256;
     else
       throw Error("Unsupported signature type");
   }
diff --git a/src/security/digest-sha256.cpp b/src/security/digest-sha256.cpp
index 6d450a2..3af551a 100644
--- a/src/security/digest-sha256.cpp
+++ b/src/security/digest-sha256.cpp
@@ -24,14 +24,14 @@
 namespace ndn {
 
 DigestSha256::DigestSha256()
-  : Signature(SignatureInfo(Tlv::DigestSha256))
+  : Signature(SignatureInfo(tlv::DigestSha256))
 {
 }
 
 DigestSha256::DigestSha256(const Signature& signature)
   : Signature(signature)
 {
-  if (getType() != Tlv::DigestSha256)
+  if (getType() != tlv::DigestSha256)
     throw Error("Incorrect signature type");
 }
 
diff --git a/src/security/key-chain.cpp b/src/security/key-chain.cpp
index 180d37d..1809079 100644
--- a/src/security/key-chain.cpp
+++ b/src/security/key-chain.cpp
@@ -550,7 +550,7 @@
   DigestSha256 sig;
   data.setSignature(sig);
 
-  Block sigValue(Tlv::SignatureValue,
+  Block sigValue(tlv::SignatureValue,
                  crypto::sha256(data.wireEncode().value(),
                                 data.wireEncode().value_size() -
                                 data.getSignature().getValue().size()));
diff --git a/src/security/sec-public-info-sqlite3.cpp b/src/security/sec-public-info-sqlite3.cpp
index 774dfb3..0c70d02 100644
--- a/src/security/sec-public-info-sqlite3.cpp
+++ b/src/security/sec-public-info-sqlite3.cpp
@@ -485,7 +485,7 @@
       std::string signerName = certificate.getSignature().getKeyLocator().getName().toUri();
       sqlite3_bind_text(statement, 2, signerName, SQLITE_TRANSIENT);
     }
-  catch (Tlv::Error& e)
+  catch (tlv::Error& e)
     {
       return;
     }
diff --git a/src/security/sec-rule-relative.cpp b/src/security/sec-rule-relative.cpp
index 42272bc..958eb66 100644
--- a/src/security/sec-rule-relative.cpp
+++ b/src/security/sec-rule-relative.cpp
@@ -69,7 +69,7 @@
       const Name& signerName = keyLocator.getName();
       return satisfy(dataName, signerName);
     }
-  catch (Tlv::Error& e)
+  catch (tlv::Error& e)
     {
       return false;
     }
@@ -120,7 +120,7 @@
       const Name& signerName = keyLocator.getName();
       return m_signerNameRegex.match(signerName);
     }
-  catch (Tlv::Error& e)
+  catch (tlv::Error& e)
     {
       return false;
     }
diff --git a/src/security/sec-rule-specific.cpp b/src/security/sec-rule-specific.cpp
index af89e91..cb7adf4 100644
--- a/src/security/sec-rule-specific.cpp
+++ b/src/security/sec-rule-specific.cpp
@@ -76,7 +76,7 @@
       const Name& signerName = keyLocator.getName();
       return m_signerRegex->match(signerName);
     }
-  catch (Tlv::Error& e)
+  catch (tlv::Error& e)
     {
       return false;
     }
diff --git a/src/security/sec-tpm-file.cpp b/src/security/sec-tpm-file.cpp
index 03ce634..7d0748d 100644
--- a/src/security/sec-tpm-file.cpp
+++ b/src/security/sec-tpm-file.cpp
@@ -332,7 +332,7 @@
                                  true,
                                  new SignerFilter(rng, signer, new FileSink(os)));
 
-                    return Block(Tlv::SignatureValue, os.buf());
+                    return Block(tlv::SignatureValue, os.buf());
                   }
                 default:
                   throw Error("Unsupported digest algorithm!");
@@ -368,7 +368,7 @@
 
                   shared_ptr<Buffer> sigBuffer = make_shared<Buffer>(buf, bufSize);
 
-                  return Block(Tlv::SignatureValue, sigBuffer);
+                  return Block(tlv::SignatureValue, sigBuffer);
                 }
               default:
                 throw Error("Unsupported digest algorithm!");
diff --git a/src/security/sec-tpm-osx.cpp b/src/security/sec-tpm-osx.cpp
index 3064d84..9f722fd 100644
--- a/src/security/sec-tpm-osx.cpp
+++ b/src/security/sec-tpm-osx.cpp
@@ -868,7 +868,7 @@
   if (signature.get() == 0)
     throw Error("Signature is NULL!\n");
 
-  return Block(Tlv::SignatureValue,
+  return Block(tlv::SignatureValue,
                make_shared<Buffer>(CFDataGetBytePtr(signature.get()),
                                    CFDataGetLength(signature.get())));
 }
diff --git a/src/security/signature-sha256-with-ecdsa.cpp b/src/security/signature-sha256-with-ecdsa.cpp
index 91b4a29..642912b 100644
--- a/src/security/signature-sha256-with-ecdsa.cpp
+++ b/src/security/signature-sha256-with-ecdsa.cpp
@@ -24,14 +24,14 @@
 namespace ndn {
 
 SignatureSha256WithEcdsa::SignatureSha256WithEcdsa(const KeyLocator& keyLocator)
-  : Signature(SignatureInfo(Tlv::SignatureSha256WithEcdsa, keyLocator))
+  : Signature(SignatureInfo(tlv::SignatureSha256WithEcdsa, keyLocator))
 {
 }
 
 SignatureSha256WithEcdsa::SignatureSha256WithEcdsa(const Signature& signature)
   : Signature(signature)
 {
-  if (getType() != Tlv::SignatureSha256WithEcdsa)
+  if (getType() != tlv::SignatureSha256WithEcdsa)
     throw Error("Incorrect signature type");
 
   if (!hasKeyLocator()) {
diff --git a/src/security/signature-sha256-with-rsa.cpp b/src/security/signature-sha256-with-rsa.cpp
index 3c84b54..cda06e6 100644
--- a/src/security/signature-sha256-with-rsa.cpp
+++ b/src/security/signature-sha256-with-rsa.cpp
@@ -24,14 +24,14 @@
 namespace ndn {
 
 SignatureSha256WithRsa::SignatureSha256WithRsa(const KeyLocator& keyLocator)
-  : Signature(SignatureInfo(Tlv::SignatureSha256WithRsa, keyLocator))
+  : Signature(SignatureInfo(tlv::SignatureSha256WithRsa, keyLocator))
 {
 }
 
 SignatureSha256WithRsa::SignatureSha256WithRsa(const Signature& signature)
   : Signature(signature)
 {
-  if (getType() != Tlv::SignatureSha256WithRsa)
+  if (getType() != tlv::SignatureSha256WithRsa)
     throw Error("Incorrect signature type");
 
   if (!hasKeyLocator()) {
diff --git a/src/security/validator-config.cpp b/src/security/validator-config.cpp
index 387cfe0..83b7a62 100644
--- a/src/security/validator-config.cpp
+++ b/src/security/validator-config.cpp
@@ -537,7 +537,7 @@
       return onValidationFailed(interest.shared_from_this(),
                                 "No valid signature");
     }
-  catch (Tlv::Error& e)
+  catch (tlv::Error& e)
     {
       return onValidationFailed(interest.shared_from_this(),
                                 "Cannot decode signature");
@@ -569,7 +569,7 @@
         time::fromUnixTimestamp(
           time::milliseconds(interestName.get(-signed_interest::MIN_LENGTH).toNumber()));
     }
-  catch (Tlv::Error& e)
+  catch (tlv::Error& e)
     {
       return onValidationFailed(interest,
                                 "Cannot decode signature related TLVs");
diff --git a/src/security/validator-config.hpp b/src/security/validator-config.hpp
index d3e4be4..69f626d 100644
--- a/src/security/validator-config.hpp
+++ b/src/security/validator-config.hpp
@@ -293,7 +293,7 @@
                                 const OnFailed& onValidationFailed,
                                 std::vector<shared_ptr<ValidationRequest> >& nextSteps)
 {
-  if (signature.getType() == Tlv::DigestSha256)
+  if (signature.getType() == tlv::DigestSha256)
     {
       DigestSha256 sigSha256(signature);
 
@@ -306,8 +306,8 @@
 
   try {
     switch (signature.getType()) {
-    case Tlv::SignatureSha256WithRsa:
-    case Tlv::SignatureSha256WithEcdsa:
+    case tlv::SignatureSha256WithRsa:
+    case tlv::SignatureSha256WithEcdsa:
       {
         if (!signature.hasKeyLocator()) {
           return onValidationFailed(packet.shared_from_this(),
@@ -320,7 +320,7 @@
                               "Unsupported signature type");
     }
   }
-  catch (Tlv::Error& e) {
+  catch (tlv::Error& e) {
     return onValidationFailed(packet.shared_from_this(),
                               "Cannot decode public key signature");
   }
diff --git a/src/security/validator-regex.cpp b/src/security/validator-regex.cpp
index 97f796c..194aaf1 100644
--- a/src/security/validator-regex.cpp
+++ b/src/security/validator-regex.cpp
@@ -161,7 +161,7 @@
                   return;
                 }
             }
-          catch (Tlv::Error& e)
+          catch (tlv::Error& e)
             {
               return onValidationFailed(data.shared_from_this(),
                                         "Cannot decode signature");
diff --git a/src/security/validator.cpp b/src/security/validator.cpp
index 2bc9364..de8c311 100644
--- a/src/security/validator.cpp
+++ b/src/security/validator.cpp
@@ -170,7 +170,7 @@
 
       switch (sig.getType())
         {
-        case Tlv::SignatureSha256WithRsa:
+        case tlv::SignatureSha256WithRsa:
           {
             if (key.getKeyType() != KEY_TYPE_RSA)
               return false;
@@ -185,7 +185,7 @@
             return verifier.VerifyMessage(buf, size,
                                           sig.getValue().value(), sig.getValue().value_size());
           }
-        case Tlv::SignatureSha256WithEcdsa:
+        case tlv::SignatureSha256WithEcdsa:
           {
             if (key.getKeyType() != KEY_TYPE_ECDSA)
               return false;
