Versions in this module Expand all Collapse all v0 v0.14.0 Sep 3, 2024 v0.13.0 Jul 18, 2024 Changes in this version + var ErrInvalidNbDigests = errors.New("number of digests is not the same as the number of polynomials") + var ErrInvalidPolynomialSize = errors.New("invalid polynomial size (larger than SRS or == 0)") + var ErrMinSRSSize = errors.New("minimum srs size is 2") + var ErrVerifyBatchOpeningSinglePoint = errors.New("can't verify batch opening proof at single point") + var ErrVerifyOpeningProof = errors.New("can't verify opening proof") + var ErrZeroNbDigests = errors.New("number of digests is zero") + func BatchVerifyMultiPoints(digests []Digest, proofs []OpeningProof, points []fr.Element, vk VerifyingKey) error + func BatchVerifySinglePoint(digests []Digest, batchOpeningProof *BatchOpeningProof, point fr.Element, ...) error + func FoldProof(digests []Digest, batchOpeningProof *BatchOpeningProof, point fr.Element, ...) (OpeningProof, Digest, error) + func ToLagrangeG1(coeffs []curve.G1Affine) ([]curve.G1Affine, error) + func Verify(commitment *Digest, proof *OpeningProof, point fr.Element, vk VerifyingKey) error + type BatchOpeningProof struct + ClaimedValues []fr.Element + H bls12377.G1Affine + func BatchOpenSinglePoint(polynomials [][]fr.Element, digests []Digest, point fr.Element, hf hash.Hash, ...) (BatchOpeningProof, error) + func (proof *BatchOpeningProof) ReadFrom(r io.Reader) (int64, error) + func (proof *BatchOpeningProof) WriteTo(w io.Writer) (int64, error) + type Digest = bls12377.G1Affine + func Commit(p []fr.Element, pk ProvingKey, nbTasks ...int) (Digest, error) + type OpeningProof struct + ClaimedValue fr.Element + H bls12377.G1Affine + func Open(p []fr.Element, point fr.Element, pk ProvingKey) (OpeningProof, error) + func (proof *OpeningProof) ReadFrom(r io.Reader) (int64, error) + func (proof *OpeningProof) WriteTo(w io.Writer) (int64, error) + type ProvingKey struct + G1 []bls12377.G1Affine + func (pk *ProvingKey) ReadFrom(r io.Reader) (int64, error) + func (pk *ProvingKey) UnsafeReadFrom(r io.Reader) (int64, error) + func (pk *ProvingKey) WriteRawTo(w io.Writer) (int64, error) + func (pk *ProvingKey) WriteTo(w io.Writer) (int64, error) + type SRS struct + Pk ProvingKey + Vk VerifyingKey + func NewSRS(size uint64, bAlpha *big.Int) (*SRS, error) + func (srs *SRS) ReadDump(r io.Reader, maxPkPoints ...int) error + func (srs *SRS) ReadFrom(r io.Reader) (int64, error) + func (srs *SRS) UnsafeReadFrom(r io.Reader) (int64, error) + func (srs *SRS) WriteDump(w io.Writer, maxPkPoints ...int) error + func (srs *SRS) WriteRawTo(w io.Writer) (int64, error) + func (srs *SRS) WriteTo(w io.Writer) (int64, error) + type VerifyingKey struct + G1 bls12377.G1Affine + G2 [2]bls12377.G2Affine + Lines [2][2][len(bls12377.LoopCounter) - 1]bls12377.LineEvaluationAff + func (vk *VerifyingKey) ReadFrom(r io.Reader) (int64, error) + func (vk *VerifyingKey) WriteRawTo(w io.Writer) (int64, error) + func (vk *VerifyingKey) WriteTo(w io.Writer) (int64, error)