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

     1  /*
     2  Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  // Package ecdsasecp256k1signature2019 implements the EcdsaSecp256k1Signature2019 signature suite
     8  // for the Linked Data Signatures specification (https://w3c-dvcg.github.io/lds-ecdsa-secp256k1-2019/).
     9  // It uses the RDF Dataset Normalization Algorithm to transform the input document into its canonical form.
    10  // It uses SHA-256 [RFC6234] as the message digest algorithm.
    11  // Supported signature algorithms depend on the signer/verifier provided as options to the New().
    12  package ecdsasecp256k1signature2019
    13  
    14  import (
    15  	"github.com/hyperledger/aries-framework-go/component/models/signature/suite"
    16  	"github.com/hyperledger/aries-framework-go/component/models/signature/suite/ecdsasecp256k1signature2019"
    17  	"github.com/hyperledger/aries-framework-go/component/models/signature/verifier"
    18  )
    19  
    20  // Suite implements EcdsaSecp256k1Signature2019 signature suite.
    21  type Suite = ecdsasecp256k1signature2019.Suite
    22  
    23  // New an instance of Linked Data Signatures for JWS suite.
    24  func New(opts ...suite.Opt) *Suite {
    25  	return ecdsasecp256k1signature2019.New(opts...)
    26  }
    27  
    28  // NewPublicKeyVerifier creates a signature verifier that verifies a ECDSA secp256k1 signature
    29  // taking Ed25519 public key bytes as input.
    30  func NewPublicKeyVerifier() *verifier.PublicKeyVerifier {
    31  	return ecdsasecp256k1signature2019.NewPublicKeyVerifier()
    32  }