ed25519signature2020

package
v0.0.0-...-bd860cc Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ed25519signature2020 implements the Ed25519Signature2020 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 (
	// ProofType for Ed25519Signature2020.
	ProofType = "Ed25519Signature2020"
	// VerificationMethodType for Ed25519Signature2020.
	VerificationMethodType = "Ed25519VerificationKey2020"
	// JWKKeyType for Ed25519Signature2020.
	JWKKeyType = "OKP"
	// JWKCurve for Ed25519Signature2020.
	JWKCurve = "Ed25519"
	// CorrespondedJWTAlg for Ed25519Signature2020.
	CorrespondedJWTAlg = "EdDSA"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Proof

type Proof struct {
	// contains filtered or unexported fields
}

Proof describe Ed25519Signature2020 proof.

func New

func New() *Proof

New an instance of ed25519 proof descriptor.

func (*Proof) GetCanonicalDocument

func (s *Proof) GetCanonicalDocument(doc map[string]interface{}, opts ...processor.Opts) ([]byte, error)

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

func (*Proof) GetDigest

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

GetDigest returns document digest.

func (*Proof) IsJWTAlgSupported

func (s *Proof) IsJWTAlgSupported(alg string) bool

IsJWTAlgSupported return jwt alg that corresponds to VerificationMethod.

func (*Proof) ProofType

func (s *Proof) ProofType() string

ProofType return proof type name.

func (*Proof) SupportedVerificationMethods

func (s *Proof) SupportedVerificationMethods() []proof.SupportedVerificationMethod

SupportedVerificationMethods returns list of verification methods supported by this proof type.

Jump to

Keyboard shortcuts

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