Skip to content

fix(utils): use wider diff type for constant_time_equals - #32

Merged
LimiNode merged 1 commit into
mainfrom
codex/update-diff-initialization-and-tests
Sep 3, 2025
Merged

fix(utils): use wider diff type for constant_time_equals#32
LimiNode merged 1 commit into
mainfrom
codex/update-diff-initialization-and-tests

Conversation

@LimiNode

@LimiNode LimiNode commented Sep 3, 2025

Copy link
Copy Markdown
Owner

Summary

  • avoid diff truncation in constant_time_equals by using unsigned int and boolean comparison
  • test constant_time_equals for lengths differing by 256 and 512 bytes

Testing

  • scripts/run_tests.sh

https://chatgpt.com/codex/tasks/task_e_68b8ca8f0518832c9679c70e45fbd4fc

Initialize diff with boolean size comparison to avoid truncation when lengths differ by multiples of 256. Add tests covering 256- and 512-byte length mismatches.
@LimiNode
LimiNode merged commit 2f0dc3b into main Sep 3, 2025
4 checks passed
@LimiNode
LimiNode deleted the codex/update-diff-initialization-and-tests branch September 4, 2025 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant