multiproof

package module
v0.0.0-...-514ddfb Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0, MIT Imports: 9 Imported by: 0

README

go-ipa

go-ipa is a library of cryptographic primitives for Verkle Trees.

License Go Version

Table of Contents

Description

go-ipa implements the Verkle Tree cryptography spec with extra optimizations.

The includes:

  • Implementation of the Bandersnatch curve, and Banderwagon prime-order group.
  • Pedersen Commitment for vector commitments using precomputed tables.
  • Inner Product Argument prover and verifier implementations for polynomials in evaluation form.
  • Multiproof prover and verifier implementations.

Usage in Verkle Tree client libraries

It's extremely important that clients using this library for Verkle Tree implementations only use the following packages:

  • common for general utility functions.
  • banderwagon for the prime-order group.
  • ipa for proof generation and verification.

Do not use the bandersnatch package directly nor use unsafe functions to get into banderwagon internals. Doing so can create a security vulnerability in your implementation.

Test & Benchmarks

To run the tests and benchmarks, run the following commands:

$ go test ./...

To run the benchmarks:

go test ./... -bench=. -run=none -benchmem

Security

If you find any security vulnerability, please don't open a GH issue and contact repo owners directly.

LICENSE

MIT and Apache 2.0.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMultiProof

func CheckMultiProof(transcript *common.Transcript, ipaConf *ipa.IPAConfig, proof *MultiProof, Cs []*banderwagon.Element, ys []*fr.Element, zs []uint8) (bool, error)

CheckMultiProof verifies a multi-proof for several polynomials in evaluation form. The list of triplets (C, Y, Z) represents each polynomial commitment, evaluation result, and evaluation point in the domain.

Types

type MultiProof

type MultiProof struct {
	IPA ipa.IPAProof
	D   banderwagon.Element
}

MultiProof is a multi-proof for several polynomials in evaluation form.

func CreateMultiProof

func CreateMultiProof(transcript *common.Transcript, ipaConf *ipa.IPAConfig, Cs []*banderwagon.Element, fs [][]fr.Element, zs []uint8) (*MultiProof, error)

CreateMultiProof creates a multi-proof for several polynomials in evaluation form. The list of triplets (C, Fs, Z) represents each polynomial commitment, evaluations in the domain, and evaluation point respectively.

func (MultiProof) Equal

func (mp MultiProof) Equal(other MultiProof) bool

Equal checks if two multi-proofs are equal.

func (*MultiProof) Read

func (mp *MultiProof) Read(r io.Reader) error

Read deserializes a multi-proof from a reader.

func (*MultiProof) Write

func (mp *MultiProof) Write(w io.Writer) error

Write serializes a multi-proof to a writer.

Directories

Path Synopsis
fp
fr
Package fr contains field arithmetic operations for modulus = 0x1cfb69...76e7e1.
Package fr contains field arithmetic operations for modulus = 0x1cfb69...76e7e1.

Jump to

Keyboard shortcuts

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