github.com/hyperledger/aries-framework-go@v0.3.2/pkg/doc/signature/suite/bbsblssignature2020/bbsblssignature2020.go (about)

     1  /*
     2  Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  // Package bbsblssignature2020 implements the BBS+ Signature Suite 2020 signature suite
     8  // (https://w3c-ccg.github.io/ldp-bbs2020) in conjunction with the signing and verification algorithms of the
     9  // Linked Data Proofs.
    10  // It uses the RDF Dataset Normalization Algorithm to transform the input document into its canonical form.
    11  // It uses SHA-256 [RFC6234] as the statement digest algorithm.
    12  // It uses BBS+ signature algorithm (https://mattrglobal.github.io/bbs-signatures-spec/).
    13  // It uses BLS12-381 pairing-friendly curve (https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-03).
    14  package bbsblssignature2020
    15  
    16  import (
    17  	"github.com/hyperledger/aries-framework-go/component/models/signature/suite"
    18  	"github.com/hyperledger/aries-framework-go/component/models/signature/suite/bbsblssignature2020"
    19  	"github.com/hyperledger/aries-framework-go/component/models/signature/verifier"
    20  )
    21  
    22  // Suite implements BbsBlsSignature2020 signature suite.
    23  type Suite = bbsblssignature2020.Suite
    24  
    25  const (
    26  	// SignatureType is the BbsBlsSignature2020 type string.
    27  	SignatureType = "BbsBlsSignature2020"
    28  )
    29  
    30  // New an instance of Linked Data Signatures for JWS suite.
    31  func New(opts ...suite.Opt) *Suite {
    32  	return bbsblssignature2020.New(opts...)
    33  }
    34  
    35  // NewG2PublicKeyVerifier creates a signature verifier that verifies a BbsBlsSignature2020 signature
    36  // taking Bls12381G2Key2020 public key bytes as input.
    37  func NewG2PublicKeyVerifier() *verifier.PublicKeyVerifier {
    38  	return bbsblssignature2020.NewG2PublicKeyVerifier()
    39  }