<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 14, 2019 at 10:01 AM Mosko, Marc <<a href="mailto:mmosko@parc.com">mmosko@parc.com</a>> <<a href="mailto:mmosko@parc.com">mmosko@parc.com</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">(Due to a change at PARC, my current email address was not a subscriber to this list, so I had to cancel and re-post this message).<br>
<br>
Out of curiosity, I looked through the Gerrit on the new signed interest.  I do like this direction better than the old signed interest where it is all munged in the name.<br>
<br>
I noticed at the end of the code review comments there is the statement "The signature should not cover Name-TYPE and Name-Length."  I did not see it in the comments, but I assume you are applying the same logic to the Parameters and SignatureInfo fields?<br></blockquote><div><br></div><div>Actually not. The reason why we don't include Name's T and L is because after generating the signature value, we need to append a SignedInterestSha256Digest component to the end of the current name, thus changing the Name's L.</div><div>This cuase extra overhead when verifying the signature -- receiver needs to calculate and modify the L before signature verification.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I think that is not correct.  When computing a digest over multiple fields, you need to delimit those fields somehow (a special character or length encoding, etc.).  Otherwise, you could have a first field with the values of the later fields and the later fields empty and get the same digest and thus the same signature.  For example, if my digest is over fields A and B, if I do not delimit them, I could have A="abc" and B="def" or A="abcdef" and B="" and they would look the same.<br>
<br>
I think this sentence is confusing.  Maybe use more commas or break it up or use set notation.<br>
<br>
>>> The cryptographic signature that is included in the ``InterestSignatureValue`` element covers all bytes of the ``Name`` element excluding the ``ParametersSha256Digest`` component, the Parameters element if presents, and the SignatureInfo.<br>
<br>
It could be read that the signature _excludes_ the Parameters and SignatureInfo.  You also use "bytes" and then "component" which mixes measurements.<br></blockquote><div><br></div><div>Thank you for your comments. I will fix this.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
So it appears that the signature is only on the tuple (Name \  ParametersSha256Digest, Parameters, SignatureInfo).  Usually one would makes those contiguous memory to simplify the digest calculation, so I would have expected the BNF to have Parameters and SignatureInfo directly after Name, assuming that the BNF implies normal ordering.<br></blockquote><div><br></div><div>That's right. I will propose this to the reviewers. (Actually I did the same things in NDN-Lite's signed Interest implementation.) </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">
<br>
Marc<br>
<br>
________________________________________<br>
From: Ndn-interest <<a href="mailto:ndn-interest-bounces@lists.cs.ucla.edu" target="_blank">ndn-interest-bounces@lists.cs.ucla.edu</a>> on behalf of Zhiyi Zhang <<a href="mailto:Zhiyi.Zhang@ucla.edu" target="_blank">Zhiyi.Zhang@ucla.edu</a>><br>
Sent: Saturday, January 12, 2019 11:35:33 AM<br>
To: 侯 ?博<br>
Cc: <a href="mailto:mini-ndn@lists.cs.ucla.edu" target="_blank">mini-ndn@lists.cs.ucla.edu</a>; <a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.edu</a><br>
Subject: Re: [Ndn-interest] Interest Signature<br>
<br>
Actually, we have a pending commit waiting to be merged into NDN-TLV specification: <a href="https://gerrit.named-data.net/c/NDN-TLV/+/4942" rel="noreferrer" target="_blank">https://gerrit.named-data.net/c/NDN-TLV/+/4942</a><br>
This commit defines the new NDN Signed Interest format.<br>
Also, there is a corresponding implementation in ndn-lite library: <a href="https://github.com/named-data-iot/ndn-lite/blob/master/encode/signed-interest.h" rel="noreferrer" target="_blank">https://github.com/named-data-iot/ndn-lite/blob/master/encode/signed-interest.h</a> and <a href="https://github.com/named-data-iot/ndn-lite/blob/master/encode/signed-interest.c" rel="noreferrer" target="_blank">https://github.com/named-data-iot/ndn-lite/blob/master/encode/signed-interest.c</a>.<br>
<br>
Hope it helps.<br>
<br>
Best,<br>
Zhiyi<br>
<br>
On Fri, Jan 11, 2019 at 8:20 PM 侯 ?博 via Ndn-interest <<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.edu</a><mailto:<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.edu</a>>> wrote:<br>
Hello all,<br>
I want to add signature for Interest packet. So I do some actions as follow:<br>
Firstly, I add a member named m_signature in Interest.hpp.<br>
Secondly, I add set and get function for this field of m_signature in interest.hpp.<br>
Thirdly, I change the function of wireEncode and wireDecode in interest.cpp to encode and decode it.<br>
Finally, I  add a value for m_signature  in ndn-consumer.cpp.<br>
However, when I run the test program of ndn-simple,it shows the folloing errors,is there anyone can help me to resolve it.<br>
<br>
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<ndn::Interest::Error> >'<br>
what():  unrecognized element of critical type 4294967295<br>
<br>
Thanks a lot.<br>
<br>
<br>
_______________________________________________<br>
Ndn-interest mailing list<br>
<a href="mailto:Ndn-interest@lists.cs.ucla.edu" target="_blank">Ndn-interest@lists.cs.ucla.edu</a><mailto:<a href="mailto:Ndn-interest@lists.cs.ucla.edu" target="_blank">Ndn-interest@lists.cs.ucla.edu</a>><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest</a><br>
</blockquote></div></div>