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

crypto.ecdsa: fix handling sign with custom_hash #23619

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

blackshirt
Copy link
Contributor

@blackshirt blackshirt commented Jan 31, 2025

This small PR following previously already merged PR in fix-no-hash commit.
The current handling with custom hash was still contains some bogus thing without additional test (sorry, its my bad).
Its resolved in the current PR, by the way with:

  • call .reset() on the custom hash before writing messages
  • previously, its not call .write() before .sum() ..its does not matching to expected result, when compared, for examples digest produced with sha256.sum256(message) directly. The equivalent of sum(message) was
_ := custom_hash.write(message)!
digest := custom_hash.sum([]u8{})
  • Add some test to verify expected behaviour

Thanks ...

Copy link

Connected to Huly®: V_0.6-22043

@spytheman spytheman merged commit e4d1011 into vlang:master Jan 31, 2025
68 checks passed
@blackshirt blackshirt deleted the fix-custom-hash branch February 3, 2025 02:39
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.

2 participants