github.com/hyperledger/aries-framework-go@v0.3.2/pkg/crypto/primitive/bbs12381g2pub/bbs.go (about)

     1  /*
     2  Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  // Package bbs12381g2pub contains BBS+ signing primitives and keys. Although it can be used directly, it is recommended
     8  // to use BBS+ keys created by the kms along with the framework's Crypto service.
     9  // The default local Crypto service is found at: "github.com/hyperledger/aries-framework-go/pkg/crypto/tinkcrypto"
    10  //
    11  //	while the remote Crypto service is found at: "github.com/hyperledger/aries-framework-go/pkg/crypto/webkms"
    12  package bbs12381g2pub
    13  
    14  import (
    15  	bbs "github.com/hyperledger/aries-framework-go/component/kmscrypto/crypto/primitive/bbs12381g2pub"
    16  )
    17  
    18  // BBSG2Pub defines BBS+ signature scheme where public key is a point in the field of G2.
    19  // BBS+ signature scheme (as defined in https://eprint.iacr.org/2016/663.pdf, section 4.3).
    20  type BBSG2Pub = bbs.BBSG2Pub
    21  
    22  // New creates a new BBSG2Pub.
    23  func New() *BBSG2Pub {
    24  	return bbs.New()
    25  }
    26  
    27  // ProofNonce is a nonce for Proof of Knowledge proof.
    28  type ProofNonce = bbs.ProofNonce
    29  
    30  // ParseProofNonce creates a new ProofNonce from bytes.
    31  func ParseProofNonce(proofNonceBytes []byte) *ProofNonce {
    32  	return bbs.ParseProofNonce(proofNonceBytes)
    33  }