-
Notifications
You must be signed in to change notification settings - Fork 27
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
Enable CHACHA20-Draft Version in Openssl 1.1.0 and later #1
Comments
I think it's useful, but the draft version is obsolete. 1.0.2 and 1.1.1 have a lot of differences, which makes it difficult to patch. I will try, but I do not know if it is possible. P.S. Google(google.com, etc.) has already removed OLD CHACHA from SSL Cipher. Sorry my poor english. |
Though draft version ciphers are obsolete, they are still secure. |
Also, old device with old Android(like 5.0 and 6.0) can only use chacha20-draft |
You can see boringssl branch 2987 (git clone -b 2987 https://github.com/google/boringssl )and clousflare's patch(https://github.com/cloudflare/sslconfig/ ) |
But you need to know that cloudflare's patc use AVX/AVX2 and SSE4 that could not work on some server(like Raspberry Pi, old Intel/AMD Proccers and ALL OF ARM DEVICES) |
I have searched for related materials, but for me, assembly is too difficult. I am currently consulting documentation on encryption and decryption after handshaking. |
Thank you! |
Encryption and decryption after handshaking is more difficult than handshake... You can read the code in BoringSSL branch 2987, it's a good example that it has both RFC version and Draft version. |
The documentation of Chacha-Draft is here And the documentation of ChaCha-RFC version is here There isn't much difference between these two I think... I tried to rewrite the code with these documentations, but I can't even compile it successfully! |
The draft version is for old servers which have no SSE codes and AVX codes, that makes the code running almost all the devices |
maybe chrome or firefox on android 6 could use rfc chacha20 , and chrome support tls 1.3 draft28 now. @hakasenyang is that mean we dont need draft 23 anymore? |
@ymshenyu No, we need to make Internet safer and TLS1.3 draft23 26 28 is enough safe, so we needn't delete draft 23 support |
@railjty ok , actually draft 23 and 28 are draft standard so they are both safe i think , and android chrome still using draft 23 . android chrome did not release version 68 yet |
I tried to try it all the time, but it is very difficult. |
That's all right...you needn't say sorry at all. It is really a difficult thing. I'm sorry that this issue maybe cost you a lot of time :( . Thank you anyway! |
tls 1.3 standard version came out https://www.rfc-editor.org/rfc/rfc8446.txt |
openssl 1.1.1 pre9 dev update code https://github.com/openssl/openssl/commit/35e742ecac9239539db016e1282b4cbdf501509c |
@ymshenyu Yes. I already responded to the patch. https://github.com/hakasenyang/openssl-patch/blob/master/openssl-equal-pre9_ciphers.patch |
@hakasenyang I faced a problem with your new patch, but I don't want to start a new issue...
And nginx logged I tried the newest version and the exact version of openssl you said which is compatible (https://github.com/openssl/openssl/tree/2805ee1e095a78f596dc7adf778441e2edb9f15c) I wonder why... And if I don't use any patch, s_client still cannnot establish tls1.3 handshake |
Hello, @JemmyLoveJenny
Your server has not been enabled for TLS 1.3. Use Example)
|
BoringSSL with Nginx trunk can use 0-rtt now . but i dont like BoringSSL because it didnt support ocsp stapling by default . and i dont want to use it patch to turn it on . |
@hakasenyang I'm sure that I enabled TLS1.3
and my nginx
and I set some options of openssl when compiling nginx
|
@JemmyLoveJenny maybe nginx version ? my server still use pre8 . i am not sure |
@ymshenyu my configuration works well when I was using openssl-pre9 with tls1.3 28 |
@JemmyLoveJenny well , reconfigure openssl without patch ? |
@ymshenyu I tried reconfigure without patch, but still can't establish tls1.3 handshake. But I don't think original openssl with nginx support tls 1.3 |
@JemmyLoveJenny Could you test the openssl build with this version? |
@hakasenyang Wait a minute, I will try... |
@JemmyLoveJenny View stackoverflow.
Speed is very important, but not very serious... maybe.... 🤔 |
@hakasenyang Now I see... ThankU :D |
@JemmyLoveJenny 如果你是个优化狂魔 把你所有的软件都用上jemalloc |
@ymshenyu 并不是任意软件都可以用jemalloc。 |
虽然只是个内存管理 我 |
我只编译在了nginx和mariadb |
@kn007 我见过国内dcc这个博主把jemalloc用在了openssl上 XD |
Original source by JemmyLoveJenny. Reference : https://github.com/JemmyLoveJenny/ngx_ossl_patches/blob/master/ossl_enable_chacha20-poly1305-draft.patch Issue : #1 (comment)
这个是可以啊,我也是啊。。why not? |
@kn007 这样的加密库也要丢个内存管理 你们博主真的是优化狂魔 |
Cloudflare:
My Server:
😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 😄 |
@hakasenyang Great 👍 |
@hakasenyang @JemmyLoveJenny 看来我们可以close这个issue了。 |
And what is this tool? |
You can download this site. It is a tool called testssl.sh. Example) https://ssl.hakase.io/ssltest/hakase.io.html I used the -E argument. |
testssl.sh i guess |
@hakasenyang Thankyou |
@kn007 你可以更新的10月4号的博客文章了 |
@hakasenyang And finally, we can close the issue now 👍 |
👍 There were so many comments. 😄 |
Ahhhh :D |
@hakasenyang Sorry about that... |
@kn007 I'm fine. I welcome any comments. 😃 |
@hakasenyang Do you have any idea about how to make this patch compatiable with newer versions of OpenSSL? |
You can find the number 1195 in the patch. |
Unfortunately, I do not know how to do it. 😭 |
I've updated @Jemmy1228's patch to work with OpenSSL-1.1.1u and modified the code to also pass the make test command. |
Here is the OpenSSL-3.2.0-dev (latest as of now): |
The Cloudflare patch can enable Both CHACHA20-RFC(0xcca8-0xccaa) ciphers and CHACH20-Draft(0xcc13-0xcc15) ciphers in Openssl 1.0.2f-j
I tried to make the Cloudflare patch compatible with Openssl-1.1.1-pre9 by myself, by adding the CHACHA-Draft back to it, but I met a lot of difficulties and caused many errors.
Can you please make such a patch that enable both the RFC and Draft CHACHA20 ciphers in Openssl 1.1.0
I think it would be very useful for everyone
The text was updated successfully, but these errors were encountered: