ed25519signature2018

package
v0.1.6-0...-5c25bcb Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ed25519signature2018 implements the Ed25519Signature2018 signature suite for the Linked Data Signatures [LD-SIGNATURES] specification. It uses the RDF Dataset Normalization Algorithm [RDF-DATASET-NORMALIZATION] to transform the input document into its canonical form. It uses SHA-256 [RFC6234] as the message digest algorithm and Ed25519 [ED25519] as the signature algorithm.

Index

Constants

View Source
const (
	// SignatureType is the signature type for ed25519 keys.
	SignatureType = "Ed25519Signature2018"
)

Variables

This section is empty.

Functions

func NewPublicKeyVerifier

func NewPublicKeyVerifier() *verifier.PublicKeyVerifier

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

Types

type Suite

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

Suite implements ed25519 signature suite.

func New

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

New an instance of ed25519 signature suite.

func (*Suite) Accept

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

Accept will accept only ed25519 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 Ed25519Signature2018 signature SignatureSuite 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