Documentation ¶
Index ¶
- func BatchProve(pk []ProvingKey, values [][]fr.Element, fiatshamirSeeds ...[]byte) (pok curve.G1Affine, err error)
- func FoldCommitments(commitments []curve.G1Affine, fiatshamirSeeds ...[]byte) (commitment curve.G1Affine, err error)
- func Setup(bases ...[]curve.G1Affine) (pk []ProvingKey, vk VerifyingKey, err error)
- type ProvingKey
- func (pk *ProvingKey) Commit(values []fr.Element) (commitment curve.G1Affine, err error)
- func (pk *ProvingKey) ProveKnowledge(values []fr.Element) (pok curve.G1Affine, err error)
- func (pk *ProvingKey) ReadFrom(r io.Reader) (int64, error)
- func (pk *ProvingKey) WriteRawTo(w io.Writer) (int64, error)
- func (pk *ProvingKey) WriteTo(w io.Writer) (int64, error)
- type VerifyingKey
- func (vk *VerifyingKey) ReadFrom(r io.Reader) (int64, error)
- func (vk *VerifyingKey) UnsafeReadFrom(r io.Reader) (int64, error)
- func (vk *VerifyingKey) Verify(commitment curve.G1Affine, knowledgeProof curve.G1Affine) error
- func (vk *VerifyingKey) WriteRawTo(w io.Writer) (int64, error)
- func (vk *VerifyingKey) WriteTo(w io.Writer) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchProve ¶ added in v0.11.2
func BatchProve(pk []ProvingKey, values [][]fr.Element, fiatshamirSeeds ...[]byte) (pok curve.G1Affine, err error)
BatchProve generates a single proof of knowledge for multiple commitments for faster verification
func FoldCommitments ¶ added in v0.11.2
func FoldCommitments(commitments []curve.G1Affine, fiatshamirSeeds ...[]byte) (commitment curve.G1Affine, err error)
FoldCommitments amalgamates multiple commitments into one, which can be verifier against a folded proof obtained from BatchProve
func Setup ¶
func Setup(bases ...[]curve.G1Affine) (pk []ProvingKey, vk VerifyingKey, err error)
Types ¶
type ProvingKey ¶ added in v0.11.0
type ProvingKey struct {
// contains filtered or unexported fields
}
ProvingKey for committing and proofs of knowledge
func (*ProvingKey) ProveKnowledge ¶ added in v0.11.2
func (*ProvingKey) ReadFrom ¶ added in v0.11.0
func (pk *ProvingKey) ReadFrom(r io.Reader) (int64, error)
func (*ProvingKey) WriteRawTo ¶ added in v0.11.2
func (pk *ProvingKey) WriteRawTo(w io.Writer) (int64, error)
type VerifyingKey ¶ added in v0.11.0
type VerifyingKey struct {
// contains filtered or unexported fields
}
func (*VerifyingKey) ReadFrom ¶ added in v0.11.0
func (vk *VerifyingKey) ReadFrom(r io.Reader) (int64, error)
func (*VerifyingKey) UnsafeReadFrom ¶ added in v0.11.2
func (vk *VerifyingKey) UnsafeReadFrom(r io.Reader) (int64, error)
func (*VerifyingKey) WriteRawTo ¶ added in v0.11.2
func (vk *VerifyingKey) WriteRawTo(w io.Writer) (int64, error)
Click to show internal directories.
Click to hide internal directories.