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

internal/subtle: document and test XORBytes overlap rules #272

Closed
emmansun opened this issue Nov 20, 2024 · 1 comment
Closed

internal/subtle: document and test XORBytes overlap rules #272

emmansun opened this issue Nov 20, 2024 · 1 comment
Assignees
Labels

Comments

@emmansun
Copy link
Owner

XORBytes doesn't say anything about how it deals with destination and source overlaps. Current implementations as written do work if the destination overlaps perfectly with a source, but will unavoidably return nonsensical results if the destination is ahead of the source.
Lock in the current behavior with tests, docs, and panics.

Note that this introduces a new panic, but if any applications run intoit we are potentially catching a security issue.

@emmansun
Copy link
Owner Author

v0.29.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant