{"repo":"colinnielsen/ecrecover-noir","free":true,"listed":false,"github":"https://github.com/colinnielsen/ecrecover-noir","clone":"git clone https://github.com/colinnielsen/ecrecover-noir.git","description":"A Noir circuit that mimics Solidity's ecrecover","language":"Noir","stars":66,"topics":["ecrecover","ethereum","noir","noir-lang","secp256k1","solidity","zk-snarks"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"ECRecover Noir This software is unaudited and should not be used in production. Use at your own risk. WARNING! DO NOT use versions of this library ECRecover Noir includes tools to help prove secp256k1 signatures (Ethereum's curve) in Noir Circuits. The goal of this lib is to have a function, which mimics the functionality of Solidity's ecrecover function, where given a hash and a signature , it returns the Ethereum address that signed the message. Unfortunately, for this naive implmentation we need the Ethereum account's full Public key (two concatenated 32byte x and y coordinates on the secp256k1 curve). An address's Public key is safe for public storage, and can actually be determined from any signed message, or an Etheruem transaction. See this section for a typescript helper. There are also inputs in the Prover.toml file for reference. A fully fledged ecrecover may be released in the future, but it would be an incredibly massive, unoptimized circuit. For now, this is a good starting point. Installation In your Nargo.toml file, add the following dependency: Simple Usage PubKey struct Behind the scenes, this library uses the PubKey struct to handle different operations in a module called secp256k1 . Definition Initialization PubKey::from xy(pub x: [u8; 32], pub y: [u8; 32]) - PubKey Initialize a PubKey struct using a the x and y coordinates of the public key: NOTE : given Nargo v0.6.0 , this is the most efficient initializer, and should be preferred. The other initializers ","default_branch":null,"files":null,"tree":[],"storefront":"/r/colinnielsen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/colinnielsen/ecrecover-noir/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}