<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>On 2/9/2021 2:29 PM, Viktor Dukhovni wrote:<br>
    </p>
    <blockquote type="cite"
      cite="mid:YCMM1+AxvitN2qOC@straasha.imrryr.org">
      <pre class="moz-quote-pre" wrap="">On Tue, Feb 09, 2021 at 03:40:21PM -0500, Phillip Hallam-Baker wrote:

</pre>
      <blockquote type="cite" style="color: #007cff;">
        <pre class="moz-quote-pre" wrap="">If I do go with random, is there a cheap way to generate random padding I
should be thinking of? I don't need this to be particularly random.

One possibility is to put the zeros through GCM with a different key. Seems
wasteful though.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">Perhaps something like Strobe:

    <a class="moz-txt-link-freetext" href="https://strobe.sourceforge.io/papers/strobe-latest.pdf" moz-do-not-send="true">https://strobe.sourceforge.io/papers/strobe-latest.pdf</a>

might be a decent framework and may provide a natural way to do padding,
by just sampling the key stream.

As for padding with zeros or random, I'd go with zeros.  I'd be more
concerned about subliminal channels in random data than known plaintext
attacks on AES.</pre>
    </blockquote>
    <p>That's pretty much the reason why QUIC uses zeros for padding.
      Otherwise, you are opening the gates for creative use of padding,
      and you can be pretty sure that you will not like the final
      result.<br>
    </p>
    <p>-- Christian Huitema<br>
    </p>
  </body>
</html>