/gnark-ptau

Golang package to convert a SnarkJS powers-of-tau (.ptau) file to a Gnark-compatible KZG SRS on the bn254 curve

Primary LanguageGoApache License 2.0Apache-2.0

gnark-ptau

Golang library + utility for converting from SnarkJS ptau files to a gnark kzg.SRS.

Usage

  1. Generate or download a .ptau file using the SnarkJS instructions.
  2. Install ptau2gnark:
    go install github.com/mdehoog/gnark-ptau/cmd/ptau2gnark@latest
  3. Convert the .ptau file to a gnark kzg.SRS:
    ptau2gnark <path to .ptau file> <path to output .srs file>
  4. Use the kzg.SRS in your gnark circuit:
    var k kzg.SRS
    srs, _ := os.Open("<path to output .srs file>")
    _, err = k.ReadFrom(srs)