github.com/hyperledger/aries-framework-go@v0.3.2/pkg/doc/signature/suite/ed25519signature2018/ed25519signature2018.go (about) 1 /* 2 Copyright SecureKey Technologies Inc. All Rights Reserved. 3 SPDX-License-Identifier: Apache-2.0 4 */ 5 6 // Package ed25519signature2018 implements the Ed25519Signature2018 signature suite 7 // for the Linked Data Signatures [LD-SIGNATURES] specification. 8 // It uses the RDF Dataset Normalization Algorithm [RDF-DATASET-NORMALIZATION] 9 // to transform the input document into its canonical form. 10 // It uses SHA-256 [RFC6234] as the message digest algorithm and 11 // Ed25519 [ED25519] as the signature algorithm. 12 package ed25519signature2018 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/ed25519signature2018" 17 "github.com/hyperledger/aries-framework-go/component/models/signature/verifier" 18 ) 19 20 // Suite implements ed25519 signature suite. 21 type Suite = ed25519signature2018.Suite 22 23 const ( 24 // SignatureType is the signature type for ed25519 keys. 25 SignatureType = ed25519signature2018.SignatureType 26 ) 27 28 // New an instance of ed25519 signature suite. 29 func New(opts ...suite.Opt) *Suite { 30 return ed25519signature2018.New(opts...) 31 } 32 33 // NewPublicKeyVerifier creates a signature verifier that verifies a Ed25519 signature 34 // taking Ed25519 public key bytes as input. 35 func NewPublicKeyVerifier() *verifier.PublicKeyVerifier { 36 return ed25519signature2018.NewPublicKeyVerifier() 37 }