-
Notifications
You must be signed in to change notification settings - Fork 281
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
Encrypted ClientHello (ECH) #730
Comments
This might be able to be done transparently for clients if hooks are defined for each platform. OpenJDK has the DNS/JNDI and it appears you can query with a target record type of "*" if needed. Android would use its netd resolver most likely. |
Yeah, making it transparent to clients by default sounds ideal, though I suspect there might be good reason expose somethings. DNS is not a requirement for ESNI, just the suggested way to distribute key material. For example, there are some ESNI modes where the keys do not come from DNS, but "somewhere else". For that to be useful, the client needs to be able to provide that key material in Java. |
Some notes for possible future implementors:
|
Small correction to 1, it's not that ESNI and A/AAAA records have to stay in sync (separate record types aren't guaranteed to be in sync). It's that the IP addresses need to come from the ESNI flow, to handle the multi-CDN use case correctly. That means either the ESNI record (which is ESNI keys and addresses stapled in one record) or the HTTPSSVC/SVCB record (which is basically ESNI keys stapled to a funny CNAME), either of which override the usual A/AAAA lookup flow. Re 2, realistically I expect ESNI will need to depend on DoH or DoT to avoid troubles with buggy router DNS resolvers. |
So @uniqx and I have been putting together a test harness, and started digging into the DNS resolving question. It looks like the place we'll need to change is in the constructors of But it looks like perhaps it should happen at a higher level, in the Then |
You need to be very careful here because of the multi-CDN problem. The |
|
Right, it's the query mechanism that is you need to be careful with. |
Do you have any concrete examples we can work with? It would be good to have that in a test case as we work on this. |
Excuse me. Can you tell me how to manage the key to encrypt the sni? If yes, what do you think about the key renewal? |
Right now, we're starting with HTTPSSVC as the DNS method for getting the ESNI key material. @davidben @kruton do either of you have specific thoughts or requirements on which DNS records Conscrypt should support by default? Like whether Conscrypt should only do HTTPSSVC by default or also handle generic SVCB requests? Also, I guess the idea is that Conscrypt would handle the DoH/DoT detection. Or will Android provide some method for that? |
Android provides LinkProperties.isPrivateDnsActive() and LinkProperties.getPrivateDnsServerName(), for detecting DoH/DoT. OpenJDK does not seem to have anything similar. So we would need to abstract that piece in order to use this detection in |
FYI I've started work on this. I have the latest BoringSSL building with the latest Conscrypt. Now I'm wiring up the new BoringSSL methods to be available in Java. |
I have the first test setup with JNDI working. JNDI provides querying by type number, e.g. |
So I have ECH working in Conscrypt #1044. The big open question is how to handle the new DNS requirements in Conscrypt. In summary, the hard part about adding ECH support is that it requires more from DNS than what is currently available when connecting to a socket. These requirements are mapped out in As far as I understand it, the Another thing that needs working out here is when Conscrypt should do the DNS, and when it should not. A pure library that provides ECH should not handle the DNS, e.g. openssl. A pure client must handle the DNS, e.g a browser. Conscrypt can sometimes act like the client, like in the case when an Android app is just calling |
We've started publishing builds of our Conscrypt fork to make testing easy: implementation 'info.guardianproject.conscrypt:conscrypt-android:2.6.alpha1638179154.job1828169525' The source matching those tags is here: |
Quick update. I think we have a POC for OkHttp that shows we can connect a custom Dns implementation that also fetches HTTPS records instead of or in addition to A/AAAA records. Then a custom SSLSocketFactory that configures using the changes by @eighthave square/okhttp#6539 However if it isn't likely to land in Conscrypt, then it doesn't make much sense to continue efforts on an OkHttp supporting library (not likely part of the core). So mainly curious if the existing PR #1044 has legs? |
hopefully google can shed some light on that. They are proceeding with ECH in
boringssl and Chromium
|
You shouldn't limit the use of ECH when there is no DOT/DOH Resolver in use. |
The standard DNS implementation we use wouldn't be sufficient, so I'm not clear how this can work. You might want broader support, but okhttp is not the place to request. We can only enable this once the platform or conscrypt supports AND exposes it. |
It would be great to have support for TLS Encrypted SNI (ESNI) in Conscrypt, so Android apps can include Conscrypt to get TLSv1.3 and ESNI support. Work is already underway in boringssl and openssl to support ESNI, so it should be relatively straightforward
I'm working with others on implementing Encrypted SNI on services used on Android. ESNI is up to draft4 in the IETF process, so now is a good time to start implementing in order to provide feedback to the IETF process. We're wondering how much interest there is here in TLSv1.3 Encrypt SNI extension that is currently an IETF draft implemented by Firefox, Cloudflare, and others. We could potentially submit code to make Conscrypt support ESNI. We are currently working on getting ESNI implemented in openssl, curl, and lighttpd.
The text was updated successfully, but these errors were encountered: