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

initial addition of AEAD ChaCha20Poly1305 algorithm in pure v #20817

Merged
merged 6 commits into from
Feb 14, 2024

Conversation

blackshirt
Copy link
Contributor

@blackshirt blackshirt commented Feb 13, 2024

This pull request is the next step in two modules that have been merged into the experimental x.crypto namespace. This effort also adds to the completeness and capabilities of v crypto modules in the form of additional support for the authenticated encryption with additional data (AEAD) algorithm in pure V. See wiki about AEAD.

In this pull request opportunity, I included the AEAD interface which is actually more appropriate in crypto.cipher, but it doesn't matter where it is here, because this still needs review from the community and from experts. See the discussion on discord to find out his background and motivation.

This module is mostly inspired by the Golang version and attempts to align and conform to the RFC 8439 standard ChaCha20 and Poly1305 for IETF Protocols, with a few additions, likes supports two nonce sizes, 12 bytes length of RFC 8439 and 24 bytes length of extended nonce size, wich is backed up by x.crypto.chacha20 which supports both sizes. For extended nonce size, see XChaCha for more detail.

Please give a review, feedback or suggestion.
All are welcome
Thanks

@JalonSolov
Copy link
Contributor

Following RFC is good. Is there an RFC mentioning the 2 nonce sizes?

@blackshirt
Copy link
Contributor Author

blackshirt commented Feb 13, 2024

Following RFC is good. Is there an RFC mentioning the 2 nonce sizes?

Its already in x.crypto.chacha20 especially in xchacha20.v file for supporting extended ChaCha20 construction with 24 bytes nonce. For extended nonce size, see detail in XChaCha: eXtended-nonce ChaCha and AEAD_XChaCha20_Poly1305

@spytheman spytheman merged commit 9476aed into vlang:master Feb 14, 2024
42 checks passed
@blackshirt
Copy link
Contributor Author

Thank for merging it ...
Have a nice day

@blackshirt blackshirt deleted the aead-for-x-crypto branch February 14, 2024 07:13
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