diff --git a/src/data.cpp b/src/data.cpp
index 8ce8f4c..596e20b 100644
--- a/src/data.cpp
+++ b/src/data.cpp
@@ -116,6 +116,7 @@
 void
 Data::wireDecode(const Block& wire)
 {
+  m_fullName.clear();
   m_wire = wire;
   m_wire.parse();
 
@@ -156,6 +157,21 @@
   return *this;
 }
 
+const Name&
+Data::getFullName() const
+{
+  if (m_fullName.empty()) {
+    if (!m_wire.hasWire()) {
+      throw Error("Full name requested, but Data packet does not have wire format "
+                  "(e.g., not signed)");
+    }
+    m_fullName = m_name;
+    m_fullName.append(name::Component(crypto::sha256(m_wire.wire(), m_wire.size())));
+  }
+
+  return m_fullName;
+}
+
 Data&
 Data::setMetaInfo(const MetaInfo& metaInfo)
 {
@@ -275,6 +291,7 @@
   // the application to do proper re-signing if necessary
 
   m_wire.reset();
+  m_fullName.clear();
 }
 
 bool
diff --git a/src/data.hpp b/src/data.hpp
index 9338258..70d1a72 100644
--- a/src/data.hpp
+++ b/src/data.hpp
@@ -157,6 +157,15 @@
   //
 
   /**
+   * @brief Get full name of Data packet, including the implicit digest
+   *
+   * @throws Error if Data packet doesn't have a full name yet (wire encoding has not been
+   *         yet created)
+   */
+  const Name&
+  getFullName() const;
+
+  /**
    * @brief Get MetaInfo block from Data packet
    */
   const MetaInfo&
@@ -306,6 +315,7 @@
   Signature m_signature;
 
   mutable Block m_wire;
+  mutable Name m_fullName;
 
   nfd::LocalControlHeader m_localControlHeader;
   friend class nfd::LocalControlHeader;
diff --git a/src/interest.cpp b/src/interest.cpp
index 590d527..986a5ec 100644
--- a/src/interest.cpp
+++ b/src/interest.cpp
@@ -68,13 +68,13 @@
     return false;
 
   if (getMinSuffixComponents() >= 0 &&
-    // Add 1 for the implicit digest.
-      !(name.size() + 1 - m_name.size() >= static_cast<size_t>(getMinSuffixComponents())))
+      // name must include implicit digest
+      !(name.size() - m_name.size() >= static_cast<size_t>(getMinSuffixComponents())))
     return false;
 
   if (getMaxSuffixComponents() >= 0 &&
-    // Add 1 for the implicit digest.
-      !(name.size() + 1 - m_name.size() <= static_cast<size_t>(getMaxSuffixComponents())))
+      // name must include implicit digest
+      !(name.size() - m_name.size() <= static_cast<size_t>(getMaxSuffixComponents())))
     return false;
 
   if (!getExclude().empty() &&
@@ -88,7 +88,7 @@
 bool
 Interest::matchesData(const Data& data) const
 {
-  if (!this->matchesName(data.getName())) {
+  if (!this->matchesName(data.getFullName())) {
     return false;
   }
 
