diff --git a/tests/unit/security/digest-sha256.t.cpp b/tests/unit/security/digest-sha256.t.cpp
deleted file mode 100644
index 83d2ca7..0000000
--- a/tests/unit/security/digest-sha256.t.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2020 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx 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.
- *
- * ndn-cxx 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 ndn-cxx authors and contributors.
- */
-
-#include "ndn-cxx/security/digest-sha256.hpp"
-#include "ndn-cxx/security/verification-helpers.hpp"
-#include "ndn-cxx/util/sha256.hpp"
-#include "ndn-cxx/util/string-helper.hpp"
-
-#include "tests/boost-test.hpp"
-#include "tests/key-chain-fixture.hpp"
-
-namespace ndn {
-namespace security {
-namespace tests {
-
-BOOST_AUTO_TEST_SUITE(Security)
-BOOST_FIXTURE_TEST_SUITE(TestDigestSha256, ndn::tests::KeyChainFixture)
-
-BOOST_AUTO_TEST_CASE(Sha256)
-{
-  char content[6] = "1234\n";
-  ConstBufferPtr buf = util::Sha256::computeDigest(reinterpret_cast<uint8_t*>(content), 5);
-
-  BOOST_CHECK_EQUAL(toHex(buf->data(), buf->size(), false),
-                    "a883dafc480d466ee04e0d6da986bd78eb1fdd2178d04693723da3a8f95d42f4");
-}
-
-BOOST_AUTO_TEST_CASE(DataSignature)
-{
-  Name name("/TestSignatureSha/Basic");
-  Data testData(name);
-  char content[5] = "1234";
-  testData.setContent(reinterpret_cast<uint8_t*>(content), 5);
-  m_keyChain.sign(testData, security::SigningInfo(security::SigningInfo::SIGNER_TYPE_SHA256));
-
-  BOOST_CHECK_THROW(testData.getSignatureInfo().getKeyLocator(), ndn::SignatureInfo::Error);
-  verifyDigest(testData, DigestAlgorithm::SHA256);
-}
-
-BOOST_AUTO_TEST_CASE(InterestSignature)
-{
-  Name name("/SecurityTestDigestSha256/InterestSignature/Interest1");
-  Interest testInterest(name);
-  testInterest.setCanBePrefix(false);
-
-  m_keyChain.sign(testInterest, security::SigningInfo(security::SigningInfo::SIGNER_TYPE_SHA256));
-  verifyDigest(testInterest, DigestAlgorithm::SHA256);
-}
-
-BOOST_AUTO_TEST_SUITE_END() // TestDigestSha256
-BOOST_AUTO_TEST_SUITE_END() // Security
-
-} // namespace tests
-} // namespace security
-} // namespace ndn
diff --git a/tests/unit/security/signature-sha256-with-ecdsa.t.cpp b/tests/unit/security/signature-sha256-with-ecdsa.t.cpp
deleted file mode 100644
index de5edb9..0000000
--- a/tests/unit/security/signature-sha256-with-ecdsa.t.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2020 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx 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.
- *
- * ndn-cxx 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 ndn-cxx authors and contributors.
- */
-
-#include "ndn-cxx/security/signature-sha256-with-ecdsa.hpp"
-#include "ndn-cxx/security/verification-helpers.hpp"
-#include "ndn-cxx/util/scheduler.hpp"
-
-#include "tests/test-common.hpp"
-#include "tests/unit/io-key-chain-fixture.hpp"
-
-namespace ndn {
-namespace security {
-namespace tests {
-
-using namespace ndn::tests;
-
-class SignatureSha256EcdsaTimeFixture : public IoKeyChainFixture
-{
-public:
-  SignatureSha256EcdsaTimeFixture()
-    : scheduler(m_io)
-  {
-  }
-
-public:
-  Scheduler scheduler;
-};
-
-BOOST_AUTO_TEST_SUITE(Security)
-BOOST_FIXTURE_TEST_SUITE(TestSignatureSha256WithEcdsa, SignatureSha256EcdsaTimeFixture)
-
-const uint8_t sigInfo[] = {
-  0x16, 0x1b, // SignatureInfo
-    0x1b, 0x01, // SignatureType
-      0x03,
-    0x1c, 0x16, // KeyLocator
-      0x07, 0x14, // Name: /test/key/locator
-        0x08, 0x04,
-          0x74, 0x65, 0x73, 0x74,
-        0x08, 0x03,
-          0x6b, 0x65, 0x79,
-        0x08, 0x07,
-          0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72
-};
-
-const uint8_t sigValue[] = {
-  0x17, 0x40, // SignatureValue
-    0x2f, 0xd6, 0xf1, 0x6e, 0x80, 0x6f, 0x10, 0xbe, 0xb1, 0x6f, 0x3e, 0x31, 0xec,
-    0xe3, 0xb9, 0xea, 0x83, 0x30, 0x40, 0x03, 0xfc, 0xa0, 0x13, 0xd9, 0xb3, 0xc6,
-    0x25, 0x16, 0x2d, 0xa6, 0x58, 0x41, 0x69, 0x62, 0x56, 0xd8, 0xb3, 0x6a, 0x38,
-    0x76, 0x56, 0xea, 0x61, 0xb2, 0x32, 0x70, 0x1c, 0xb6, 0x4d, 0x10, 0x1d, 0xdc,
-    0x92, 0x8e, 0x52, 0xa5, 0x8a, 0x1d, 0xd9, 0x96, 0x5e, 0xc0, 0x62, 0x0b
-};
-
-
-BOOST_AUTO_TEST_CASE(Decoding)
-{
-  Block sigInfoBlock(sigInfo, sizeof(sigInfo));
-  Block sigValueBlock(sigValue, sizeof(sigValue));
-
-  Signature sig(sigInfoBlock, sigValueBlock);
-  BOOST_CHECK_NO_THROW(SignatureSha256WithEcdsa{sig});
-  BOOST_CHECK_NO_THROW(sig.getKeyLocator());
-}
-
-BOOST_AUTO_TEST_CASE(Encoding)
-{
-  Name name("/test/key/locator");
-  KeyLocator keyLocator(name);
-
-  SignatureSha256WithEcdsa sig(keyLocator);
-
-  BOOST_CHECK_NO_THROW(sig.getKeyLocator());
-
-  const Block& encodeSigInfoBlock = sig.getInfo();
-
-  Block sigInfoBlock(sigInfo, sizeof(sigInfo));
-
-  BOOST_CHECK_EQUAL_COLLECTIONS(sigInfoBlock.wire(),
-                                sigInfoBlock.wire() + sigInfoBlock.size(),
-                                encodeSigInfoBlock.wire(),
-                                encodeSigInfoBlock.wire() + encodeSigInfoBlock.size());
-
-  sig.setKeyLocator(Name("/test/another/key/locator"));
-
-  const Block& encodeSigInfoBlock2 = sig.getInfo();
-  BOOST_CHECK_NE(sigInfoBlock, encodeSigInfoBlock2);
-}
-
-BOOST_AUTO_TEST_CASE(DataSignature)
-{
-  Identity identity = m_keyChain.createIdentity("/SecurityTestSignatureSha256WithEcdsa/DataSignature", EcKeyParams());
-
-  Data testData("/SecurityTestSignatureSha256WithEcdsa/DataSignature/Data1");
-  char content[5] = "1234";
-  testData.setContent(reinterpret_cast<uint8_t*>(content), 5);
-  BOOST_CHECK_NO_THROW(m_keyChain.sign(testData, security::SigningInfo(identity)));
-  Block dataBlock(testData.wireEncode().wire(), testData.wireEncode().size());
-
-  Data testData2;
-  testData2.wireDecode(dataBlock);
-  BOOST_CHECK(verifySignature(testData2, identity.getDefaultKey()));
-}
-
-BOOST_AUTO_TEST_CASE(InterestSignature)
-{
-  Identity identity = m_keyChain.createIdentity("/SecurityTestSignatureSha256WithEcdsa/InterestSignature", EcKeyParams());
-
-  auto interest = makeInterest("/SecurityTestSignatureSha256WithEcdsa/InterestSignature/Interest1");
-  auto interest11 = makeInterest("/SecurityTestSignatureSha256WithEcdsa/InterestSignature/Interest1");
-
-  scheduler.schedule(100_ms, [&] { m_keyChain.sign(*interest, security::SigningInfo(identity)); });
-  advanceClocks(100_ms);
-  scheduler.schedule(100_ms, [&] { m_keyChain.sign(*interest11, security::SigningInfo(identity)); });
-  advanceClocks(100_ms);
-
-  Block interestBlock(interest->wireEncode().wire(), interest->wireEncode().size());
-
-  Interest interest2;
-  interest2.wireDecode(interestBlock);
-  BOOST_CHECK(verifySignature(interest2, identity.getDefaultKey()));
-}
-
-BOOST_AUTO_TEST_SUITE_END() // TestSignatureSha256WithEcdsa
-BOOST_AUTO_TEST_SUITE_END() // Security
-
-} // namespace tests
-} // namespace security
-} // namespace ndn
diff --git a/tests/unit/security/signature-sha256-with-rsa.t.cpp b/tests/unit/security/signature-sha256-with-rsa.t.cpp
deleted file mode 100644
index d52d923..0000000
--- a/tests/unit/security/signature-sha256-with-rsa.t.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2020 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx 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.
- *
- * ndn-cxx 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 ndn-cxx authors and contributors.
- */
-
-#include "ndn-cxx/security/signature-sha256-with-rsa.hpp"
-#include "ndn-cxx/security/verification-helpers.hpp"
-#include "ndn-cxx/util/scheduler.hpp"
-
-#include "tests/test-common.hpp"
-#include "tests/unit/io-key-chain-fixture.hpp"
-
-namespace ndn {
-namespace security {
-namespace tests {
-
-using namespace ndn::tests;
-
-class SignatureSha256RsaTimeFixture : public IoKeyChainFixture
-{
-public:
-  SignatureSha256RsaTimeFixture()
-    : scheduler(m_io)
-  {
-  }
-
-public:
-  Scheduler scheduler;
-};
-
-BOOST_AUTO_TEST_SUITE(Security)
-BOOST_FIXTURE_TEST_SUITE(TestSignatureSha256WithRsa, SignatureSha256RsaTimeFixture)
-
-const uint8_t sigInfo[] = {
-  0x16, 0x1b, // SignatureInfo
-    0x1b, 0x01, // SignatureType
-      0x01,
-    0x1c, 0x16, // KeyLocator
-      0x07, 0x14, // Name
-        0x08, 0x04,
-          0x74, 0x65, 0x73, 0x74,
-        0x08, 0x03,
-          0x6b, 0x65, 0x79,
-        0x08, 0x07,
-          0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72
-};
-
-const uint8_t sigValue[] = {
-0x17, 0x80, // SignatureValue
-  0x2f, 0xd6, 0xf1, 0x6e, 0x80, 0x6f, 0x10, 0xbe, 0xb1, 0x6f, 0x3e, 0x31, 0xec,
-  0xe3, 0xb9, 0xea, 0x83, 0x30, 0x40, 0x03, 0xfc, 0xa0, 0x13, 0xd9, 0xb3, 0xc6,
-  0x25, 0x16, 0x2d, 0xa6, 0x58, 0x41, 0x69, 0x62, 0x56, 0xd8, 0xb3, 0x6a, 0x38,
-  0x76, 0x56, 0xea, 0x61, 0xb2, 0x32, 0x70, 0x1c, 0xb6, 0x4d, 0x10, 0x1d, 0xdc,
-  0x92, 0x8e, 0x52, 0xa5, 0x8a, 0x1d, 0xd9, 0x96, 0x5e, 0xc0, 0x62, 0x0b, 0xcf,
-  0x3a, 0x9d, 0x7f, 0xca, 0xbe, 0xa1, 0x41, 0x71, 0x85, 0x7a, 0x8b, 0x5d, 0xa9,
-  0x64, 0xd6, 0x66, 0xb4, 0xe9, 0x8d, 0x0c, 0x28, 0x43, 0xee, 0xa6, 0x64, 0xe8,
-  0x55, 0xf6, 0x1c, 0x19, 0x0b, 0xef, 0x99, 0x25, 0x1e, 0xdc, 0x78, 0xb3, 0xa7,
-  0xaa, 0x0d, 0x14, 0x58, 0x30, 0xe5, 0x37, 0x6a, 0x6d, 0xdb, 0x56, 0xac, 0xa3,
-  0xfc, 0x90, 0x7a, 0xb8, 0x66, 0x9c, 0x0e, 0xf6, 0xb7, 0x64, 0xd1
-};
-
-
-BOOST_AUTO_TEST_CASE(Decoding)
-{
-  Block sigInfoBlock(sigInfo, sizeof(sigInfo));
-  Block sigValueBlock(sigValue, sizeof(sigValue));
-
-  Signature sig(sigInfoBlock, sigValueBlock);
-  BOOST_CHECK_NO_THROW(SignatureSha256WithRsa{sig});
-  BOOST_CHECK_NO_THROW(sig.getKeyLocator());
-}
-
-BOOST_AUTO_TEST_CASE(Encoding)
-{
-  Name name("/test/key/locator");
-  KeyLocator keyLocator(name);
-
-  SignatureSha256WithRsa sig(keyLocator);
-
-  BOOST_CHECK_NO_THROW(sig.getKeyLocator());
-
-  const Block& encodeSigInfoBlock = sig.getInfo();
-
-  Block sigInfoBlock(sigInfo, sizeof(sigInfo));
-
-  BOOST_CHECK_EQUAL_COLLECTIONS(sigInfoBlock.wire(),
-                                sigInfoBlock.wire() + sigInfoBlock.size(),
-                                encodeSigInfoBlock.wire(),
-                                encodeSigInfoBlock.wire() + encodeSigInfoBlock.size());
-
-  sig.setKeyLocator(Name("/test/another/key/locator"));
-
-  const Block& encodeSigInfoBlock2 = sig.getInfo();
-  BOOST_CHECK_NE(sigInfoBlock, encodeSigInfoBlock2);
-}
-
-BOOST_AUTO_TEST_CASE(DataSignature)
-{
-  Identity identity = m_keyChain.createIdentity("/SecurityTestSignatureSha256WithRsa/DataSignature", RsaKeyParams());
-
-  Data testData("/SecurityTestSignatureSha256WithRsa/DataSignature/Data1");
-  char content[5] = "1234";
-  testData.setContent(reinterpret_cast<uint8_t*>(content), 5);
-  BOOST_CHECK_NO_THROW(m_keyChain.sign(testData, security::SigningInfo(identity)));
-  Block dataBlock(testData.wireEncode().wire(), testData.wireEncode().size());
-
-  Data testData2;
-  testData2.wireDecode(dataBlock);
-  BOOST_CHECK(verifySignature(testData2, identity.getDefaultKey()));
-}
-
-BOOST_AUTO_TEST_CASE(InterestSignature)
-{
-  Identity identity = m_keyChain.createIdentity("/SecurityTestSignatureSha256WithRsa/InterestSignature", RsaKeyParams());
-
-  auto interest = makeInterest("/SecurityTestSignatureSha256WithRsa/InterestSignature/Interest1");
-  auto interest11 = makeInterest("/SecurityTestSignatureSha256WithRsa/InterestSignature/Interest1");
-
-  scheduler.schedule(100_ms, [&] { m_keyChain.sign(*interest, security::SigningInfo(identity)); });
-  advanceClocks(100_ms);
-  scheduler.schedule(100_ms, [&] { m_keyChain.sign(*interest11, security::SigningInfo(identity)); });
-  advanceClocks(100_ms);
-
-  Block interestBlock(interest->wireEncode().wire(), interest->wireEncode().size());
-
-  Interest interest2;
-  interest2.wireDecode(interestBlock);
-  BOOST_CHECK(verifySignature(interest2, identity.getDefaultKey()));
-}
-
-BOOST_AUTO_TEST_SUITE_END() // TestSignatureSha256WithRsa
-BOOST_AUTO_TEST_SUITE_END() // Security
-
-} // namespace tests
-} // namespace security
-} // namespace ndn
diff --git a/tests/unit/signature-info.t.cpp b/tests/unit/signature-info.t.cpp
index ee8c826..eb08285 100644
--- a/tests/unit/signature-info.t.cpp
+++ b/tests/unit/signature-info.t.cpp
@@ -30,40 +30,6 @@
 
 BOOST_AUTO_TEST_SUITE(TestSignatureInfo)
 
