Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

gnark

> 编程语言
Open source

gnark is a fast zk-SNARK library that offers a high-level API to design circuits. The library is open source and developed under the Apache 2.0 license

1.7K stars0 likes0 views
WebsiteGitHub

About

gnark is a fast zk-SNARK library that offers a high-level API to design circuits. The library is open source and developed under the Apache 2.0 license

gnark zk-SNARK library

High-performance zk-SNARKs in Go.

gnark provides a high-level API to define circuits, then compile, prove, and verify with production-grade proving systems. It is open-source under Apache 2.0 and uses gnark-crypto for field arithmetic and cryptographic primitives.

gnark powers Linea zk-rollup. Include your project in known users by opening a PR.

Why gnark

  • Circuit development in idiomatic Go
  • Fast proving and verification backends
  • Reusable standard gadgets in std/
  • Active security and regression testing culture

Useful Links

  • gnark User Documentation
  • gnark Playground
  • gnark Issues
  • gnark Benchmarks
  • gnark-announce - release and security announcements

Quick Start

Requirements

  • Go 1.25+ (module target: go 1.25.7)

Install

bash
go get github.com/consensys/gnark@latest

Run an example

bash
go run ./examples/cubic

To design your first circuit, follow the tutorial in gnark User Documentation.

Supported Proving Systems and Curves

gnark currently supports:

  • Groth16
  • PLONK

on the following curves:

  • BN254
  • BLS12-381
  • BLS12-377
  • BW6-761

Notes:

  • Solidity verifier export support is curve-dependent (BN254 is the primary target).
  • Serialized formats are not guaranteed to be stable across versions.

GPU Acceleration (Experimental)

gnark includes experimental GPU acceleration through Ingonyama's ICICLE backend for Groth16 on:

  • BN254
  • BLS12-377
  • BLS12-381
  • BW6-761

See accelerated backend documentation and the ICICLE repository.

Example Circuit

The circuit below encodes x**3 + x + 5 == y.

…

Security

gnark and gnark-crypto have been extensively audited, but are provided as-is with no guarantees or warranties. In particular, gnark does not guarantee constant-time implementations or side-channel resistance.

Report vulnerabilities via Security Policy. Do not open public issues for security reports.

Published advisories are listed here.

Testing

CI runs formatting, generated-file, lint, and test checks on pull requests and pushes.

Common local commands:

bash
go test -short ./...
go test -tags=release_checks,solccheck .
go test -tags=prover_checks ./test/... ./examples/...
go test -run=NONE -fuzz=FuzzIntcomp -fuzztime=30s ./internal/backend/ioutils
go generate ./...

Audits

  • Kudelski Security - October 2022 - gnark-crypto (contracted by Algorand Foundation)
  • Sigma Prime - May 2024 - gnark-crypto KZG (contracted by Ethereum Foundation)
  • Consensys Diligence - June 2023 - gnark PLONK Solidity verifier
  • LeastAuthority - August 2023 - gnark Groth16 Solidity verifier template (contracted by Worldcoin)
  • OpenZeppelin - November 2023 - gnark PLONK Solidity verifier template
  • ZKSecurity.xyz - May 2024 - gnark standard library
  • OpenZeppelin - June 2024 - gnark PLONK prover and verifier
  • LeastAuthority - September 2024 - gnark general and GKR
  • LeastAuthority - November 2024 - Linea zkEVM

Release Notes

See CHANGELOG.md.

Citing

If you use gnark in research, please cite the latest release:

bib
@software{gnark-v0.16.3,
  author       = {Gautam Botrel and
                  Thomas Piellard and
                  Youssef El Housni and
                  Ivo Kubjas and
                  Arya Tabaie and
                  Yao J. Galteland},
  title        = {Consensys/gnark: v0.16.3},
  month        = aug,
  year         = 2026,
  publisher    = {Zenodo},
  version      = {v0.16.3},
  doi          = {10.5281/zenodo.5819104},
  url          = {https://doi.org/10.5281/zenodo.5819104}
}

Contributing

See CONTRIBUTING.md and CODE_OF_CONDUCT.md.

Versioning

gnark follows SemVer. Available versions are in tags.

License

Licensed under Apache 2.0 (see LICENSE).

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gognarkgolangplonkr1cs

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言