algebra
Libraries for finite field, elliptic curve, and polynomial arithmetic
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
8 of 96 committers (8.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Libraries for finite field, elliptic curve, and polynomial arithmetic
Basic Info
- Host: GitHub
- Owner: arkworks-rs
- License: apache-2.0
- Language: Rust
- Default Branch: master
- Homepage: https://arkworks.rs
- Size: 3.98 MB
Statistics
- Stars: 768
- Watchers: 22
- Forks: 339
- Open Issues: 183
- Releases: 1
Topics
Metadata Files
README.md
arkworks::algebra
The 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.
This library is released under the MIT License and the Apache v2 License (see License).
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.
Directory structure
This repository contains several Rust crates:
ark-ff: Generic abstractions for, and implementations of various kinds of finite fieldsark-ec: Generic abstractions for prime-order groups, and implementations of various kinds of (pairing-friendly and standard) elliptic curvesark-poly: Interfaces for univariate, multivariate, and multilinear polynomials, and FFTs over finite fieldsark-serialize: Efficient interfaces for serialization and point compression for finite fields and elliptic curves
In addition, the curves repository contains concrete implementations of popular elliptic curves; see here for details.
Build guide
The 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, or via your platform's package manager. Once rustup is installed, install the Rust toolchain by invoking:
bash
rustup install stable
After that, use cargo, the standard Rust build tool, to build the libraries:
bash
git clone https://github.com/arkworks-rs/algebra.git
cd algebra
cargo build --release
Tests
This library comes with comprehensive unit and integration tests for each of the provided crates. Run the tests with:
bash
cargo test --all
Benchmarks
To run the benchmarks, install the nightly Rust toolchain, via rustup install nightly, and then run the following command:
bash
cargo +nightly bench
Assembly backend for field arithmetic
The 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:
bash
RUSTFLAGS="-C target-feature=+bmi2,+adx" cargo [test/build/bench] --features asm
To enable this in the Cargo.toml of your own projects, enable the asm feature flag:
toml
ark-ff = { version = "0.4", features = [ "asm" ] }
Note that because inline assembly support in Rust is currently unstable, using this backend requires using the Nightly compiler at the moment.
License
The crates in this repository are licensed under either of the following licenses, at your discretion.
- Apache License Version 2.0 (LICENSE-APACHE or apache.org license link)
- MIT license (LICENSE-MIT or opensource.org license link)
Unless 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.
Acknowledgements
This work was supported by: a Google Faculty Award; the National Science Foundation; the UC Berkeley Center for Long-Term Cybersecurity; and donations from the Ethereum Foundation, the Interchain Foundation, and Qtum.
An earlier version of this library was developed as part of the paper "ZEXE: Enabling Decentralized Private Computation".
Owner
- Name: arkworks
- Login: arkworks-rs
- Kind: organization
- Website: arkworks.rs
- Twitter: arkworks_rs
- Repositories: 25
- Profile: https://github.com/arkworks-rs
An ecosystem for developing and programming with zkSNARKs
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - given-names: "arkworks contributors" title: "arkworks zkSNARK ecosystem" url: "https://github.com/arkworks-rs/"
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Pratyush Mishra | p****a@b****u | 228 |
| Marcin | m****4@p****m | 64 |
| jon-chuang | 9****g | 58 |
| Thomas Coratger | 6****r | 57 |
| Dev Ojha | V****n | 54 |
| Weikeng Chen | w****k@b****u | 53 |
| Jeff Burdges | b****s@g****g | 34 |
| Youssef El Housni | y****1@g****m | 30 |
| François Garillot | f****s@g****t | 25 |
| Ryan Lehmkuhl | r****b@g****m | 21 |
| dependabot[bot] | 4****] | 18 |
| Pascal Berrang | c****t@p****t | 16 |
| Michele Orrù | m****u@b****u | 13 |
| Kobi Gurkan | k****k@g****m | 13 |
| dependabot-preview[bot] | 2****] | 8 |
| debris | m****z@g****m | 7 |
| swasilyev | s****v@g****m | 5 |
| Achim Schneider | a****m@p****o | 5 |
| kevaundray | k****v@g****m | 4 |
| Howard Wu | h****u@b****u | 4 |
| drskalman | 3****n | 4 |
| Volker Mische | v****e@g****m | 4 |
| Victor Lopes | v****s@g****m | 4 |
| Sun | h****0@g****m | 4 |
| Carlos Pérez | 3****z | 4 |
| Andrew Milson | a****n | 4 |
| Alexander Wu | a****8@y****m | 4 |
| Michael Rosenberg | m****l@m****b | 4 |
| Yuncong Hu | h****h@g****m | 4 |
| Georgios Konstantopoulos | me@g****m | 3 |
| and 66 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 150
- Total pull requests: 440
- Average time to close issues: 5 months
- Average time to close pull requests: about 1 month
- Total issue authors: 78
- Total pull request authors: 106
- Average comments per issue: 2.11
- Average comments per pull request: 1.25
- Merged pull requests: 280
- Bot issues: 0
- Bot pull requests: 27
Past Year
- Issues: 23
- Pull requests: 213
- Average time to close issues: about 1 month
- Average time to close pull requests: 25 days
- Issue authors: 19
- Pull request authors: 57
- Average comments per issue: 0.35
- Average comments per pull request: 0.84
- Merged pull requests: 109
- Bot issues: 0
- Bot pull requests: 7
Top Authors
Issue Authors
- Pratyush (18)
- mmaker (10)
- burdges (9)
- mmagician (8)
- weikengchen (7)
- tcoratger (5)
- jon-chuang (4)
- hdvanegasm (4)
- swasilyev (3)
- E-Mans-Application (2)
- vaqxai (2)
- codeblooded1729 (2)
- vincenzoiovino (2)
- ggwpez (2)
- pronebird (2)
Pull Request Authors
- tcoratger (132)
- Pratyush (53)
- mmagician (46)
- dependabot[bot] (22)
- mmaker (11)
- weikengchen (10)
- github-actions[bot] (9)
- drskalman (7)
- burdges (7)
- zhiqiangxu (6)
- emberian (6)
- alireza-shirzad (5)
- GarmashAlex (5)
- vmx (4)
- VolodymyrBg (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 43
-
Total downloads:
- cargo 217,526,102 total
- Total docker downloads: 224,261,432
-
Total dependent packages: 829
(may contain duplicates) -
Total dependent repositories: 13,209
(may contain duplicates) - Total versions: 324
- Total maintainers: 3
crates.io: ark-ff
A library for finite fields
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ff/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-serialize
A library for serializing types in the arkworks ecosystem
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-serialize/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ec
A library for elliptic curves and pairings
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ec/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-poly
A library for efficient polynomial arithmetic via FFTs over finite fields
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-poly/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-bls12-381
The BLS12-381 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-bls12-381/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-bls12-377
The BLS12-377 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-bls12-377/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-bn254
The BN254 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-bn254/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ed-on-bls12-377
A Twisted Edwards curve defined over the scalar field of the BLS12-377 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ed-on-bls12-377/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-algebra-test-templates
A library for tests for finite fields, elliptic curves, and pairings
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-algebra-test-templates/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-serialize-derive
A library for deriving serialization traits for the arkworks ecosystem
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-serialize-derive/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/arkworks-rs/algebra
- Documentation: https://pkg.go.dev/github.com/arkworks-rs/algebra#section-documentation
- License: apache-2.0
-
Latest release: v0.5.0
published over 1 year ago
Rankings
crates.io: ark-ed-on-bls12-381
A Twisted Edwards curve defined over the scalar field of the BLS12-381 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ed-on-bls12-381/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-test-curves
A library for testing ark-ec & ark-poly
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-test-curves/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-bw6-761
The BW6-761 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-bw6-761/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-mnt4-753
The MNT4-753 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-mnt4-753/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-mnt6-753
The MNT6-753 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-mnt6-753/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ff-asm
A library for generating x86-64 assembly for finite field multiplication
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ff-asm/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ff-macros
A library for generating x86-64 assembly for finite field multiplication
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ff-macros/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-secp256k1
The secp256k1 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-secp256k1/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ed-on-bn254
A Twisted Edwards curve defined over the scalar field of the BN254 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ed-on-bn254/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-secp256r1
The secp256r1 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-secp256r1/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-algebra-bench-templates
A benchmark library for finite fields and elliptic curves
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-algebra-bench-templates/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-mnt4-298
The MNT4-298 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-mnt4-298/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-pallas
The Pallas prime-order elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-pallas/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-mnt6-298
The MNT6-298 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-mnt6-298/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ed-on-cp6-782
A Twisted Edwards curve defined over the scalar field of the CP6-782 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ed-on-cp6-782/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-cp6-782
The CP6-782 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-cp6-782/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-curve25519
The curve25519 Montgomery curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-curve25519/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ed-on-bls12-381-bandersnatch
Bandersnatch: a curve defined over the scalar field of the BLS12-381 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ed-on-bls12-381-bandersnatch/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ed25519
The ed25519 twisted Edwards curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ed25519/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ed-on-bw6-761
A Twisted Edwards curve defined over the scalar field of the BW6-761 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ed-on-bw6-761/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-secq256k1
The secq256k1 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-secq256k1/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-curve-constraint-tests
A library for testing constraints for finite fields, elliptic curves, and pairings
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-curve-constraint-tests/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-vesta
The Vesta prime-order elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-vesta/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ed-on-mnt4-298
A Twisted Edwards curve defined over the scalar field of the MNT4-298 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ed-on-mnt4-298/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-ed-on-mnt4-753
A Twisted Edwards curve defined over the scalar field of the MNT4-753 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-ed-on-mnt4-753/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: tfhe-ark-ec
A library for elliptic curves and pairings
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/tfhe-ark-ec/
- License: MIT OR Apache-2.0
-
Latest release: 0.4.2
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-secp384r1
The secp384r1 curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-secp384r1/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-bw6-767
The BW6-767 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-bw6-767/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: ark-grumpkin
The Grumpkin prime-order elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/ark-grumpkin/
- License: MIT OR Apache-2.0
-
Latest release: 0.5.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: tfhe-ark-ff
A library for finite fields
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/tfhe-ark-ff/
- License: MIT OR Apache-2.0
-
Latest release: 0.4.3
published over 1 year ago
Rankings
Maintainers (1)
crates.io: tfhe-ark-bls12-381
The BLS12-381 pairing-friendly elliptic curve
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/tfhe-ark-bls12-381/
- License: MIT/Apache-2.0
-
Latest release: 0.4.0
published over 1 year ago
Rankings
Maintainers (1)
crates.io: tfhe-ark-poly
A library for efficient polynomial arithmetic via FFTs over finite fields
- Homepage: https://arkworks.rs
- Documentation: https://docs.rs/tfhe-ark-poly/
- License: MIT OR Apache-2.0
-
Latest release: 0.4.2
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- ark-test-curves ^0.3.0 development
- hex 0.4 development
- libtest-mimic 0.4.0 development
- serde 1.0.110 development
- serde_derive 1.0.110 development
- serde_json 1.0.53 development
- sha2 0.10 development
- ark-ff ^0.3.0
- ark-poly ^0.3.0
- ark-serialize ^0.3.0
- ark-std ^0.3.0
- derivative 2
- hashbrown 0.12.1
- num-traits 0.2
- rayon 1
- zeroize 1
- ark-test-curves ^0.3.0 development
- blake2 0.10 development
- hex 0.4 development
- libtest-mimic 0.4.0 development
- serde 1.0.110 development
- serde_derive 1.0.110 development
- serde_json 1.0.53 development
- sha2 0.10 development
- sha3 0.10 development
- ark-ff-asm ^0.3.0
- ark-ff-macros ^0.3.0
- ark-serialize ^0.3.0
- ark-std ^0.3.0
- derivative 2
- digest 0.10
- num-bigint 0.4
- num-traits 0.2
- paste 1.0
- rayon 1
- zeroize 1
- ark-ff ^0.3.0
- ark-serialize ^0.3.0
- ark-std ^0.3.0
- derivative 2
- hashbrown 0.12.0
- rayon 1
- blake2 0.10 development
- sha2 0.10 development
- sha3 0.10 development
- ark-serialize-derive ^0.3.0
- ark-std ^0.3.0
- digest 0.10
- ark-algebra-test-templates ^0.3.0 development
- ark-serialize ^0.3.0 development
- ark-ec ^0.3.0
- ark-ff ^0.3.0
- ark-std ^0.3.0
- actions-rs/cargo v1 composite
- actions-rs/toolchain v1 composite
- actions/cache v3 composite
- actions/checkout v4 composite
- actions/checkout v1 composite
- actions/checkout v2 composite
- actions/checkout v2 composite
- github/super-linter/slim v4 composite
- actions/checkout v3 composite
- cargo-bins/release-pr v2 composite
- taiki-e/install-action v1 composite