Skip to content

Conversation

@blackshirt
Copy link
Contributor

@blackshirt blackshirt commented Oct 5, 2025

While have a working prototype implementation of ChaCha20-Poly1305-PSIV construct, its used an internal of chacha20 by rewriting it as a new routine, makes it a duplicated in a lot places. I think its should be a public to make it reusable thing. See the working implementation of this construct at here.
By making it accessible outside the module, its make possible to expand by new construction based on this state, like above psiv construct or possibility of this. This also mean reduces code duplication.

This patch was related to previously merged PR #25438, but comes with the changes on the chacha20 sides..
Its exposes some cores of the chacha20 as public in the means of :

  • exposes a chacha20.State into user, mainly as a new building-block tool
  • exposes minimal api for this state, currently only .clone, .reset and fundamental quarter round .qround routines.
  • adjustment on the State-related thing.

There are construct availables outside that relies on hchacha20, but its not the concerns of this PR.

Thanks
Cheers

@huly-for-github
Copy link

Connected to Huly®: V_0.6-26133

@blackshirt blackshirt marked this pull request as draft October 5, 2025 10:01
@blackshirt blackshirt marked this pull request as ready for review October 5, 2025 10:36
Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

If you expose new APIs, please also add tests for them.

Otherwise people can start to depend on them, and we would not know if/when they regress.

@blackshirt
Copy link
Contributor Author

blackshirt commented Oct 6, 2025

If you expose new APIs, please also add tests for them.

Otherwise people can start to depend on them, and we would not know if/when they regress.

Okey..i would add it

NB; add it in #8bca962

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Thank you @blackshirt 🙇🏻 .

@spytheman spytheman merged commit 9eef7ec into vlang:master Oct 7, 2025
72 checks passed
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.

2 participants