-const uint8_t sigInfoDataRsa[] = {
-  0x16, 0x1b, // SignatureInfo
-    0x1b, 0x01, // SignatureType
-      0x01, // Sha256WithRsa
-    0x1c, 0x16, // KeyLocator
-      0x07, 0x14, // Name
-        0x08, 0x04,
-          0x74, 0x65, 0x73, 0x74,
-        0x08, 0x03,
-          0x6b, 0x65, 0x79,
-        0x08, 0x07,
-          0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72
-};
-
-const uint8_t sigInfoInterestRsa[] = {
-  0x2c, 0x33, // InterestSignatureInfo
-    0x1b, 0x01, // SignatureType
-      0x01, // Sha256WithRsa
-    0x1c, 0x16, // KeyLocator
-      0x07, 0x14, // Name
-        0x08, 0x04,
-          0x74, 0x65, 0x73, 0x74,
-        0x08, 0x03,
-          0x6b, 0x65, 0x79,
-        0x08, 0x07,
-          0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
-    0x26, 0x08, // SignatureNonce
-      0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-    0x28, 0x08, // SignatureTime
-      0x00, 0x00, 0x01, 0x72, 0x3d, 0x77, 0x00, 0x00,
-    0x2a, 0x02, // SignatureSeqNum
-      0x10, 0x20,
-};
-
 BOOST_AUTO_TEST_CASE(Constructor)
 {
   SignatureInfo info;
@@ -215,50 +181,119 @@
   BOOST_CHECK(!info.getSeqNum());
 }
 
