wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: Karolin Varner <karo@cupdev.net>
To: Trevor Perrin <trevp@trevp.net>
Cc: wireguard@lists.zx2c4.com, noise <noise@moderncrypto.org>, labo@labo.rs
Subject: Re: another thread on montonic counter alternatives
Date: Tue, 10 Aug 2021 09:53:40 +0200	[thread overview]
Message-ID: <4aea0fd6-a37e-3cf5-8df8-79ef119adff6@cupdev.net> (raw)
In-Reply-To: <CAGZ8ZG1wU=A4Yu0v7938pRL2d1p+Gj_Mh8+9=sdA-ScHZiYVTQ@mail.gmail.com>

On 8/10/21 2:09 AM, Trevor Perrin wrote:
> On Sun, Aug 8, 2021 at 5:04 PM Karolin Varner <karo@cupdev.net> wrote:
>>
>> 2) Fall back to an interactive handshake using cookies. Define a protocol version two, mandate that in V2 the cookie must be mixed into the handshake hash. Assign a cookie in case of timestamp failure.
> 
> That could be deployed in a backwards-compatible way, I think?  If the
> client's V1 handshake is rejected due to an old timestamp, the client
> is given the cookie which enables it to do the V2 handshake?

Yes!
I was thinking InitHello with a flag set in the reserved bytes, peer responds with cookie and a compatibility flag set as well.
The flag would be ignored by legacy responders, these would also respond with the flag set to zero in cookie replies so the initiator knows not to use V2 when resending InitHello with a cookie.
Peers generating messages without a cookie should skip the cookie mixing step (not mix {0}^n) so the message can be processed by legacy peers and modern ones alike.

There may be non-standard implementations which assert the reserved bytes to be {0}^3,
so sending a one-time-counter using an entirely new packet type might be even more compatible. Such a message would be entirely ignored by all but the worst implementations.

Karolin

      reply	other threads:[~2021-08-10  7:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-08 22:33 Jason A. Donenfeld
2021-08-08 23:18 ` Karolin Varner
2021-08-10  0:09   ` Trevor Perrin
2021-08-10  7:53     ` Karolin Varner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4aea0fd6-a37e-3cf5-8df8-79ef119adff6@cupdev.net \
    --to=karo@cupdev.net \
    --cc=labo@labo.rs \
    --cc=noise@moderncrypto.org \
    --cc=trevp@trevp.net \
    --cc=wireguard@lists.zx2c4.com \
    --subject='Re: another thread on montonic counter alternatives' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).