ecdsasecp256k1signature2019

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 4 Imported by: 9

Documentation

Overview

Package ecdsasecp256k1signature2019 implements the EcdsaSecp256k1Signature2019 signature suite for the Linked Data Signatures specification (https://w3c-dvcg.github.io/lds-ecdsa-secp256k1-2019/). It uses the RDF Dataset Normalization Algorithm to transform the input document into its canonical form. It uses SHA-256 [RFC6234] as the message digest algorithm. Supported signature algorithms depend on the signer/verifier provided as options to the New().

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPublicKeyVerifier

func NewPublicKeyVerifier() *verifier.PublicKeyVerifier

NewPublicKeyVerifier creates a signature verifier that verifies a ECDSA secp256k1 signature taking Ed25519 public key bytes as input.

Types

type Suite

type Suite struct {
	suite.SignatureSuite
	// contains filtered or unexported fields
}

Suite implements EcdsaSecp256k1Signature2019 signature suite.

func New

func New(opts ...suite.Opt) *Suite

New an instance of Linked Data Signatures for JWS suite.

func (*Suite) Accept

func (s *Suite) Accept(t string) bool

Accept will accept only EcdsaSecp256k1Signature2019 signature type.

func (*Suite) GetCanonicalDocument

func (s *Suite) GetCanonicalDocument(doc map[string]interface{}, opts ...jsonld.ProcessorOpts) ([]byte, error)

GetCanonicalDocument will return normalized/canonical version of the document. EcdsaSecp256k1Signature2019 signature suite uses RDF Dataset Normalization as canonicalization algorithm.

func (*Suite) GetDigest

func (s *Suite) GetDigest(doc []byte) []byte

GetDigest returns document digest.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL