Versions in this module Expand all Collapse all v1 v1.0.2 Jan 17, 2024 v1.0.1 Oct 30, 2023 v1.0.0 Sep 18, 2023 Changes in this version + func GenerateKeyPair(h func() hash.Hash, seed []byte) (*PublicKey, *PrivateKey, error) + type BBSG2Pub struct + func New() *BBSG2Pub + func (bbs *BBSG2Pub) DeriveProof(messages [][]byte, sigBytes, nonce, pubKeyBytes []byte, revealedIndexes []int) ([]byte, error) + func (bbs *BBSG2Pub) Sign(messages [][]byte, privKeyBytes []byte) ([]byte, error) + func (bbs *BBSG2Pub) SignWithKey(messages [][]byte, privKey *PrivateKey) ([]byte, error) + func (bbs *BBSG2Pub) Verify(messages [][]byte, sigBytes, pubKeyBytes []byte) error + func (bbs *BBSG2Pub) VerifyProof(messagesBytes [][]byte, proof, nonce, pubKeyBytes []byte) error + type PoKOfSignature struct + func NewPoKOfSignature(signature *Signature, messages []*SignatureMessage, revealedIndexes []int, ...) (*PoKOfSignature, error) + func (pos *PoKOfSignature) GenerateProof(challengeHash *ml.Zr) *PoKOfSignatureProof + func (pos *PoKOfSignature) ToBytes() []byte + type PoKOfSignatureProof struct + func ParseSignatureProof(sigProofBytes []byte) (*PoKOfSignatureProof, error) + func (sp *PoKOfSignatureProof) GetBytesForChallenge(revealedMessages map[int]*SignatureMessage, pubKey *PublicKeyWithGenerators) []byte + func (sp *PoKOfSignatureProof) ToBytes() []byte + func (sp *PoKOfSignatureProof) Verify(challenge *ml.Zr, pubKey *PublicKeyWithGenerators, ...) error + type PrivateKey struct + FR *ml.Zr + func UnmarshalPrivateKey(privKeyBytes []byte) (*PrivateKey, error) + func (k *PrivateKey) Marshal() ([]byte, error) + func (k *PrivateKey) PublicKey() *PublicKey + type ProofG1 struct + func NewProofG1(commitment *ml.G1, responses []*ml.Zr) *ProofG1 + func ParseProofG1(bytes []byte) (*ProofG1, error) + func (pg1 *ProofG1) ToBytes() []byte + func (pg1 *ProofG1) Verify(bases []*ml.G1, commitment *ml.G1, challenge *ml.Zr) error + type ProofNonce struct + func ParseProofNonce(proofNonceBytes []byte) *ProofNonce + func (pn *ProofNonce) ToBytes() []byte + type ProverCommittedG1 struct + func (g *ProverCommittedG1) GenerateProof(challenge *ml.Zr, secrets []*ml.Zr) *ProofG1 + func (g *ProverCommittedG1) ToBytes() []byte + type ProverCommittingG1 struct + func NewProverCommittingG1() *ProverCommittingG1 + func (pc *ProverCommittingG1) Commit(base *ml.G1) + func (pc *ProverCommittingG1) Finish() *ProverCommittedG1 + type PublicKey struct + PointG2 *ml.G2 + func UnmarshalPublicKey(pubKeyBytes []byte) (*PublicKey, error) + func (pk *PublicKey) Marshal() ([]byte, error) + func (pk *PublicKey) ToPublicKeyWithGenerators(messagesCount int) (*PublicKeyWithGenerators, error) + type PublicKeyWithGenerators struct + type Signature struct + A *ml.G1 + E *ml.Zr + S *ml.Zr + func ParseSignature(sigBytes []byte) (*Signature, error) + func (s *Signature) ToBytes() ([]byte, error) + func (s *Signature) Verify(messages []*SignatureMessage, pubKey *PublicKeyWithGenerators) error + type SignatureMessage struct + FR *ml.Zr + func ParseSignatureMessage(message []byte) *SignatureMessage