{"id":13767400,"url":"https://github.com/AmadiMichael/p256-verifier-huff","last_synced_at":"2025-05-10T22:31:49.019Z","repository":{"id":200866072,"uuid":"705896221","full_name":"AmadiMichael/p256-verifier-huff","owner":"AmadiMichael","description":"Hyper-Optimised Secp256r1/P256 Verifier Huff Implementation ","archived":false,"fork":false,"pushed_at":"2023-12-22T08:35:09.000Z","size":339,"stargazers_count":26,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-28T16:21:39.806Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmadiMichael.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-16T22:59:01.000Z","updated_at":"2024-05-13T05:05:36.000Z","dependencies_parsed_at":"2024-01-11T23:50:31.104Z","dependency_job_id":null,"html_url":"https://github.com/AmadiMichael/p256-verifier-huff","commit_stats":null,"previous_names":["amadimichael/p256-verifier-huff"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmadiMichael%2Fp256-verifier-huff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmadiMichael%2Fp256-verifier-huff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmadiMichael%2Fp256-verifier-huff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmadiMichael%2Fp256-verifier-huff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmadiMichael","download_url":"https://codeload.github.com/AmadiMichael/p256-verifier-huff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492529,"owners_count":21916959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T16:01:08.317Z","updated_at":"2025-05-10T22:31:46.782Z","avatar_url":"https://github.com/AmadiMichael.png","language":"Solidity","funding_links":[],"categories":["Huff projects you can learn from and contribute to"],"sub_categories":[],"readme":"## P256 Curve Verifier Huff implementation\n\nSecp256r1 (a.k.a p256) curve signature verifier rewritten and optimized in [Huff Language](https://huff.sh). This was greatly inspired by [dcposch's](https://github.com/dcposch) and [nalinbhardwaj's](https://github.com/nalinbhardwaj) implementation [here](https://github.com/daimo-eth/p256-verifier/blob/master/src/P256Verifier.sol) and [pcaversaccio's](https://github.com/pcaversaccio) Vyper implementation [here](https://github.com/pcaversaccio/p256-verifier-vyper/blob/main/src/P256Verifier.vy). Also, for more technical details, please refer to [EIP-7212](https://eips.ethereum.org/EIPS/eip-7212).\n\n    This is experimental software and is provided on an \"as is\" and \"as available\" basis. We do not give any warranties and will not be liable for any losses incurred through any use of this code base.\n\n## Gas Benchmark\n\n| Implementation               | Min gas | Avg gas | Max gas | OnChain Address                            | Available Networks                         |\n| ---------------------------- | ------- | ------- | ------- | ------------------------------------------ | ------------------------------------------ |\n| FCL Solidity P256 Verifier   |         |         | 227,000 | 0xE9399D1183a5cf9E14B120875A616b6E2bcB840a | Polygon(M), Sepolia, Base, OP, Linea       |\n| Huff P256 Verifier           | 228,475 | 239,164 | 249,574 | 0x00000083Ea3aBb243c4acfDB095DB5aD5A606fc5 | Goerli, Sepolia, Base Goerli, Base Sepolia |\n| Daimo Solidity P256 Verifier | 319,943 | 333,892 | 347,505 | 0xc2b78104907F722DABAc4C69f826a522B2754De4 | Mainnet, Base(T)                           |\n| Vyper P256 Verifier          |         |         |         | 0xD99D0f622506C2521cceb80B78CAeBE1798C7Ed5 | Goerli, Sepolia, Holesky                   |\n\n### Networks deployed to\n\n- Goerli: [0x00000083Ea3aBb243c4acfDB095DB5aD5A606fc5](https://goerli.etherscan.io/address/0x00000083Ea3aBb243c4acfDB095DB5aD5A606fc5)\n- Sepolia: [0x00000083Ea3aBb243c4acfDB095DB5aD5A606fc5](https://sepolia.etherscan.io/address/0x00000083Ea3aBb243c4acfDB095DB5aD5A606fc5)\n- Base Goerli: [0x00000083Ea3aBb243c4acfDB095DB5aD5A606fc5](https://sepolia.basescan.org//address/0x00000083Ea3aBb243c4acfDB095DB5aD5A606fc5)\n- Base Goerli: [0x00000083Ea3aBb243c4acfDB095DB5aD5A606fc5](https://goerli.basescan.org//address/0x00000083Ea3aBb243c4acfDB095DB5aD5A606fc5)\n\n## Actions\n\nTo regenerate test vectors:\n\n```\ncd test-vectors\nnpm i\n\n# Download, extract, clean test vectors\n# This regenerates ../test/vectors.jsonl\nnpm run generate_wycheproof\n\n# Validate that all vectors produce expected results with SubtleCrypto and noble library implementation\nnpm test\n\n# Validate that all vectors also work with EIP-7212\n# Test the fallback contract...\ncd ..\nforge test -vvv\n\n# In future, execution spec and clients can test against the same clean vectors\n```\n\n### Further References\n\n- Daimo's GitHub Repository: [daimo-eth/p256-verifier](https://github.com/daimo-eth/p256-verifier)\n- Daimo's Blog: [blog/p256verifier](https://daimo.xyz/blog/p256verifier)\n- Daimo's Website: [p256.eth.limo](https://p256.eth.limo/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAmadiMichael%2Fp256-verifier-huff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAmadiMichael%2Fp256-verifier-huff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAmadiMichael%2Fp256-verifier-huff/lists"}