forked from driftluo/tentacle
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Replace encryption algorithm #191
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…algorithm implementation
…yption and decryption implement
4fb1c95
to
0f297ea
Compare
cfeefd1
to
d7fe3bc
Compare
Add a contrasting implementation of openssl and ring, and use the openssl implementation by default with native support After testing, openssl implementation will be 5-20% faster than ring on my machine. |
d7fe3bc
to
53ec5d9
Compare
…l by default with native suppor
53ec5d9
to
f4a876f
Compare
TheWaWaR
reviewed
Oct 17, 2019
TheWaWaR
approved these changes
Oct 17, 2019
quake
reviewed
Oct 21, 2019
dec19d0
to
a2a99be
Compare
quake
approved these changes
Oct 21, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
relate #190
Due to the basic requirements of the industry standard for encryption algorithms, the replacement algorithm is
libressl
andboringssl
bind.twofish-ctr
aes-gcm/chacha20poly1305
aes-ctr
communicationaes-gcm
Note that
aes-ctr
is not the same encryption algorithm asaes-gcm/chacha20poly1305
:aes-ctr
is just encryption, it needshmac
assistance for integrity verificationaes-gcm/chacha20poly1305
belongs to theaead
algorithm, which itself has the function of encryption and integrity check, so it does not need the assistance ofhmac
, which is the only symmetric encryption algorithm supported byTLS 1.3
.The good news is that we have a side effect that has greatly improved performance. :P
On my machine:
before:
after:
The corresponding communication overhead has also dropped significantly(just in ci):
before:
after:
sorry,after testing, aes-ctr and openssl are compatible when nonce is in a certain range, but the nonce large probability generated during secio handshake is not in this range, so 0.1 and 0.2 are not compatible with high probability. Even so, I still insist on using openssl as the standard and think that the previous implementation is a bug.