gnark-crypto
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
-
✓DOI references
Found 6 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.9%) to scientific vocabulary
Keywords from Contributors
Repository
Basic Info
- Host: GitHub
- Owner: unionlabs
- License: apache-2.0
- Language: Go
- Default Branch: master
- Size: 33.7 MB
Statistics
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
gnark-crypto
gnark-crypto provides efficient cryptographic primitives, in Go:
- Elliptic curve cryptography & Pairing on:
field/goff- Finite field arithmetic code generator (blazingly fast big.Int)fft- Fast Fourier Transformfri- FRI (multiplicative) commitment schemefiatshamir- Fiat-Shamir transcript buildermimc- MiMC hash function using Miyaguchi-Preneel constructionkzg- KZG commitment schemepermutation- Permutation proofsplookup- Plookup proofseddsa- EdDSA signatures (on the companiontwistededwardscurves)
gnark-crypto is actively developed and maintained by the team (gnark@consensys.net | HackMD) behind:
Warning
gnark-crypto is not fully audited and is provided as-is, use at your own risk. In particular, gnark-crypto makes no security guarantees such as constant time implementation or side-channel attack resistance.
To report a security bug, please refer to gnark Security Policy.
gnark-crypto packages are optimized for 64bits architectures (x86 amd64) and tested on Unix (Linux / macOS).
Getting started
Go version
gnark-crypto is tested with the last 2 major releases of Go (currently 1.19 and 1.20).
Install gnark-crypto
bash
go get github.com/consensys/gnark-crypto
Note that if you use go modules, in go.mod the module path is case sensitive (use consensys and not ConsenSys).
Development
Most (but not all) of the code is generated from the templates in internal/generator.
The generated code contains little to no interfaces and is strongly typed with a field (generated by the gnark-crypto/field package). The two main factors driving this design choice are:
- Performance:
gnark-cryptoalgorithms manipulate millions (if not billions) of field elements. Interface indirection at this level, plus garbage collection indexing takes a heavy toll on perf. - Need to derive (mostly) identical code for various moduli and curves, with consistent APIs. Generics introduce significant performance overhead and are not yet suited for high performance computing.
To regenerate the files, see internal/generator/main.go. Run:
bash
go generate ./...
Benchmarks
Benchmarking pairing-friendly elliptic curves libraries
The libraries are implemented in different languages and some use more assembly code than others. Besides the different algorithmic and software optimizations used across, it should be noted also that some libraries target constant-time implementation for some operations making it de facto slower. However, it can be clear that consensys/gnark-crypto is one of the fastest pairing-friendly elliptic curve libraries to be used in zkp projects with different curves.
Citing
If you use gnark-crypto in your research a citation would be appreciated.
Please use the following BibTeX to cite the most recent release.
bib
@software{gnark-crypto-v0.11.2,
author = {Gautam Botrel and
Thomas Piellard and
Youssef El Housni and
Arya Tabaie and
Gus Gutoski and
Ivo Kubjas},
title = {ConsenSys/gnark-crypto: v0.11.2},
month = jan,
year = 2023,
publisher = {Zenodo},
version = {v0.11.2},
doi = {10.5281/zenodo.5815453},
url = {https://doi.org/10.5281/zenodo.5815453}
}
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the Apache 2 License - see the LICENSE file for details.
Owner
- Name: Union
- Login: unionlabs
- Kind: organization
- Location: United States of America
- Website: union.build
- Repositories: 59
- Profile: https://github.com/unionlabs
Citation (CITATION.bib)
@software{gnark-crypto-v0.7,
author = {Gautam Botrel and
Thomas Piellard and
Youssef El Housni and
Arya Tabaie and
Ivo Kubjas},
title = {ConsenSys/gnark-crypto: v0.7.0},
month = jan,
year = 2022,
publisher = {Zenodo},
version = {v0.7.0},
doi = {10.5281/zenodo.5815453},
url = {https://doi.org/10.5281/zenodo.5815453}
}
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Gautam Botrel | g****l@g****m | 529 |
| Arya Tabaie | a****e@g****m | 454 |
| Youssef El Housni | y****1@g****m | 328 |
| Thomas Piellard | t****d@c****t | 298 |
| Gus Gutoski | g****i@p****m | 99 |
| Ivo Kubjas | i****s@c****t | 21 |
| Ignacio Hagopian | j****y@g****m | 12 |
| AlexandreBelling | a****8@g****m | 9 |
| Justin Traglia | 9****a | 8 |
| SherLzp | l****r@g****m | 2 |
| Ömer Faruk IRMAK | o****k@g****m | 2 |
| Hussein Ait Lahcen | h****n@g****m | 2 |
| Anshul Yadav | 5****u | 1 |
| Antonio Sanso | a****o@g****m | 1 |
| Gavin | 3****U | 1 |
| omahs | 7****s | 1 |
| 徐志强 | 6****0@q****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v4 composite
- actions/setup-go v4 composite
- golangci/golangci-lint-action v3 composite
- gotesttools/gotestfmt-action v2 composite
- slackapi/slack-github-action v1.24.0 composite
- thollander/actions-comment-pull-request v2 composite
- actions/checkout v4 composite
- actions/setup-go v4 composite
- golangci/golangci-lint-action v3 composite
- gotesttools/gotestfmt-action v2 composite
- slackapi/slack-github-action v1.24.0 composite
- github.com/bits-and-blooms/bitset v1.7.0
- github.com/consensys/bavard v0.1.13
- github.com/davecgh/go-spew v1.1.1
- github.com/inconshreveable/mousetrap v1.0.0
- github.com/kr/pretty v0.3.1
- github.com/leanovate/gopter v0.2.9
- github.com/mmcloughlin/addchain v0.4.0
- github.com/pmezard/go-difflib v1.0.0
- github.com/spf13/cobra v1.5.0
- github.com/spf13/pflag v1.0.5
- github.com/stretchr/testify v1.8.2
- golang.org/x/crypto v0.10.0
- golang.org/x/sys v0.9.0
- gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
- gopkg.in/yaml.v2 v2.4.0
- gopkg.in/yaml.v3 v3.0.1
- rsc.io/tmplfunc v0.0.3
- github.com/bits-and-blooms/bitset v1.7.0
- github.com/consensys/bavard v0.1.13
- github.com/cpuguy83/go-md2man/v2 v2.0.2
- github.com/creack/pty v1.1.9
- github.com/davecgh/go-spew v1.1.0
- github.com/davecgh/go-spew v1.1.1
- github.com/google/subcommands v1.2.0
- github.com/inconshreveable/mousetrap v1.0.0
- github.com/kr/pretty v0.2.1
- github.com/kr/pretty v0.3.1
- github.com/kr/pty v1.1.1
- github.com/kr/text v0.1.0
- github.com/kr/text v0.2.0
- github.com/leanovate/gopter v0.2.9
- github.com/mmcloughlin/addchain v0.4.0
- github.com/mmcloughlin/profile v0.1.1
- github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e
- github.com/pmezard/go-difflib v1.0.0
- github.com/rogpeppe/go-internal v1.9.0
- github.com/russross/blackfriday/v2 v2.1.0
- github.com/spf13/cobra v1.5.0
- github.com/spf13/pflag v1.0.5
- github.com/stretchr/objx v0.1.0
- github.com/stretchr/objx v0.4.0
- github.com/stretchr/objx v0.5.0
- github.com/stretchr/testify v1.7.1
- github.com/stretchr/testify v1.8.0
- github.com/stretchr/testify v1.8.2
- golang.org/x/crypto v0.10.0
- golang.org/x/sys v0.9.0
- gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
- gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
- gopkg.in/yaml.v2 v2.4.0
- gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
- gopkg.in/yaml.v3 v3.0.1
- rsc.io/tmplfunc v0.0.3