Skip to content

feat(utils): add constant-time token comparison - #22

Merged
LimiNode merged 1 commit into
mainfrom
codex/add-constant-time-equals-utility
Sep 3, 2025
Merged

feat(utils): add constant-time token comparison#22
LimiNode merged 1 commit into
mainfrom
codex/add-constant-time-equals-utility

Conversation

@LimiNode

@LimiNode LimiNode commented Sep 3, 2025

Copy link
Copy Markdown
Owner

Summary

  • add constant_time_equals for byte-wise string comparison without early exit
  • use constant_time_equals in token validation routines

Testing

  • g++ -std=c++17 test_all.cpp hmac.cpp hmac_utils.cpp sha1.cpp sha256.cpp sha512.cpp -lgtest -lgtest_main -lpthread -o test_all && ./test_all

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

Introduce constant_time_equals for byte-wise string checks and use it in token validation to avoid early exit.
@LimiNode
LimiNode merged commit 56e415c into main Sep 3, 2025
4 checks passed
@LimiNode
LimiNode deleted the codex/add-constant-time-equals-utility 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