Documentation ¶
Overview ¶
Package bbs12381g2pub contains BBS+ signing primitives and keys. Although it can be used directly, it is recommended to use BBS+ keys created by the kms along with the framework's Crypto service. The default local Crypto service is found at: "github.com/hyperledger/aries-framework-go/pkg/crypto/tinkcrypto"
while the remote Crypto service is found at: "github.com/hyperledger/aries-framework-go/pkg/crypto/webkms"
Index ¶
- func GenerateKeyPair(h func() hash.Hash, seed []byte) (*PublicKey, *PrivateKey, error)
- type BBSG2Pub
- type PoKOfSignature
- type PoKOfSignatureProof
- type PrivateKey
- type ProofG1
- type ProofNonce
- type ProverCommittedG1
- type ProverCommittingG1
- type PublicKey
- type PublicKeyWithGenerators
- type Signature
- type SignatureMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyPair ¶
GenerateKeyPair generates BBS+ PublicKey and PrivateKey pair.
Types ¶
type BBSG2Pub ¶
BBSG2Pub defines BBS+ signature scheme where public key is a point in the field of G2. BBS+ signature scheme (as defined in https://eprint.iacr.org/2016/663.pdf, section 4.3).
type PoKOfSignature ¶
type PoKOfSignature = bbs.PoKOfSignature
PoKOfSignature is Proof of Knowledge of a Signature that is used by the prover to construct PoKOfSignatureProof.
func NewPoKOfSignature ¶
func NewPoKOfSignature(signature *Signature, messages []*SignatureMessage, revealedIndexes []int, pubKey *PublicKeyWithGenerators) (*PoKOfSignature, error)
NewPoKOfSignature creates a new PoKOfSignature.
type PoKOfSignatureProof ¶
type PoKOfSignatureProof = bbs.PoKOfSignatureProof
PoKOfSignatureProof defines BLS signature proof. It is the actual proof that is sent from prover to verifier.
func ParseSignatureProof ¶
func ParseSignatureProof(sigProofBytes []byte) (*PoKOfSignatureProof, error)
ParseSignatureProof parses a signature proof.
type PrivateKey ¶
type PrivateKey = bbs.PrivateKey
PrivateKey defines BLS Public Key.
func UnmarshalPrivateKey ¶
func UnmarshalPrivateKey(privKeyBytes []byte) (*PrivateKey, error)
UnmarshalPrivateKey unmarshals PrivateKey.
type ProofG1 ¶
ProofG1 is a proof of knowledge of a signature and hidden messages.
func NewProofG1 ¶
NewProofG1 creates a new ProofG1.
func ParseProofG1 ¶
ParseProofG1 parses ProofG1 from bytes.
type ProofNonce ¶
type ProofNonce = bbs.ProofNonce
ProofNonce is a nonce for Proof of Knowledge proof.
func ParseProofNonce ¶
func ParseProofNonce(proofNonceBytes []byte) *ProofNonce
ParseProofNonce creates a new ProofNonce from bytes.
type ProverCommittedG1 ¶
type ProverCommittedG1 = bbs.ProverCommittedG1
ProverCommittedG1 helps to generate a ProofG1.
type ProverCommittingG1 ¶
type ProverCommittingG1 = bbs.ProverCommittingG1
ProverCommittingG1 is a proof of knowledge of messages in a vector commitment.
type PublicKey ¶
PublicKey defines BLS Public Key.
func UnmarshalPublicKey ¶
UnmarshalPublicKey parses a PublicKey from bytes.
type PublicKeyWithGenerators ¶
type PublicKeyWithGenerators = bbs.PublicKeyWithGenerators
PublicKeyWithGenerators extends PublicKey with a blinding generator h0, a commitment to the secret key w, and a generator for each message h.
type Signature ¶
Signature defines BLS signature.
func ParseSignature ¶
ParseSignature parses a Signature from bytes.
type SignatureMessage ¶
type SignatureMessage = bbs.SignatureMessage
SignatureMessage defines a message to be used for a signature check.
func ParseSignatureMessage ¶
func ParseSignatureMessage(message []byte) *SignatureMessage
ParseSignatureMessage parses SignatureMessage from bytes.