Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Precompile: 0x01 ecRecover #318

Closed
ChihChengLiang opened this issue Nov 23, 2022 · 3 comments · Fixed by #495
Closed

Precompile: 0x01 ecRecover #318

ChihChengLiang opened this issue Nov 23, 2022 · 3 comments · Fixed by #495
Assignees

Comments

@ChihChengLiang
Copy link
Collaborator

No description provided.

@ed255
Copy link
Member

ed255 commented Nov 23, 2022

For this precompile we should leverage on the work done in halo2wrong: the ECDSA verification: https://github.com/privacy-scaling-explorations/halo2wrong/blob/63bde545d934e69c806ef9bc8b18f03f6ec0fe8e/ecdsa/src/ecdsa.rs#L91

The linked ECDSA verification circuit only passes the constraints when the verification succeeds. In ecRecover an invalid signature can be used, so the verification circuit will need to be modified to support invalid signatures as well.

@ed255 ed255 moved this to 🆕 Product Backlog Items in zkEVM Community Edition Nov 24, 2022
@ChihChengLiang
Copy link
Collaborator Author

ChihChengLiang commented Jul 5, 2023

@KimiWu123 KimiWu123 added this to the Feature Completeness milestone Oct 13, 2023
@KimiWu123 KimiWu123 moved this from 🆕 Product Backlog Items to 📋 Sprint Focus in zkEVM Community Edition Oct 13, 2023
@KimiWu123 KimiWu123 moved this from 📋 Sprint Focus to 🏗 In progress in zkEVM Community Edition Oct 13, 2023
@KimiWu123 KimiWu123 self-assigned this Oct 13, 2023
@KimiWu123 KimiWu123 moved this from 🏗 In progress to 📋 Sprint Focus in zkEVM Community Edition Oct 13, 2023
@KimiWu123 KimiWu123 moved this from 📋 Sprint Focus to Milestone Tasks in zkEVM Community Edition Oct 13, 2023
@KimiWu123 KimiWu123 removed their assignment Oct 13, 2023
@KimiWu123 KimiWu123 moved this from Milestone Tasks to 🏗 In progress in zkEVM Community Edition Oct 16, 2023
@KimiWu123 KimiWu123 self-assigned this Oct 16, 2023
@KimiWu123 KimiWu123 moved this from 🏗 In progress to 👀 In review in zkEVM Community Edition Oct 23, 2023
KimiWu123 added a commit that referenced this issue Oct 27, 2023
* doc: ecRecover.md spec file

* doc: signature circuit, copied from Sroll's design and revisted to fit our architecture

* feat: impl. sig_circuit

* test: add more cases

* feat: add sig_table

* doc: complete constraints desc.

* feat: impl. ecRecover

* test: add a normal case

* test: complete testing

* feat: remove rlc usage in sig circuit

* feat: correct public key to little-endian

* fix: is_success is always true and using iz_zero gadget for sig_r/v

* test: fix testing data

* fix return data length when the addr is not recoverable

* doc: refinement
@KimiWu123 KimiWu123 moved this from 👀 In review to ✅ Done in zkEVM Community Edition Oct 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants