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

fix: fix base64url conversion #49

Merged
merged 4 commits into from Oct 11, 2022
Merged

fix: fix base64url conversion #49

merged 4 commits into from Oct 11, 2022

Conversation

Steven0351
Copy link
Member

The existing base64url conversion to base64 is unsound. The current operation as it exists uses the remainder as the padding amount, which means that padding could be potentially over applied. This has not occurred because it appears that our signature of the data has always had a remainder of 2. I assume this is the case because the size of the data we're signing itself is always the same regardless of the key, but if that changes then the current implementation will cause a crash.

@Steven0351 Steven0351 merged commit 995fb4b into main Oct 11, 2022
@Steven0351 Steven0351 deleted the fix-base64url-conversion branch October 11, 2022 17:27
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.

None yet

3 participants