JSON Web Algorithms

This section contains the generic implementation of RFC7518.

Algorithms for JWS

The interface for JWS Algorithms are all inherit from authlib.specs.rfc7515.JWSAlgorithm. Find how to use them in Guide on JWS.

HMAC with SHA-2 Functions

This section is defined by RFC7518 Section 3.2.

  1. HS256: HMAC using SHA-256
  2. HS384: HMAC using SHA-384
  3. HS512: HMAC using SHA-512

Digital Signature with RSASSA-PKCS1-v1_5

Algorithms in this section requires extra crypto backends. This section is defined by RFC7518 Section 3.3.

  1. RS256: RSASSA-PKCS1-v1_5 using SHA-256
  2. RS384: RSASSA-PKCS1-v1_5 using SHA-384
  3. RS512: RSASSA-PKCS1-v1_5 using SHA-384

Digital Signature with ECDSA

Algorithms in this section requires extra crypto backends. This section is defined by RFC7518 Section 3.4.

  1. ES256: ECDSA using P-256 and SHA-256
  2. ES384: ECDSA using P-384 and SHA-384
  3. ES384: ECDSA using P-521 and SHA-521

Digital Signature with RSASSA-PSS

Algorithms in this section requires extra crypto backends. This section is defined by RFC7518 Section 3.5.

  1. PS256: RSASSA-PSS using SHA-256 and MGF1 with SHA-256
  2. PS384: RSASSA-PSS using SHA-384 and MGF1 with SHA-384
  3. PS512: RSASSA-PSS using SHA-512 and MGF1 with SHA-512

Algorithms for JWE

This section is not implemented yet.

Algorithms for JWK

This section defines the parameters for keys using the algorithms via RFC7518 Section 6. The interface for JWK Algorithms are all inherit from authlib.specs.rfc7517.JWKAlgorithm. The available values of kty:

  1. EC: Elliptic Curve (requires extra crypto backends)
  2. RSA: RSA (requires extra crypto backends)
  3. oct

Find how to use them in Guide on JWK.