diff --git a/ndn-cpp/data.cpp b/ndn-cpp/data.cpp
index a31878e..c9f21fa 100644
--- a/ndn-cpp/data.cpp
+++ b/ndn-cpp/data.cpp
@@ -48,7 +48,7 @@
 }
 
 Data::Data(const Data& data)
-: name_(data.name_), metaInfo_(data.metaInfo_), content_(data.content_), wireEncoding_(data.wireEncoding_)
+: name_(data.name_), metaInfo_(data.metaInfo_), content_(data.content_), defaultWireEncoding_(data.defaultWireEncoding_)
 {
   if (data.signature_)
     signature_ = data.signature_->clone();
@@ -68,7 +68,7 @@
   name_ = data.name_;
   metaInfo_ = data.metaInfo_;
   content_ = data.content_;
-  wireEncoding_ = data.wireEncoding_;
+  defaultWireEncoding_ = data.defaultWireEncoding_;
 
   return *this;
 }
@@ -102,13 +102,17 @@
 }
 
 SignedBlob 
-Data::wireEncode(WireFormat& wireFormat) 
+Data::wireEncode(WireFormat& wireFormat) const
 {
   size_t signedPortionBeginOffset, signedPortionEndOffset;
   Blob encoding = wireFormat.encodeData(*this, &signedPortionBeginOffset, &signedPortionEndOffset);
+  SignedBlob wireEncoding = SignedBlob(encoding, signedPortionBeginOffset, signedPortionEndOffset);
   
-  wireEncoding_ = SignedBlob(encoding, signedPortionBeginOffset, signedPortionEndOffset);
-  return wireEncoding_;
+  if (&wireFormat == WireFormat::getDefaultWireFormat())
+    // This is the default wire encoding.
+    const_cast<Data*>(this)->defaultWireEncoding_ = wireEncoding;
+  
+  return wireEncoding;
 }
 
 void 
@@ -117,13 +121,18 @@
   size_t signedPortionBeginOffset, signedPortionEndOffset;
   wireFormat.decodeData(*this, input, inputLength, &signedPortionBeginOffset, &signedPortionEndOffset);
   
-  wireEncoding_ = SignedBlob(input, inputLength, signedPortionBeginOffset, signedPortionEndOffset);
+  if (&wireFormat == WireFormat::getDefaultWireFormat())
+    // This is the default wire encoding.
+    defaultWireEncoding_ = SignedBlob(input, inputLength, signedPortionBeginOffset, signedPortionEndOffset);
+  else
+    defaultWireEncoding_ = SignedBlob();
 }
 
 void 
 Data::onChanged()
 {
-  wireEncoding_ = SignedBlob();
+  // The values have changed, so the default wire encoding is invalidated.
+  defaultWireEncoding_ = SignedBlob();
 }
 
 }
diff --git a/ndn-cpp/security/key-chain.cpp b/ndn-cpp/security/key-chain.cpp
index 197fdfd..3fc3f77 100644
--- a/ndn-cpp/security/key-chain.cpp
+++ b/ndn-cpp/security/key-chain.cpp
@@ -77,11 +77,10 @@
   if (signature->getDigestAlgorithm().size() != 0)
     // TODO: Allow a non-default digest algorithm.
     throw UnrecognizedDigestAlgorithmException("Cannot verify a data packet with a non-default digest algorithm.");
-  if (!data.getWireEncoding())
-    // Don't expect this to happen
-    throw SecurityException("The Data wireEncoding is null.");
-  uint8_t signedPortionDigest[SHA256_DIGEST_LENGTH];
-  ndn_digestSha256(data.getWireEncoding().signedBuf(), data.getWireEncoding().signedSize(), signedPortionDigest);
+  if (!data.getDefaultWireEncoding())
+     data.wireEncode();
+ uint8_t signedPortionDigest[SHA256_DIGEST_LENGTH];
+  ndn_digestSha256(data.getDefaultWireEncoding().signedBuf(), data.getDefaultWireEncoding().signedSize(), signedPortionDigest);
   
   // Verify the signedPortionDigest.
   // Use a temporary pointer since d2i updates it.
