github.com/hyperledger/aries-framework-go@v0.3.2/pkg/crypto/primitive/bbs12381g2pub/signature_proof.go (about) 1 /* 2 Copyright SecureKey Technologies Inc. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package bbs12381g2pub 8 9 import ( 10 bls12381 "github.com/kilic/bls12-381" 11 12 bbs "github.com/hyperledger/aries-framework-go/component/kmscrypto/crypto/primitive/bbs12381g2pub" 13 ) 14 15 // PoKOfSignatureProof defines BLS signature proof. 16 // It is the actual proof that is sent from prover to verifier. 17 type PoKOfSignatureProof = bbs.PoKOfSignatureProof 18 19 // ProofG1 is a proof of knowledge of a signature and hidden messages. 20 type ProofG1 = bbs.ProofG1 21 22 // NewProofG1 creates a new ProofG1. 23 func NewProofG1(commitment *bls12381.PointG1, responses []*bls12381.Fr) *ProofG1 { 24 return bbs.NewProofG1(commitment, responses) 25 } 26 27 // ParseSignatureProof parses a signature proof. 28 func ParseSignatureProof(sigProofBytes []byte) (*PoKOfSignatureProof, error) { 29 return bbs.ParseSignatureProof(sigProofBytes) 30 } 31 32 // ParseProofG1 parses ProofG1 from bytes. 33 func ParseProofG1(bytes []byte) (*ProofG1, error) { 34 return bbs.ParseProofG1(bytes) 35 }