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

Don't drop leading zeroes when performing generic ecdsa signing #357

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

mwielgoszewski
Copy link
Contributor

As @mjg59 pointed out in #298, this implementation breaks signing when the digest leads with a zero byte.

To fix this, call ret.FillBytes() instead of ret.Bytes() to preserve leading zeroes that may have been dropped when converting the digest to an integer.

call ret.FillBytes() instead of ret.Bytes() to preserve leading zeroes that may have been dropped when converting the digest to an integer
@mjg59
Copy link
Collaborator

mjg59 commented Nov 9, 2023

Verified this fixes our issue

@brandonweeks
Copy link
Member

Thank you testing Matthew!

@brandonweeks brandonweeks merged commit a3545df into google:master Nov 9, 2023
8 checks passed
hslatman pushed a commit to smallstep/go-attestation that referenced this pull request Oct 10, 2024
…le#357)

call ret.FillBytes() instead of ret.Bytes() to preserve leading zeroes that may have been dropped when converting the digest to an integer
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