Documentation
¶
Overview ¶
Package jwa implements JWA (JSON Web Algorithms) as defined in RFC 7518.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Algorithm ¶
type Algorithm = string
Algorithm represents a cryptographic algorithm used for signing or encrypting a JWS or JWE object respectively.
https://datatracker.ietf.org/doc/html/rfc7518#section-3.1
HMAC with SHA-2 Functions
These algorithms are used to construct a MAC using a shared secret and the Hash-based Message Authentication Code (HMAC) construction [RFC2104] employing SHA-2 [SHS] hash functions.
RSASSA-PKCS1-v1_5
These algorithms are used to digitally sign a JWS and produce a JWS Signature using PKCS #1 v1.5 methods.
RSA Key Size ¶
A key of size 2048 bits or larger MUST be used with these algorithms.
ECDSA
These algorithms are used to digitally sign a JWS and produce a JWS Signature using ECDSA algorithms.
RSASSA-PSS
These algorithms are used to digitally sign a JWS and produce a JWS Signature using the RSASSA-PSS algorithms.
RSA Key Size ¶
A key of size 2048 bits or larger MUST be used with these algorithms.
const ES256K Algorithm = "ES256K"
ECDSA with secp256k1 and SHA-256 (used in Bitcoin and Ethereum).
Warning ¶
This algorithm is not implemented in this library, but is included for completeness and documentation purposes.
https://datatracker.ietf.org/doc/html/draft-jones-webauthn-secp256k1 https://datatracker.ietf.org/doc/html/draft-ietf-cose-webauthn-algorithms-04#section-3.2
const EdDSA Algorithm = "EdDSA"
EdDSA algorithms using Ed25519 (and Ed448, which is not implemented).