jsonwebsignature2020

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 jsonwebsignature2020 implements the JsonWebSignature2020 signature suite for the Linked Data Signatures specification (https://github.com/transmute-industries/lds-jws2020). 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(). According to the suite specification, signer/verifier must support the following algorithms: kty | crvOrSize | alg OKP | Ed25519 | EdDSA EC | secp256k1 | ES256K RSA | 2048 | PS256 EC | P-256 | ES256 EC | P-384 | ES384 EC | P-521 | ES512

Index

Constants

View Source
const (
	ProofType              = "JsonWebSignature2020"
	VerificationMethodType = "JsonWebKey2020"

	Ed25519JWKKeyType = "OKP"
	Ed25519JWKCurve   = "Ed25519"

	ECDSASecp256k1JWKKeyType = "EC"
	ECDSASecp256k1JWKCurve   = "secp256k1"

	RSAPS256JWKKeyType = "RSA"

	ECDSAES256JWKKeyType = "EC"
	ECDSAES256JWKCurve   = "P-256"

	ECDSAES384JWKKeyType = "EC"
	ECDSAES384JWKCurve   = "P-384"

	ECDSAES521JWKKeyType = "EC"
	ECDSAES521JWKCurve   = "P-521"
)

nolint: golint

Variables

This section is empty.

Functions

This section is empty.

Types

type Proof

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

Proof describe jsonWebSignature2020 signature suite.

func New

func New() *Proof

New an instance of JsonWebSignature2020 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 Ed25519Signature2018 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) 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