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 ¶
- type SignatureSuite
- func (s *SignatureSuite) Accept(t string) bool
- func (s *SignatureSuite) GetCanonicalDocument(doc map[string]interface{}) ([]byte, error)
- func (s *SignatureSuite) GetDigest(doc []byte) []byte
- func (s *SignatureSuite) Sign(privKey, doc []byte) ([]byte, error)
- func (s *SignatureSuite) Verify(pubKey, doc, signature []byte) error
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 (*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