JOSE stands for JSON Object Signing and Encryption which is a is a set of standards established by the JOSE Working Group.
JOSE is split into 5 main components:
JOSE.JWA- JSON Web Algorithms (JWA) RFC 7518JOSE.JWE- JSON Web Encryption (JWE) RFC 7516JOSE.JWK- JSON Web Key (JWK) RFC 7517JOSE.JWS- JSON Web Signature (JWS) RFC 7515JOSE.JWT- JSON Web Token (JWT) RFC 7519
Additional specifications and drafts implemented:
Summary
Functions
Gets the current ChaCha20/Poly1305 module used by jose_chacha20_poly1305.
Sets the current ChaCha20/Poly1305 module used by jose_chacha20_poly1305.
Gets the current Cryptographic Algorithm Fallback state
Sets the current Cryptographic Algorithm Fallback state.
Gets the current Curve448 module used by jose_curve448
Sets the current Curve448 module used by jose_curve448.
Gets the current Curve25519 module used by jose_curve25519
Sets the current Curve25519 module used by jose_curve25519.
Decodes JSON to a term using the module returned by json_module/0.
Encodes a term to JSON using the module returned by json_module/0.
Gets the current JSON module used by decode/1 and encode/1, see json_module/1 for default.
Gets the current SHA3 module used by jose_sha3, see sha3_module/1 for default.
Sets the current SHA3 module used by jose_sha3.
Gets the current Unsecured Signing state, defaults to false.
Sets the current Unsecured Signing state.
Functions
@spec chacha20_poly1305_module() :: module()
Gets the current ChaCha20/Poly1305 module used by jose_chacha20_poly1305.
See chacha20_poly1305_module/1 for default.
@spec chacha20_poly1305_module(module()) :: :ok
Sets the current ChaCha20/Poly1305 module used by jose_chacha20_poly1305.
Currently supported ChaCha20/Poly1305 modules (first found is used as default):
crypto- only when 96-bit nonce is supportedlibsodiumjose_jwa_chacha20_poly1305- only supported whencrypto_fallback/0istrue
Additional modules that implement the jose_chacha20_poly1305 behavior may also be used.
@spec crypto_fallback() :: boolean()
Gets the current Cryptographic Algorithm Fallback state
Defaults to false.
@spec crypto_fallback(boolean()) :: :ok
Sets the current Cryptographic Algorithm Fallback state.
@spec curve448_module() :: module()
Gets the current Curve448 module used by jose_curve448
See curve448_module/1 for default.
@spec curve448_module(module()) :: :ok
Sets the current Curve448 module used by jose_curve448.
Currently supported Curve448 modules (first found is used as default):
libdecafjose_jwa_curve448- only supported whencrypto_fallback/0istrue
Additional modules that implement the jose_curve448 behavior may also be used.
@spec curve25519_module() :: module()
Gets the current Curve25519 module used by jose_curve25519
See curve25519_module/1 for default.
@spec curve25519_module(module()) :: :ok
Sets the current Curve25519 module used by jose_curve25519.
Currently supported Curve25519 modules (first found is used as default):
libdecaflibsodiumjose_jwa_curve25519- only supported whencrypto_fallback/0istrue
Additional modules that implement the jose_curve25519 behavior may also be used.
Decodes JSON to a term using the module returned by json_module/0.
Returns the decoded term, or raises if binary contains invalid JSON.
Encodes a term to JSON using the module returned by json_module/0.
Returns the encoded JSON, or raises if term cannot be encoded.
@spec json_module() :: module()
Gets the current JSON module used by decode/1 and encode/1, see json_module/1 for default.
@spec json_module(module()) :: :ok
Sets the current JSON module used by decode/1 and encode/1.
Currently supported JSON modules (first found is used as default):
Additional modules that implement the :jose_json behavior may also be used.
@spec sha3_module() :: module()
Gets the current SHA3 module used by jose_sha3, see sha3_module/1 for default.
@spec sha3_module(module()) :: :ok
Sets the current SHA3 module used by jose_sha3.
Currently supported SHA3 modules (first found is used as default):
keccakf1600libdecafjose_jwa_sha3- only supported whencrypto_fallback/0istrue
Additional modules that implement the jose_sha3 behavior may also be used.
@spec unsecured_signing() :: boolean()
Gets the current Unsecured Signing state, defaults to false.
@spec unsecured_signing(boolean()) :: :ok
Sets the current Unsecured Signing state.
Enables/disables the "none" algorithm used for signing and verifying.
See Critical vulnerabilities in JSON Web Token libraries for more information.