<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Apr 30, 2016 at 7:11 PM, Rhys Weatherley <span dir="ltr"><<a href="mailto:rhys.weatherley@gmail.com" target="_blank">rhys.weatherley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Since no one seemed to be a fan of my text-based certificate format, I have reworked the proposal using protobufs instead:<br><br><a href="http://rweather.github.io/noise-c/cert_key_format.html" target="_blank">http://rweather.github.io/noise-c/cert_key_format.html</a><br><a href="https://github.com/rweather/noise-c/blob/master/doc/noise-certificate.proto" target="_blank">https://github.com/rweather/noise-c/blob/master/doc/noise-certificate.proto</a><br><br></div>Feedback is appreciated.</div></div></div></blockquote><div><br></div><div>The move to protobufs seems like a positive step to me.</div><div><br></div><div>However, when I see things like this:</div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><br></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:22px">The signature covers the contents of the "subject" and "extra_signed_info" fields, represented in the standard </span><a href="https://developers.google.com/protocol-buffers/docs/encoding" style="color:rgb(70,101,162);text-decoration:none;font-family:Roboto,sans-serif;font-size:14px;line-height:22px">Protocol Buffers Encoding</a><span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:22px">. The encoding MUST be "canonical" in that all integer values, field tag numbers, and field lengths are represented using the minimum number of bytes for the value, and the fields are listed strictly in order of field tag number.</span></div></div></div></blockquote><font color="#000000" face="Roboto, sans-serif"><span style="font-size:14px;line-height:22px"><br></span></font>The "clippy" inside my head starts asking questions like. "It looks like you're trying to invent your own protobufs canonicalization format. Are you sure you want to do this?" Especially when I see statements like this:<font color="#000000" face="Roboto, sans-serif"><span style="font-size:14px;line-height:22px"><br></span></font><div><div class="gmail_extra"><div class="gmail_quote"><div><br></div></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><span style="font-size:12.8px">Not that I've seen.  A quick scan of Google's protobuf and protobuf-c didn't reveal any checks for non-canonical varints that I could see (Google's library is pretty massive though so I could have missed it).  Since I'm writing my own minimalistic security-hardened protobuf infrastructure for use inside Noise-C, I can solve that problem as I go.</span></div><div><span style="font-size:12.8px"><br></span></div></div></div></blockquote><span style="font-size:12.8px">Granted this is generally less of a problem with Protobufs than other formats, but it seems like one with solving with some standard method than an ad hoc format-specific invention...</span></div>