<div dir="ltr"><div>Hello sir,</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Are you sure that the Interest you receive carries a signature in the first place?</div></blockquote><div><br></div><div>In order to understand the problem, I cloned a fresh copy of ndnSIM and then tried to parse the signature send along with the data packet. <br></div><div>On the producer side,</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><span style="font-family:verdana,sans-serif">Signature signature;<br>SignatureInfo signatureInfo(static_cast< ::ndn::tlv::SignatureTypeValue>(255));<br><br>if (m_keyLocator.size() > 0) {<br>signatureInfo.setKeyLocator(m_keyLocator);<br>}<br><br>signature.setInfo(signatureInfo);<br>signature.setValue(::ndn::makeNonNegativeIntegerBlock(::ndn::tlv::SignatureValue, 1894)); <br></span></div><div><span style="font-family:verdana,sans-serif">// I should be able to parse this block on consumer side and retrieve 1894.<br><br>data->setSignature(signature);</span></div></blockquote><div><span style="font-family:verdana,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif">On the consumer side,</span></div><div><span style="font-family:verdana,sans-serif"><br></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:verdana,sans-serif">Block signatureValueBlock = data->getSignature().getValue();<br>signatureValueBlock.parse(); // Getting error at this line.<br>auto parsedSignatureBlock = signatureValueBlock.elements().begin();<br>uint64_t parsedSignatureValue = readNonNegativeInteger((*parsedSignatureBlock));</span></blockquote><div><br></div><div> As to my knowledge, the SignatureValue block is getting appended and is carried in the packet. <b>I can see the field in Wireshark dissection</b>. So I think the problem is not in transmitting the block. Is there anything else that I should know about parsing signature value? Does the method of parsing change with different signing methods? <br></div><div><br></div><div>Regards,</div><div>Ananthakrishnan S</div><div>NITK Surathkal<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 28, 2020 at 7:45 PM Spyridon Mastorakis <<a href="mailto:smastorakis@unomaha.edu" target="_blank">smastorakis@unomaha.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
Hi,
<div><br>
</div>
<div>Are you sure that the Interest you receive carries a signature in the first place?</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
<div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>Spyridon (Spyros) Mastorakis<br>
Assistant Professor<br>
Computer Science Department<br>
University of Nebraska, Omaha<br>
Peter Kiewit Institute Room 175A<br>
<a href="https://sites.google.com/site/spyridonmastorakis" target="_blank">https://sites.google.com/site/spyridonmastorakis</a><br>
</div>
</div>
</div>
</div>
</div>
<div><br>
<blockquote type="cite">
<div>On Jan 15, 2020, at 3:45 AM, Anantha krishnan saji via ndnSIM <<a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div>Hi all,</div>
<div><br>
</div>
<div>I want to use Signature in interest packets. Since I could not find InterestSignature class in ndnSim (<a href="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=" target="_blank">http://named-data.net/doc/NDN-packet-spec/current/signature.html#interest-signature</a>),
 I used DataSignature (ndn-cxx/signature.cpp). I made the necessary changes in encoding and decoding of interest packet. I am usingĀ </div>
<div><br>
</div>
<div><span style="font-family:verdana,sans-serif"><b>Block block = ::ndn::makeNonNegativeIntegerBlock(::ndn::tlv::SignatureValue, m_signature);
<br>
</b></span></div>
<div><span style="font-family:verdana,sans-serif"><b>signature.setValue(block);</b></span></div>
<div>to create a signaturevalue block and</div>
<div><br>
</div>
<span style="font-family:verdana,sans-serif"><b>Block signatureValueBlock = interest->getSignature().getValue();<br>
</b></span>
<div><span style="font-family:verdana,sans-serif"><b>signatureValueBlock.parse();</b></span></div>
<div>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:</div>
<div><br>
</div>
<div><span style="font-family:verdana,sans-serif"><b>TLV-LENGTH of sub-element of type 252 exceeds TLV-VALUE boundary of parent block</b></span></div>
<div><span style="font-family:verdana,sans-serif"><b><br>
</b></span></div>
When the default signatureValue of 0 is used, the error becomes
<div><span style="font-family:verdana,sans-serif"><b><br>
</b></span></div>
<div><span style="font-family:verdana,sans-serif"><b>Empty buffer during TLV parsing</b></span></div>
<div><span style="font-family:verdana,sans-serif"><b><br>
</b></span></div>
<div><span style="font-family:verdana,sans-serif"><font face="arial,sans-serif">I would like to know whether there are any additional steps involved in parsing signature other than</font></span></div>
<div>
<ol>
<li><span style="font-family:verdana,sans-serif"><font face="arial,sans-serif">retrieve the signatureValue block.<br>
</font></span></li><li>parse the retrieved block.</li><li>Access the tlv using Block::elements();</li></ol>
<div>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?</div>
<div><br>
</div>
<div>Thanks and regards,</div>
<div>Ananthakrishnan S</div>
<div>NITK Surathkal<br>
</div>
</div>
</div>
_______________________________________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.lists.cs.ucla.edu_mailman_listinfo_ndnsim&d=DwICAg&c=Cu5g146wZdoqVuKpTNsYHeFX_rg6kWhlkLF8Eft-wwo&r=eI5Bh74ovG-uIXQ5ksQETSPgRFzmJXjIZXneCqw580E&m=aNexH4sM2MOP3WZq3KHw4FakjxdFte_otC2AV9FLzK4&s=jIZm1rO4wtEz4cMr4shGKLQprymKM0XveBPrAzIP_5M&e=" target="_blank">https://urldefense.proofpoint.com/v2/url?u=http-3A__www.lists.cs.ucla.edu_mailman_listinfo_ndnsim&d=DwICAg&c=Cu5g146wZdoqVuKpTNsYHeFX_rg6kWhlkLF8Eft-wwo&r=eI5Bh74ovG-uIXQ5ksQETSPgRFzmJXjIZXneCqw580E&m=aNexH4sM2MOP3WZq3KHw4FakjxdFte_otC2AV9FLzK4&s=jIZm1rO4wtEz4cMr4shGKLQprymKM0XveBPrAzIP_5M&e=</a>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</div>

</blockquote></div>