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

Switch to using ChaCha20Poly1305Reusable for encryption #3

Merged
merged 4 commits into from
Jun 23, 2022

Conversation

bdraco
Copy link
Owner

@bdraco bdraco commented Jun 23, 2022

The ChaCha20Poly1305 that comes with cryptography recreates the
ctx every time encrypt is called. Since we call encrypt in
a loop, we can avoid this overhead by using ChaCha20Poly1305Reusable
instead as we are doing everything in the same thread and not concerned
about thread safety

bdraco added 4 commits June 18, 2022 12:29
The ChaCha20Poly1305 that comes with cryptography recreates the
ctx every time encrypt is called.  Since we call encrypt in
 a loop, we can avoid this overhead by using ChaCha20Poly1305Reusable
instead as we are doing everything in the same thread and not concerned
about thread safety
@bdraco bdraco merged commit 5bdc0ba into dev Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant