[ndnSIM] Using signature in interest packets

Anantha krishnan saji ananthakrishnan190 at gmail.com
Wed Jan 15 01:45:49 PST 2020


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),
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); *
*signature.setValue(block);*
to create a signaturevalue block and


*Block signatureValueBlock = interest->getSignature().getValue();*
*signatureValueBlock.parse();*
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20200115/5f096476/attachment.html>


More information about the ndnSIM mailing list