JOSE v1.8.4 JOSE

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:

Additional specifications and drafts implemented:

Summary

Functions

Gets the current ChaCha20/Poly1305 module used by jose_chacha20_poly1305, see chacha20_poly1305_module/1 for default

Sets the current ChaCha20/Poly1305 module used by jose_chacha20_poly1305

Gets the current Cryptographic Algorithm Fallback state, defaults to false

Sets the current Cryptographic Algorithm Fallback state

Gets the current Curve25519 module used by jose_curve25519, see curve25519_module/1 for default

Sets the current Curve25519 module used by jose_curve25519

Gets the current Curve448 module used by jose_curve448, see curve448_module/1 for default

Sets the current Curve448 module used by jose_curve448

Decode JSON to a term using the module returned by json_module/0

Encode 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

Sets the current JSON module used by decode/1 and encode/1

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

chacha20_poly1305_module()

Gets the current ChaCha20/Poly1305 module used by jose_chacha20_poly1305, see chacha20_poly1305_module/1 for default.

chacha20_poly1305_module(module)

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 supported
  • libsodium
  • jose_jwa_chacha20_poly1305 - only supported when crypto_fallback/0 is true

Additional modules that implement the jose_chacha20_poly1305 behavior may also be used.

crypto_fallback()

Gets the current Cryptographic Algorithm Fallback state, defaults to false.

crypto_fallback(boolean)

Sets the current Cryptographic Algorithm Fallback state.

curve25519_module()

Gets the current Curve25519 module used by jose_curve25519, see curve25519_module/1 for default.

curve25519_module(module)

Sets the current Curve25519 module used by jose_curve25519.

Currently supported Curve25519 modules (first found is used as default):

Additional modules that implement the jose_curve25519 behavior may also be used.

curve448_module()

Gets the current Curve448 module used by jose_curve448, see curve448_module/1 for default.

curve448_module(module)

Sets the current Curve448 module used by jose_curve448.

Currently supported Curve448 modules (first found is used as default):

Additional modules that implement the jose_curve448 behavior may also be used.

decode(binary)

Decode JSON to a term using the module returned by json_module/0.

encode(term)

Encode a term to JSON using the module returned by json_module/0.

json_module()

Gets the current JSON module used by decode/1 and encode/1, see json_module/1 for default.

json_module(module)

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.

sha3_module()

Gets the current SHA3 module used by jose_sha3, see sha3_module/1 for default.

sha3_module(module)

Sets the current SHA3 module used by jose_sha3.

Currently supported SHA3 modules (first found is used as default):

Additional modules that implement the jose_sha3 behavior may also be used.

unsecured_signing()

Gets the current Unsecured Signing state, defaults to false.

unsecured_signing(boolean)

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.