<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 19, 2014 at 11:18 PM, Yingdi Yu <span dir="ltr"><<a href="mailto:yingdi@cs.ucla.edu" target="_blank">yingdi@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word"><div><br></div></div></span></span></div><div><span class=""><div>On Sep 19, 2014, at 10:44 PM, Wentao Shang <<a href="mailto:wentaoshang@gmail.com" target="_blank">wentaoshang@gmail.com</a>> wrote:</div><br><blockquote type="cite"><br><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On Fri, Sep 19, 2014 at 9:45 PM, Yingdi Yu<span> </span><span dir="ltr"><<a href="mailto:yingdi@cs.ucla.edu" target="_blank">yingdi@cs.ucla.edu</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Adeola,<div><br></div><div>It is great that we have a proposal for HMAC, a few comments about the doc.</div><div><br></div><div>1. I think you should mentioned in the spec that how to handle keys that are longer than the hash output.</div></div></blockquote><div><br></div><div>Hi Yingdi,</div><div><br></div><div>Correct me if I'm wrong: I thought the key should have the same length as the hash output. </div></div></blockquote><div><br></div></span><div>Not necessarily. At least the RFC does not prevent the usage of longer key. </div><span class=""><br><blockquote type="cite"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>What people usually do is to provide some kind of secret (e.g., a password) and use key derivation function to get the actual HMAC key.</div></div></blockquote><br></span></div><div>This is only a way to derive a symmetric key, but HMAC key does not have to be derived in this way. You do not want to impose such an restriction here. </div><div><br></div></div></blockquote><div><br></div><div>Yes, "standard" HMAC does not explicitly restrict the size of the key, and it also recommends that some key derivation function (bcrypt, PBKDF2, etc) be used with any passphrase that is not the same size as the hash output. I think Tai-Lin's point is fair, and we should let people do whatever they would have done with their HMAC key.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><div><br></div><div>@Adeola, you probably want to forbid KeyDigest in KeyLocator for this HMAC signature. Because if key size is longer than hash output, the key digest is used instead. If we allow KeyDigest in KeyLocator, then some careless programmers may leak the secret.   </div></div></blockquote><div><br></div><div>Well, a careless programmer could put a passphrase, or something used to derive the key, into a KeyLocator KeyName as well. We can go ahead and make the restriction, but there are other ways a programmer could shoot herself in the foot here.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class="HOEnZb"><font color="#888888"><div><br></div><div>Yingdi</div><br></font></span></div><br>_______________________________________________<br>
Ndn-interest mailing list<br>
<a href="mailto:Ndn-interest@lists.cs.ucla.edu">Ndn-interest@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest</a><br>
<br></blockquote></div><br></div></div>