[ndnSIM] Using signature in interest packets

Spyridon Mastorakis smastorakis at unomaha.edu
Tue Jan 28 11:45:12 PST 2020


Are you sure that the Interest you receive carries a signature in the first place?


Spyridon (Spyros) Mastorakis
Assistant Professor
Computer Science Department
University of Nebraska, Omaha
Peter Kiewit Institute Room 175A

On Jan 15, 2020, at 3:45 AM, Anantha krishnan saji via ndnSIM <ndnsim at lists.cs.ucla.edu<mailto:ndnsim at lists.cs.ucla.edu>> wrote:

Hi all,

I want to use Signature in interest packets. Since I could not find InterestSignature class in ndnSim (http://named-data.net/doc/NDN-packet-spec/current/signature.html#interest-signature<https://urldefense.proofpoint.com/v2/url?u=http-3A__named-2Ddata.net_doc_NDN-2Dpacket-2Dspec_current_signature.html-23interest-2Dsignature&d=DwMFaQ&c=Cu5g146wZdoqVuKpTNsYHeFX_rg6kWhlkLF8Eft-wwo&r=eI5Bh74ovG-uIXQ5ksQETSPgRFzmJXjIZXneCqw580E&m=aNexH4sM2MOP3WZq3KHw4FakjxdFte_otC2AV9FLzK4&s=HBLrQsPQMcXUXUG86_9LXf5FQ4iH9wS7TifZmRKi4fM&e=>), I used DataSignature (ndn-cxx/signature.cpp). I made the necessary changes in encoding and decoding of interest packet. I am using

Block block = ::ndn::makeNonNegativeIntegerBlock(::ndn::tlv::SignatureValue, m_signature);
to create a signaturevalue block and

Block signatureValueBlock = interest->getSignature().getValue();
to parse the block on producer side. I am able to parse signatureInfo similarly. But the problem is signatureValue is not getting parsed. I am getting the following error:

TLV-LENGTH of sub-element of type 252 exceeds TLV-VALUE boundary of parent block

When the default signatureValue of 0 is used, the error becomes

Empty buffer during TLV parsing

I would like to know whether there are any additional steps involved in parsing signature other than

  1.  retrieve the signatureValue block.
  2.  parse the retrieved block.
  3.  Access the tlv using Block::elements();

I have used the same steps in multiple places in my code to create and parse blocks and all that is working fine. Is parsing Signature any different?

Thanks and regards,
Ananthakrishnan S
NITK Surathkal
ndnSIM mailing list
ndnSIM at lists.cs.ucla.edu<mailto:ndnSIM at lists.cs.ucla.edu>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20200128/0edc27eb/attachment-0001.html>

More information about the ndnSIM mailing list