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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPublicKeyVerifier ¶
func NewPublicKeyVerifier() *verifier.PublicKeyVerifier
NewPublicKeyVerifier creates a signature verifier that verifies a Ed25519 / EC (P-256, P-384, P-521, secp256k1) / RSA signature taking public key bytes and / or JSON Web Key as input. The list of Supported JWS algorithms of JsonWebSignature2020 is defined here: https://github.com/transmute-industries/lds-jws2020#supported-jws-algs
Types ¶
type Suite ¶
type Suite struct { suite.SignatureSuite // contains filtered or unexported fields }
Suite implements jsonWebSignature2020 signature suite.
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.