Skip to content

x.chacha: fix overflow#24064

Merged
spytheman merged 3 commits into
vlang:masterfrom
kbkpbot:fix-x-crypto-chacha20-overflow
Mar 28, 2025
Merged

x.chacha: fix overflow#24064
spytheman merged 3 commits into
vlang:masterfrom
kbkpbot:fix-x-crypto-chacha20-overflow

Conversation

@kbkpbot

@kbkpbot kbkpbot commented Mar 28, 2025

Copy link
Copy Markdown
Contributor
  1. Fix CI problem cause by u64(1 << 63) -1, https://github.com/vlang/v/actions/runs/14119063556/job/39555765325?pr=24059
  2. support full range of 64bit counter
  3. add tests

TODO:

  1. Add assembly version for amd64 , arm64
  2. more checks for boundary condition, such as when counter got a value of 0xffff_ffff_ffff_ffff

@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-22455

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent work.
Thank you 🙇🏻‍♂️ .

@spytheman spytheman merged commit 8a23ea6 into vlang:master Mar 28, 2025
@blackshirt

blackshirt commented Mar 28, 2025

Copy link
Copy Markdown
Contributor

Thank you @kbkpbot for the fix. Generally speaking, i think the x.crypto.chacha20 module overall is in a good state, but, 64-bit counter variant was still need more testing throughly.

@kbkpbot kbkpbot deleted the fix-x-crypto-chacha20-overflow branch March 28, 2025 10:37
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