Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive accept confirmation from the handshake secret #353

Merged
merged 2 commits into from
Nov 17, 2020

Conversation

cjpatton
Copy link
Contributor

@cjpatton cjpatton commented Nov 2, 2020

Originally suggested by Karthik Bhargavan, this change mitigates an active "don't stick out" attack pointed out by Christian Huitema. The attack is as follows.

Client                       Attacker             Server
CH
 +encrypted_client_hello
 +key_share (g^x)        --> CH -->               SH
                                                   +key_share (g^y)
                             SH'              <-- EE
                              +key_share (g^a)
                         <-- EE'
  1. The attacker intercepts the client's first flow (CH) and forwards it to the
    server.
  2. The attacker intercepts the server's first flow and transforms SH and EE into
    SH' and EE' respectively, as follows. SH' is just like SH except that the
    key share g^y is replaced with key share g^a, where a is known to the
    attacker. EE' is a malformed handshake message encrypted using a key derived
    from g^xa. Finally, it sends SH'..EE' to the client.
  3. If the client aborts with a "bad_record_mac" alert, then the attacker guesses
    that real-ECH was used. Otherwise, it guesses that grease-ECH was used.

draft-ietf-tls-esni.md Outdated Show resolved Hide resolved
@cjpatton cjpatton marked this pull request as ready for review November 3, 2020 15:24
@ekr
Copy link
Collaborator

ekr commented Nov 3, 2020

I have really mixed feelings about this. On the one hand, it's kind of annoying extra complexity. OTOH, given how hard a time we have had by reasoning about the security of ECH, I think better safe than sorry.

@chris-wood
Copy link
Collaborator

@cjpatton can you please rebase this PR?

draft-ietf-tls-esni.md Outdated Show resolved Hide resolved
draft-ietf-tls-esni.md Outdated Show resolved Hide resolved
draft-ietf-tls-esni.md Outdated Show resolved Hide resolved
@chris-wood
Copy link
Collaborator

@cjpatton this is nice -- thanks! I think the new type name for the special SH is fine, though if someone has an idea for a better name, let's consider it.

draft-ietf-tls-esni.md Outdated Show resolved Hide resolved
This mitigates a large class of "don't stick out" attackers. It was
originally suggested by Karthik Bhargavan on the mailing list.

Co-authored-by: Christopher Wood <caw@heapingbits.net>
@cjpatton
Copy link
Contributor Author

cjpatton commented Nov 11, 2020

@ekr: I have really mixed feelings about this. On the one hand, it's kind of annoying extra complexity. OTOH, given how hard a time we have had by reasoning about the security of ECH, I think better safe than sorry.

This change is definitely more invasive than the existing signal, but not all that hard to implement. (E.g., cloudflare/go#38.)

cc/ @dmcardle, @davidben

@chris-wood
Copy link
Collaborator

chris-wood commented Nov 11, 2020

Thanks, @cjpatton! @dmcardle and @kjacobs-moz, if you can also comment on the implementation difficulty, we can try and land this soon.

@kjacobs-moz
Copy link
Contributor

This seems pretty straightforward. I don't think it would be too difficult to do in NSS.

@ekr
Copy link
Collaborator

ekr commented Nov 17, 2020

I think on balance we should do this.

@chris-wood chris-wood merged commit e4c8007 into tlswg:master Nov 17, 2020
@cjpatton cjpatton deleted the accept-binder branch April 16, 2021 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants