Skip to content

Conversation

@renanmav
Copy link
Contributor

@renanmav renanmav commented May 27, 2025

In this PR:

  • Adds specific cipher C++ implementations for ChaCha20 and ChaCha20-Poly1305 algorithms.
  • Adds tests to ChaCha20 and ChaCha20-Poly1305 algorithms.

References:

@renanmav renanmav changed the title test: chacha with and without poly1305 feat: chacha20 + chacha20-poly1305 + tests May 28, 2025
@renanmav renanmav marked this pull request as ready for review May 28, 2025 17:01
@renanmav renanmav requested review from boorad and mrousavy May 28, 2025 17:05
Copy link
Collaborator

@boorad boorad left a comment

Choose a reason for hiding this comment

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

changes to tests ❤️


namespace margelo::nitro::crypto {

void ChaCha20Cipher::init(const std::shared_ptr<ArrayBuffer> cipher_key, const std::shared_ptr<ArrayBuffer> iv) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it worth consolidating the similarities in the base class somehow, keeping only the EVP_chacha20() and size checks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@boorad an alternative I see for this is 9175d3e

But to achieve that, other cipher implementations would have to be refactored too, and I think that's out of scope for this PR.

Maybe in a follow up, check #712

@renanmav renanmav requested a review from boorad June 2, 2025 15:05
@renanmav renanmav merged commit 0a88709 into main Jun 2, 2025
7 checks passed
@renanmav renanmav deleted the renan/chacha-test branch June 2, 2025 15:35
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.

3 participants