Skip to content

chore: add ECDSA support to the aztec3-hacky branch#1396

Merged
sirasistant merged 2 commits intonoir-lang:aztec3-hackyfrom
spalladino:aztec3-hacky-ecdsa
May 31, 2023
Merged

chore: add ECDSA support to the aztec3-hacky branch#1396
sirasistant merged 2 commits intonoir-lang:aztec3-hackyfrom
spalladino:aztec3-hacky-ecdsa

Conversation

@spalladino
Copy link
Copy Markdown
Contributor

Cherry-pick the commits needed for ECDSA support to the aztec3-hacky branch, so we can use it from Noir contracts in Aztec.

guipublic and others added 2 commits May 23, 2023 11:31
* Enable to_radix for any field element

* add integration test

* use proper bound during modulo (and small optimisation)

* update integration test
* Copy ECDSA from commit 92ef9b4

* rework for new syntax

* commit since github was down

* [NOT MERGEABLE] - Skip all tests except ecdsa

* change parameter order

* update flake.lock

* update test

* update flake.lock

* update flake.lock

* modify test

* add message + hashed_message to program

* remove underscore

* modify input to use low-S

* commit s variant 1

* commit variant S2

* modify s value in signature to value that passes in acvm/pwg

* update flake.lock

* remove if statement to make tests go faster

* cleanup test
@spalladino
Copy link
Copy Markdown
Contributor Author

Tagging @sirasistant

@spalladino spalladino changed the title Add ECDSA support to the aztec3-hacky branch chore: add ECDSA support to the aztec3-hacky branch May 24, 2023
@kevaundray
Copy link
Copy Markdown
Contributor

Clippy errors originate from the branch itself, so this is fine.


For reference + context; ECDSA was broken in the barretenberg backend and recently got fixed.

Since it is not a Noir only error, we will also need to point to the version of barretenberg that introduces this fix. This is likely why the tests won't pass.

We also cannot point to the latest barretenberg because I think this includes breaking changes between the version that the hacky branch points to and the version with the ECDSA fix.

It is definitely possible to patch an old version of barretenberg too and point to a branch in barretenberg, let me know if this is something you wish to pursue

@spalladino
Copy link
Copy Markdown
Contributor Author

spalladino commented May 24, 2023

FWIW ECDSA is working fine here using this branch!

@kevaundray
Copy link
Copy Markdown
Contributor

FWIW ECDSA is working fine here using this branch!

Oh thanks for the correction :)

I'm not quite sure why this works then since I also had to make a change in barretenberg too to make the verifier not panic + a few other miscellaneous fixes by Zac. If it's working on your end for the hacky branch though, then please feel free to ignore me :)

@spalladino
Copy link
Copy Markdown
Contributor Author

My guess is @sirasistant magic 🪄

@sirasistant
Copy link
Copy Markdown
Contributor

Every feature that we can add to the hacky branch is welcome :D

@sirasistant sirasistant merged commit 4e1560c into noir-lang:aztec3-hacky May 31, 2023
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.

4 participants