{"id":13566179,"url":"https://github.com/arkworks-rs/algebra","last_synced_at":"2025-05-12T15:33:06.156Z","repository":{"id":37313776,"uuid":"293619764","full_name":"arkworks-rs/algebra","owner":"arkworks-rs","description":"Libraries for finite field, elliptic curve, and polynomial arithmetic","archived":false,"fork":false,"pushed_at":"2025-05-02T13:36:37.000Z","size":4013,"stargazers_count":720,"open_issues_count":193,"forks_count":301,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-05-02T14:57:48.043Z","etag":null,"topics":["cryptography","elliptic-curves","finite-fields","pairings","polynomials","rust"],"latest_commit_sha":null,"homepage":"https://arkworks.rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arkworks-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-07T19:54:55.000Z","updated_at":"2025-05-02T13:36:41.000Z","dependencies_parsed_at":"2023-10-27T02:35:24.114Z","dependency_job_id":"c2902e21-ba14-47e6-b4f1-fad53d179ab1","html_url":"https://github.com/arkworks-rs/algebra","commit_stats":{"total_commits":805,"total_committers":95,"mean_commits":8.473684210526315,"dds":0.7217391304347827,"last_synced_commit":"9ce33e6ef1368a0f5b01b91e6df5bc5877129f30"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkworks-rs%2Falgebra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkworks-rs%2Falgebra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkworks-rs%2Falgebra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkworks-rs%2Falgebra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arkworks-rs","download_url":"https://codeload.github.com/arkworks-rs/algebra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253766113,"owners_count":21960846,"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":["cryptography","elliptic-curves","finite-fields","pairings","polynomials","rust"],"created_at":"2024-08-01T13:02:03.836Z","updated_at":"2025-05-12T15:33:06.132Z","avatar_url":"https://github.com/arkworks-rs.png","language":"Rust","funding_links":[],"categories":["Rust","Rust fundamentals"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003earkworks::algebra\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/arkworks-rs/algebra/workflows/CI/badge.svg?branch=master\"\u003e\n    \u003ca href=\"https://github.com/arkworks-rs/algebra/blob/master/LICENSE-APACHE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-APACHE-blue.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/arkworks-rs/algebra/blob/master/LICENSE-MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://deps.rs/repo/github/arkworks-rs/algebra\"\u003e\u003cimg src=\"https://deps.rs/repo/github/arkworks-rs/algebra/status.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://discord.gg/UNtS7QXyPk\"\u003e\u003cimg src=\"https://img.shields.io/discord/908465643727253524?label=Discord\u0026logo=discord\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThe arkworks ecosystem consist of Rust libraries for designing and working with *zero knowledge succinct non-interactive arguments (zkSNARKs)*. This repository contains efficient implementations of the key algebraic components underlying zkSNARKs: finite fields, elliptic curves, and polynomials.\n\nThis library is released under the MIT License and the Apache v2 License (see [License](#license)).\n\n**WARNING:** This is an academic proof-of-concept prototype, and in particular has not received careful code review. This implementation is NOT ready for production use.\n\n## Directory structure\n\nThis repository contains several Rust crates:\n\n* [`ark-ff`](ff): Generic abstractions for, and implementations of various kinds of finite fields\n* [`ark-ec`](ec): Generic abstractions for prime-order groups, and implementations of various kinds of (pairing-friendly and standard) elliptic curves\n* [`ark-poly`](poly): Interfaces for univariate, multivariate, and multilinear polynomials, and FFTs over finite fields\n* [`ark-serialize`](serialize): Efficient interfaces for serialization and point compression for finite fields and elliptic curves\n\nIn addition, the [`curves`](https://github.com/arkworks-rs/algebra/tree/master/curves) repository contains concrete implementations of popular elliptic curves; see [here](https://github.com/arkworks-rs/algebra/blob/master/curves/README.md) for details.\n\n## Build guide\n\nThe library compiles on the `stable` toolchain of the Rust compiler (v 1.51+). To install the latest version of Rust, first install `rustup` by following the instructions [here](https://rustup.rs/), or via your platform's package manager. Once `rustup` is installed, install the Rust toolchain by invoking:\n\n```bash\nrustup install stable\n```\n\nAfter that, use `cargo`, the standard Rust build tool, to build the libraries:\n\n```bash\ngit clone https://github.com/arkworks-rs/algebra.git\ncd algebra\ncargo build --release\n```\n\n## Tests\n\nThis library comes with comprehensive unit and integration tests for each of the provided crates. Run the tests with:\n\n```bash\ncargo test --all\n```\n\n## Benchmarks\n\nTo run the benchmarks, install the nightly Rust toolchain, via `rustup install nightly`, and then run the following command:\n\n```bash\ncargo +nightly bench\n```\n\n## Assembly backend for field arithmetic\n\nThe `ark-ff` crate contains (off-by-default) optimized assembly implementations of field arithmetic that rely on the `adcxq`, `adoxq` and `mulxq` instructions. These are available on most `x86_64` platforms (Broadwell onwards for Intel and Ryzen onwards for AMD). Using this backend can lead to a 30-70% speedup in finite field and elliptic curve arithmetic. To build with this backend enabled, run the following command:\n\n```bash\nRUSTFLAGS=\"-C target-feature=+bmi2,+adx\" cargo [test/build/bench] --features asm\n```\n\nTo enable this in the `Cargo.toml` of your own projects, enable the `asm` feature flag:\n\n```toml\nark-ff = { version = \"0.4\", features = [ \"asm\" ] }\n```\n\nNote that because inline assembly support in Rust is currently unstable, using this backend requires using the Nightly compiler at the moment.\n\n## License\n\nThe crates in this repository are licensed under either of the following licenses, at your discretion.\n\n* Apache License Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or [apache.org license link](http://www.apache.org/licenses/LICENSE-2.0))\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or [opensource.org license link](http://opensource.org/licenses/MIT))\n\nUnless you explicitly state otherwise, any contribution submitted for inclusion in this library by you shall be dual licensed as above (as defined in the Apache v2 License), without any additional terms or conditions.\n\n[zexe]: https://ia.cr/2018/962\n\n## Acknowledgements\n\nThis work was supported by:\na Google Faculty Award;\nthe National Science Foundation;\nthe UC Berkeley Center for Long-Term Cybersecurity;\nand donations from the Ethereum Foundation, the Interchain Foundation, and Qtum.\n\nAn earlier version of this library was developed as part of the paper *\"[ZEXE: Enabling Decentralized Private Computation][zexe]\"*.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkworks-rs%2Falgebra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farkworks-rs%2Falgebra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkworks-rs%2Falgebra/lists"}