{"id":51430490,"url":"https://github.com/oxarbitrage/pasta-formal","last_synced_at":"2026-07-05T03:30:42.906Z","repository":{"id":355604029,"uuid":"1226460273","full_name":"oxarbitrage/pasta-formal","owner":"oxarbitrage","description":"Formally verified Pasta curve definitions for Zcash in Lean 4","archived":false,"fork":false,"pushed_at":"2026-05-04T11:57:42.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-04T13:34:20.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxarbitrage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-01T12:31:40.000Z","updated_at":"2026-05-04T11:57:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/oxarbitrage/pasta-formal","commit_stats":null,"previous_names":["oxarbitrage/pasta-formal"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/oxarbitrage/pasta-formal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxarbitrage%2Fpasta-formal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxarbitrage%2Fpasta-formal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxarbitrage%2Fpasta-formal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxarbitrage%2Fpasta-formal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxarbitrage","download_url":"https://codeload.github.com/oxarbitrage/pasta-formal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxarbitrage%2Fpasta-formal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35142824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-07-05T03:30:42.202Z","updated_at":"2026-07-05T03:30:42.883Z","avatar_url":"https://github.com/oxarbitrage.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pasta-formal\n\n**Status:** Fully proven — zero `sorry` statements.\n\nLean 4 formalization of the Pasta curves (Pallas and Vesta) used in Zcash's Halo 2 proving system.\n\n## What's formalized\n\nBoth curves share the equation *y*² = *x*³ + 5, defined over distinct ~254-bit prime fields 𝔽_p (Pallas) and 𝔽_q (Vesta).\n\n- **Primality** of both field moduli, via Lucas test with hierarchical Pratt certificates (28 intermediate primes, 4 levels).\n- **`IsElliptic` instances** for both curves — discriminant Δ = −10800 is a unit in both fields.\n- **Cycle conjecture** (`Pasta/Cycle.lean`): `|Pallas(𝔽_p)| = q` and `|Vesta(𝔽_q)| = p` are stated as axioms. Proving these formally requires Schoof's point-counting algorithm, not yet available in Mathlib. The same result appears as `order_pallas` in [redpallas-formal](https://github.com/oxarbitrage/pasta-formal).\n- **CompElliptic bridge** (`Pasta/Bridge.lean`): proves our Pratt-certified field primes equal the constants in [CompElliptic](https://github.com/daira/CompElliptic) (`PALLAS_BASE_CARD`, `PALLAS_SCALAR_CARD`). This enables composition with the [Ironwood](https://github.com/zcash/ironwood) balance proof and the [Clean](https://github.com/Verified-zkEVM/clean) circuit verification, which both use CompElliptic for their Pallas/Vesta types.\n\n## Axioms\n\n| Axiom | Justification |\n|-------|--------------|\n| `cycle_conjecture_pallas` | Requires Schoof's algorithm — not in Mathlib |\n| `cycle_conjecture_vesta` | Same |\n\n## Build\n\n```shell\nlake build\n```\n\n## Dependencies\n\nLean 4 (`v4.30.0-rc2`), [Mathlib4](https://github.com/leanprover-community/mathlib4), [CompElliptic](https://github.com/daira/CompElliptic) (pinned to match [Ironwood](https://github.com/zcash/ironwood)).\n\n## References\n\n- [Zcash Protocol Spec §5.4.9.7](https://zips.z.cash/protocol/protocol.pdf)\n- [Halo 2 book](https://zcash.github.io/halo2/)\n- [pasta-hadeshash](https://github.com/zcash/pasta-hadeshash)\n\n---\n\n## Part of a series\n\nSix repositories formally verifying the Zcash Orchard cryptographic stack:\n\n| Layer | Repository |\n|-------|-----------|\n| Curves | [pasta-formal](https://github.com/oxarbitrage/pasta-formal) |\n| Hash | [poseidon-formal](https://github.com/oxarbitrage/poseidon-formal) |\n| Hash-to-curve | [sinsemilla-formal](https://github.com/oxarbitrage/sinsemilla-formal) |\n| Signatures | [redpallas-formal](https://github.com/oxarbitrage/redpallas-formal) |\n| Protocol | [orchard-formal](https://github.com/oxarbitrage/orchard-formal) |\n| Proof system | [halo2-formal](https://github.com/oxarbitrage/halo2-formal) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxarbitrage%2Fpasta-formal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxarbitrage%2Fpasta-formal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxarbitrage%2Fpasta-formal/lists"}