+const uint8_t sigInfoDataRsa[] = {
+  0x16, 0x1b, // SignatureInfo
+    0x1b, 0x01, // SignatureType
+      0x01, // Sha256WithRsa
+    0x1c, 0x16, // KeyLocator
+      0x07, 0x14, // Name
+        0x08, 0x04,
+          0x74, 0x65, 0x73, 0x74,
+        0x08, 0x03,
+          0x6b, 0x65, 0x79,
+        0x08, 0x07,
+          0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
+};
+
+const uint8_t sigInfoInterestRsa[] = {
+  0x2c, 0x33, // InterestSignatureInfo
+    0x1b, 0x01, // SignatureType
+      0x01, // Sha256WithRsa
+    0x1c, 0x16, // KeyLocator
+      0x07, 0x14, // Name
+        0x08, 0x04,
+          0x74, 0x65, 0x73, 0x74,
+        0x08, 0x03,
+          0x6b, 0x65, 0x79,
+        0x08, 0x07,
+          0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
+    0x26, 0x08, // SignatureNonce
+      0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+    0x28, 0x08, // SignatureTime
+      0x00, 0x00, 0x01, 0x72, 0x3d, 0x77, 0x00, 0x00,
+    0x2a, 0x02, // SignatureSeqNum
+      0x10, 0x20,
+};
+
+const uint8_t sigInfoDataEcdsa[] = {
+  0x16, 0x1b, // SignatureInfo
+    0x1b, 0x01, // SignatureType
+      0x03, // Sha256WithEcdsa
+    0x1c, 0x16, // KeyLocator
+      0x07, 0x14, // Name
+        0x08, 0x04,
+          0x74, 0x65, 0x73, 0x74,
+        0x08, 0x03,
+          0x6b, 0x65, 0x79,
+        0x08, 0x07,
+          0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
+};
+
 BOOST_AUTO_TEST_CASE(EncodeDecode)
 {
-  KeyLocator keyLocator("/test/key/locator");
+  const KeyLocator keyLocator("/test/key/locator");
+
+  // RSA
   SignatureInfo info(tlv::SignatureSha256WithRsa, keyLocator);
 
-  // Encode as SignatureInfo (for Data packets)
+  // Encode as (Data)SignatureInfo
   auto encodedData = info.wireEncode(SignatureInfo::Type::Data);
-  Block sigInfoDataBlock(sigInfoDataRsa, sizeof(sigInfoDataRsa));
 
-  BOOST_CHECK_EQUAL_COLLECTIONS(sigInfoDataBlock.wire(), sigInfoDataBlock.wire() + sigInfoDataBlock.size(),
-                                encodedData.wire(), encodedData.wire() + encodedData.size());
+  BOOST_CHECK_EQUAL_COLLECTIONS(sigInfoDataRsa, sigInfoDataRsa + sizeof(sigInfoDataRsa),
+                                encodedData.begin(), encodedData.end());
 
-  // Decode as SignatureInfo (for Data packets)
-  info = SignatureInfo(sigInfoDataBlock, SignatureInfo::Type::Data);
+  // Decode as (Data)SignatureInfo
+  info = SignatureInfo(Block(sigInfoDataRsa, sizeof(sigInfoDataRsa)),
+                       SignatureInfo::Type::Data);
+
   BOOST_CHECK_EQUAL(info.getSignatureType(), tlv::SignatureSha256WithRsa);
   BOOST_CHECK_EQUAL(info.hasKeyLocator(), true);
   BOOST_CHECK_EQUAL(info.getKeyLocator().getName(), Name("/test/key/locator"));
-
   BOOST_CHECK(!info.getNonce());
   BOOST_CHECK(!info.getTime());
   BOOST_CHECK(!info.getSeqNum());
 
   // Encode as InterestSignatureInfo
-  std::vector<uint8_t> nonce{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
+  const std::vector<uint8_t> nonce{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
   info.setNonce(nonce);
-  time::system_clock::time_point timePoint(1590169108480_ms);
+  const time::system_clock::time_point timePoint(1590169108480_ms);
   info.setTime(timePoint);
   info.setSeqNum(0x1020);
   auto encodedInterest = info.wireEncode(SignatureInfo::Type::Interest);
-  Block sigInfoInterestBlock(sigInfoInterestRsa, sizeof(sigInfoInterestRsa));
 
-  BOOST_CHECK_EQUAL_COLLECTIONS(sigInfoInterestBlock.wire(),
-                                sigInfoInterestBlock.wire() + sigInfoInterestBlock.size(),
-                                encodedInterest.wire(),
-                                encodedInterest.wire() + encodedInterest.size());
+  BOOST_CHECK_EQUAL_COLLECTIONS(sigInfoInterestRsa, sigInfoInterestRsa + sizeof(sigInfoInterestRsa),
+                                encodedInterest.begin(), encodedInterest.end());
 
   // Decode as InterestSignatureInfo
-  info = SignatureInfo(sigInfoInterestBlock, SignatureInfo::Type::Interest);
+  info = SignatureInfo(Block(sigInfoInterestRsa, sizeof(sigInfoInterestRsa)),
+                       SignatureInfo::Type::Interest);
+
   BOOST_CHECK_EQUAL(info.getSignatureType(), tlv::SignatureSha256WithRsa);
   BOOST_CHECK_EQUAL(info.hasKeyLocator(), true);
   BOOST_CHECK_EQUAL(info.getKeyLocator().getName(), Name("/test/key/locator"));
   BOOST_CHECK(info.getNonce() == nonce);
   BOOST_CHECK(info.getTime() == timePoint);
   BOOST_CHECK(info.getSeqNum() == 0x1020UL);
+
+  // ECDSA
+  info = SignatureInfo(tlv::SignatureSha256WithEcdsa, keyLocator);
+
+  // Encode as (Data)SignatureInfo
+  auto encodedDataEcdsa = info.wireEncode(SignatureInfo::Type::Data);
+
+  BOOST_CHECK_EQUAL_COLLECTIONS(sigInfoDataEcdsa, sigInfoDataEcdsa + sizeof(sigInfoDataEcdsa),
+                                encodedDataEcdsa.begin(), encodedDataEcdsa.end());
+
+  // Decode as (Data)SignatureInfo
+  info = SignatureInfo(Block(sigInfoDataEcdsa, sizeof(sigInfoDataEcdsa)),
+                       SignatureInfo::Type::Data);
+
+  BOOST_CHECK_EQUAL(info.getSignatureType(), tlv::SignatureSha256WithEcdsa);
+  BOOST_CHECK_EQUAL(info.hasKeyLocator(), true);
+  BOOST_CHECK_EQUAL(info.getKeyLocator().getName(), Name("/test/key/locator"));
+  BOOST_CHECK(!info.getNonce());
+  BOOST_CHECK(!info.getTime());
+  BOOST_CHECK(!info.getSeqNum());
 }
 
 BOOST_AUTO_TEST_CASE(DecodeError)
@@ -449,11 +484,12 @@
 BOOST_AUTO_TEST_CASE(CustomTlvsEncoding) // Bug #3914
 {
   SignatureInfo info1(tlv::SignatureSha256WithRsa);
-  info1.appendTypeSpecificTlv(makeStringBlock(102, "First"));
-  info1.appendTypeSpecificTlv(makeStringBlock(104, "Second"));
-  info1.appendTypeSpecificTlv(makeStringBlock(106, "Third"));
+  info1.addCustomTlv(makeStringBlock(102, "First"));
+  info1.addCustomTlv(makeStringBlock(104, "Second"));
+  info1.addCustomTlv(makeStringBlock(106, "Third"));
 
-  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(info1), "SignatureSha256WithRsa { 102 104 106 }");
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(info1),
+                    "SignatureSha256WithRsa { 102 104 106 }");
 
   SignatureInfo info2;
   info2.wireDecode(info1.wireEncode(), SignatureInfo::Type::Data);
