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 ¶
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 (*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) SupportedVerificationMethods ¶
func (s *Proof) SupportedVerificationMethods() []proof.SupportedVerificationMethod
SupportedVerificationMethods returns list of verification methods supported by this proof type.