ed25519signature2018

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 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-512 [RFC6234] as the message digest algorithm and Ed25519 [ED25519] as the signature algorithm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignatureSuite

type SignatureSuite struct {
}

SignatureSuite implements ed25519 signature suite

func New

func New() *SignatureSuite

New an instance of ed25519 signature suite

func (*SignatureSuite) Accept

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

Accept will accept only ed25519 signature type

func (*SignatureSuite) GetCanonicalDocument

func (s *SignatureSuite) GetCanonicalDocument(doc map[string]interface{}) ([]byte, error)

GetCanonicalDocument will return normalized/canonical version of the document Ed25519Signature2018 signature SignatureSuite uses RDF Dataset Normalization as canonicalization algorithm

func (*SignatureSuite) GetDigest

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

GetDigest returns document digest

func (*SignatureSuite) Sign

func (s *SignatureSuite) Sign(privKey, doc []byte) ([]byte, error)

Sign will return ed25519 signature

func (*SignatureSuite) Verify

func (s *SignatureSuite) Verify(pubKey, doc, signature []byte) error

Verify will verify ed25519 signature against public key

Jump to

Keyboard shortcuts

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