Subject: Padding binary HTTP messages

From: "Martin Thomson" <[email-masked]>
Date: Mon, 13 Dec 2021 17:18:42 +1100

Hi,

In OHAI, we've been discussing where to pad messages: in the encryption scheme or in the binary HTTP message format natively.  In https://mailarchive.ietf.org/arch/msg/ohai/WEQVWhTRyUzbmNanxME_2CEMNMA/ I did a bit of analysis and concluded that it would be better to have the binary message format do that.

Two reasons:

1. The overall design is simpler and cleaner.
2. We might want to pad binary HTTP messages in contexts other than oblivious HTTP.

The design change is easy: padding is zero-valued bytes added to the end of messages.  As everything has a length prefix, it's trivial to discard padding.  That's maybe not enough on its own to justify the (tiny bit of) extra complexity for the format, but if there is any reason we might need to pad, the feature becomes more interesting.

I've written this up in a pull request:

https://github.com/httpwg/http-extensions/pull/1832

Cheers,
Martin