gnark_ptau

package module
v0.0.0-...-bb5fe9a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

README

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)
    

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToSRS

func ToSRS(reader io.Reader) (*kzg.SRS, error)

ToSRS converts a SnarkJS PTAU file to a Gnark bn254 KZG SRS.

See https://github.com/iden3/snarkjs/blob/e44656d9e7b451250038211e44c1a7d80dd76b89/src/powersoftau_new.js#L20-L66.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL