crypto

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAndParseEcJwk

func FindAndParseEcJwk(signatureKid []byte, jwksData []byte) (*ecdsa.PublicKey, error)

Read JWKs json then find & parse the JWK for the given signatureKid

func ParseEcPrivateKey

func ParseEcPrivateKey(privateKeyData []byte) (*ecdsa.PrivateKey, error)

ParseEcPrivateKey parses the private key data and produces an elliptic curve private key

func ParseEcPublicKey

func ParseEcPublicKey(publicKeyData []byte) (*ecdsa.PublicKey, error)

ParseEcPublicKey parses the public key data and produces an elliptic curve public key

func SignES512

func SignES512(key *ecdsa.PrivateKey, payload []byte) ([]byte, error)

SignES512 signs a payload using the provided private key and return the signature Check section A.4 of RFC7515 for the details <https://www.rfc-editor.org/rfc/rfc7515.txt>

func VerifyES512

func VerifyES512(key *ecdsa.PublicKey, payload []byte, signature []byte) error

VerifyES512 verifies the signature of a payload using the provided public key

Types

This section is empty.

Jump to

Keyboard shortcuts

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