-
Notifications
You must be signed in to change notification settings - Fork 301
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
Update ECDSA signer with bb signature once fixed #913
Comments
The signing code for ecdsa signatures uses a third party package as the equivalent in bb does not currently work . Once bb is fixed this should be changed. This code is in
|
The issue we ran into with touchid verification was that Noir expected signatures to be just on one side of the curve, to prevent malleability attacks. So we had to manually invert the signature before passing it. This was the code snippet, which should work the same here as long as you change the prime to the one from the secp256k1 curve. Assuming this is the issue, of course.
Here's more info about the malleability issue. |
# Description resolves #913 Detailed hackmd: https://hackmd.io/9QRzytElQE2sMLf4S7qR1A?view TLDR: ECDSA signing in bberg and verification in noir has a minor "difference". Signature construction and verification should operate consistently on the message. <img width="445" alt="image" src="https://github.com/AztecProtocol/aztec-packages/assets/19621621/b845ab1c-44ca-49ea-932d-ed05ed51b204"> <img width="567" alt="image" src="https://github.com/AztecProtocol/aztec-packages/assets/19621621/5ae6fd8d-4a64-4196-973c-ffc45bfd10cf"> The noir ecdsa verification takes in the hashed message $z$ as an argument. So we need to hash the message before calling `std::ecdsa_secp256k1::verify_signature`. The reason this worked with the noble curves package was: in the noble package, the message is never hashed. It is used as is for signing a message. Therefore the noir-ecdsa-verify works as we don't need to hash the message in verification. # Checklist: - [x] I have reviewed my diff in github, line by line. - [x] Every change is related to the PR description. - [x] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to the issue(s) that it resolves. - [x] There are no unexpected formatting changes, superfluous debug logs, or commented-out code. - [x] The branch has been merged or rebased against the head of its merge target. - [x] I'm happy for the PR to be merged at the reviewer's next convenience.
No description provided.
The text was updated successfully, but these errors were encountered: