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

Add support for ChaCha20 in LibreSSL #9758

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

facutuesca
Copy link
Contributor

Replaces #9209, since LibreSSL does have support for the EVP API for ChaCha20.

@botovq
Copy link
Contributor

botovq commented Oct 24, 2023

Thank you. That looks a lot better :)

I am still going to add a way of allowing the use of chacha20 instead of chacha, but its not entirely trivial, unfortunately.

@alex alex merged commit b943680 into pyca:main Oct 24, 2023
56 checks passed
@facutuesca facutuesca deleted the chacha20-libressl-2 branch October 24, 2023 11:41
@botovq
Copy link
Contributor

botovq commented Oct 24, 2023

Managed to figure out the right incantation. So using 'chacha20' will work starting with LibreSSL 3.9.0.

@@ -264,8 +264,14 @@ def _register_default_ciphers(self) -> None:
self.register_cipher_adapter(
TripleDES, ECB, GetCipherByName("des-ede3")
)
# ChaCha20 uses the Short Name "chacha20" in OpenSSL, but in LibreSSL
# it uses "chacha"
Copy link
Contributor

@botovq botovq Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this is the "Long Name", actually :)

The Short Name is the capitalized "ChaCha20", or "ChaCha", respectively.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good catch, fixed here: #9764

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants