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: testing signature check #1243

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

crypto: testing signature check #1243

wants to merge 5 commits into from

Conversation

brennanjl
Copy link
Collaborator

@brennanjl brennanjl commented Jan 17, 2025

Trying to help luke debug something.

Based on #1231

CC @KwilLuke

@brennanjl brennanjl marked this pull request as draft January 17, 2025 06:31
@brennanjl
Copy link
Collaborator Author

Just an FYI, it appears that our personal sign authenticator does not match the previous functionality.

Previously, it would ignore the 65th byte (the recovery ID). It no longer does this. This caused the JS SDK to break.

I've left this in draft because this was just to diagnose the issue. We can discuss more tomorrow.

Comment on lines +72 to +75
if signature[ethCrypto.RecoveryIDOffset] == 27 ||
signature[ethCrypto.RecoveryIDOffset] == 28 {
// Transform yellow paper V from 27/28 to 0/1
signature[ethCrypto.RecoveryIDOffset] -= 27
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is what is missing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although modifying the input slice is probably not good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed to 8f5cff3 with tests. Did this work for @KwilLuke ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KwilLuke once you verify that Jon's fix works will you close this PR?

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