bbs12381g2pub

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 3 Imported by: 25

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeyPair

func GenerateKeyPair(h func() hash.Hash, seed []byte) (*PublicKey, *PrivateKey, error)

GenerateKeyPair generates BBS+ PublicKey and PrivateKey pair.

Types

type BBSG2Pub

type BBSG2Pub = bbs.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).

func New

func New() *BBSG2Pub

New creates a new BBSG2Pub.

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

type ProofG1 = bbs.ProofG1

ProofG1 is a proof of knowledge of a signature and hidden messages.

func NewProofG1

func NewProofG1(commitment *bls12381.PointG1, responses []*bls12381.Fr) *ProofG1

NewProofG1 creates a new ProofG1.

func ParseProofG1

func ParseProofG1(bytes []byte) (*ProofG1, error)

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

type PublicKey = bbs.PublicKey

PublicKey defines BLS Public Key.

func UnmarshalPublicKey

func UnmarshalPublicKey(pubKeyBytes []byte) (*PublicKey, error)

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

type Signature = bbs.Signature

Signature defines BLS signature.

func ParseSignature

func ParseSignature(sigBytes []byte) (*Signature, error)

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.

Jump to

Keyboard shortcuts

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