github.com/trustbloc/kms-go@v1.1.2/crypto/tinkcrypto/primitive/bbs/api/verifier.go (about)

     1  /*
     2  Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package api
     8  
     9  // Verifier is the verification interface primitive for BBS+ signatures/proofs used by Tink.
    10  type Verifier interface {
    11  	// Verify will verify an aggregated signature of one or more messages against the signer's public key.
    12  	// returns:
    13  	// 		error in case of errors or nil if signature verification was successful
    14  	Verify(messages [][]byte, signature []byte) error
    15  
    16  	// VerifyProof will verify a BBS+ signature proof (generated e.g. by Verifier's DeriveProof() call) with the
    17  	// signer's public key.
    18  	// returns:
    19  	// 		error in case of errors or nil if signature proof verification was successful
    20  	VerifyProof(messages [][]byte, proof, nonce []byte) error
    21  
    22  	// DeriveProof will create a BBS+ signature proof for a list of revealed messages using BBS signature
    23  	// (can be built using a Signer's Sign() call) and the signer's public key.
    24  	// returns:
    25  	// 		signature proof in []byte
    26  	//		error in case of errors
    27  	DeriveProof(messages [][]byte, signature, nonce []byte, revealedIndexes []int) ([]byte, error)
    28  }