Support for ECH (Encrypted Client Hello) #475
Replies: 3 comments
-
Funny you should post about this, I just recently started reading the RFC draft with the idea to support this eventually. Clearly I want to import as little crypto as possible, so the idea would be to rely on any implementation that is widely used (I guess Apache or Nginx would make good starting points) under the form of an external library. Thanks for the resources. I'll start looking into it slowly, but don't expect much action on my side before January, with Christmas season almost upon us :-) |
Beta Was this translation helpful? Give feedback.
-
My current expectation is, that it will last some month, before something can be coded. Cloudflare seems to be currently ways in front, as they do all inside their own software and they don't need to be compatible to other applications. The pilot projects, forking nginx, OpenSSL etc. are using some quick and dirty workarounds to get things working. What I see for sslh is the following: SNI will disappear very soon, after ECH is available in most standard applications. For WWW this will happen first, as two browsers are supporting current draft implementations. Other applications like mail, messaging, telephony etc. will follow. SNI will be rated as deprecated by the usual security rating tools, as a better standard is available. For sslh the dns-part of ECH is unimportant, as sslh only needs to temporarily decrypt the ECH for the needed decisions, while the encrypted ECH is securely stored. When the decision is made, the stored encrypted ECH needs to be forwarded to the right destination. So sslh doesn't need to to establish TLS handshakes or whatsoever, it only needs a good library for decrypting the header, before it can continue with routing decisions like today. But all that is my current understanding, which may change, when I dig deeper into this. |
Beta Was this translation helpful? Give feedback.
-
Did some more reading and came to the conclusion, that sslh could be a motor for rolling out ECH.
which looks very interesting towards sslh. My conclusion is, that sslh could be easily the client-facing server, as the role of this is, only decrypting the Client Hello Inner and forward the connection to a second server, which handles this connection as a classic TLS connection with SNI. So sslh has two possibilities dealing with ECH:
This second approach could be very interesting in rolling out ECH, because this would turn sslh in an ECH enabler, for many TLS based applications. This means, if sslh would have this functionality, you can start using ECH with a lot of applications, while they are not ECH capable by themself. For this to happen, (at least) three functions would be necessary:
One important finding is, that Bind9 is already supporting DoH along with DoT, so this could be used with own test-domains as DNS source, independent from cloudflare or other companies.
HPKE is supported by OpenSSL starting with version 3.2. See. I looked yesterday at the wrong end, I should have looked to releases and not to branches. When I look into the debian world, they still stuck to 3.0(.15), all higher versions are however available in the testing/unstable and experimental versions. That means, it should be possible to work in a testing environment, where all third party libraries are coming from an distro repository and not from other forks. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am opening this discussion, as this may be of interest to several sslh users.
Encrypted Client Hello (ECH) is used, to hide the name of the target website in an initial TLS connection. Where we are using today SNI (and sniffing SNI with sslh to redirect certain connections), ECH hides this information in first part.
The real servername is encrypted with an outer key, and first after this is decrypted, the real destination could be read.
Very short overview here: https://en.wikipedia.org/wiki/Server_Name_Indication#Encrypted_Client_Hello
Longer information here: https://blog.cloudflare.com/announcing-encrypted-client-hello/ and https://developers.cloudflare.com/ssl/edge-certificates/ech/
Right now it looks like, that this extension is on its way. Unfortunately to my research (please proof me beeing wrong) it is not yet supported by core applications like OpenSSL, Apache, Nginx and others.
There are several forks out there, where this is build in, like:
with forks of Apache, Nginx,OpenSSL, Curl, lighty, ...
with a fork of OpenSSL
The current RFC draft is here: https://datatracker.ietf.org/doc/draft-ietf-tls-esni/ expiring 19 March 2025. As Cloudflare is driving this in own interest, I expect another update or approval within this time.
Right now Firefox and Chrome/Chromium are supporting ECH, all the Linux tools like wget, curl, OpenSSL, GnuSSL, Apache2, Nginx, Lighty etc. don't support it without patch. However I think, that we will see this coming in 2025.
So lets collect informations and ideas here, how to deal with this feature. This is very welcome for all of us, who are hiding ssh access or admin interfaces behind sslh, as todays configurations are more obfuscating than hiding, as SNI is visible to everyone on the network path.
Current discussion for OpenSSL
Beta Was this translation helpful? Give feedback.
All reactions