Skip to content

Commit 727ac55

Browse files
committed
docs: update algorithms docs
1 parent 8197d96 commit 727ac55

4 files changed

Lines changed: 49 additions & 42 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ And draft RFCs implementation of:
5858

5959
- [`C20P` and `XC20P`](https://jose.authlib.org/en/dev/guide/algorithms/#c20p-and-xc20p)
6060
- [Key Agreement with Elliptic Curve Diffie-Hellman One-Pass Unified Model](https://jose.authlib.org/en/dev/guide/algorithms/#ecdh-1pu-algorithms)
61+
- draft-ietf-jose-deprecate-none-rsa15-02
6162

6263
## Useful Links
6364

README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ This package contains implementation of:
1313
- RFC7519: JSON Web Token
1414
- RFC7520: Examples of Protecting Content Using JSON Object Signing and Encryption
1515
- RFC7638: thumbprint for JWK
16+
- RFC7797: JSON Web Signature (JWS) Unencoded Payload Option
1617
- RFC8037: OKP Key and EdDSA algorithm
1718
- RFC8812: ES256K algorithm
1819

1920
And draft RFCs implementation of:
2021

21-
- C20P and XC20P
22-
- ECDH-1PU algorithms
22+
- draft-ietf-jose-deprecate-none-rsa15-02
23+
- draft-amringer-jose-chacha-02
24+
- draft-madden-jose-ecdh-1pu-04
2325

2426
Usage
2527
-----

docs/guide/algorithms.rst

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ JSON Web Signature
3333
``joserfc.jws`` module supports algorithms from RFC7518, RFC8037,
3434
and RFC8812. You MUST specify the correct key type for each algorithm.
3535

36-
============== ========== ==================
37-
Algorithm name Key Type Recommended
38-
============== ========== ==================
39-
none OctKey :bdg-danger:`No`
40-
HS256 OctKey :bdg-success:`Yes`
41-
HS384 OctKey :bdg-danger:`No`
42-
HS512 OctKey :bdg-danger:`No`
43-
RS256 RSAKey :bdg-success:`Yes`
44-
RS384 RSAKey :bdg-danger:`No`
45-
RS512 RSAKey :bdg-danger:`No`
46-
ES256 ECKey :bdg-success:`Yes`
47-
ES384 ECKey :bdg-danger:`No`
48-
ES512 ECKey :bdg-danger:`No`
49-
PS256 RSAKey :bdg-danger:`No`
50-
PS384 RSAKey :bdg-danger:`No`
51-
PS512 RSAKey :bdg-danger:`No`
52-
EdDSA OKPKey :bdg-danger:`No`
53-
ES256K ECKey :bdg-danger:`No`
54-
============== ========== ==================
36+
============== ========== ============================
37+
Algorithm name Key Type Requirements
38+
============== ========== ============================
39+
none OctKey :bdg-danger:`Deprecated`
40+
HS256 OctKey :bdg-success:`Recommended`
41+
HS384 OctKey :bdg-muted:`Optional`
42+
HS512 OctKey :bdg-muted:`Optional`
43+
RS256 RSAKey :bdg-success:`Recommended`
44+
RS384 RSAKey :bdg-muted:`Optional`
45+
RS512 RSAKey :bdg-muted:`Optional`
46+
ES256 ECKey :bdg-success:`Recommended`
47+
ES384 ECKey :bdg-muted:`Optional`
48+
ES512 ECKey :bdg-muted:`Optional`
49+
PS256 RSAKey :bdg-muted:`Optional`
50+
PS384 RSAKey :bdg-muted:`Optional`
51+
PS512 RSAKey :bdg-muted:`Optional`
52+
EdDSA OKPKey :bdg-muted:`Optional`
53+
ES256K ECKey :bdg-muted:`Optional`
54+
============== ========== ============================
5555

5656
.. note::
5757
``EdDSA`` algorithm only accepts ``OKPKey`` with "crv" of "Ed25519" and "Ed448".
@@ -84,27 +84,27 @@ JSON Web Encryption
8484
``joserfc.jwe`` module supports algorithms from RFC7518, and drafts of
8585
``ECDH-1PU``. You MUST specify the correct key type for each algorithm.
8686

87-
=================== ========== ==================
88-
Algorithm name Key Type Recommended
89-
=================== ========== ==================
90-
dir OctKey :bdg-success:`Yes`
91-
A128KW OctKey :bdg-success:`Yes`
92-
A192KW OctKey :bdg-danger:`No`
93-
A256KW OctKey :bdg-success:`Yes`
94-
RSA1_5 RSAKey :bdg-danger:`No`
95-
RSA-OAEP RSAKey :bdg-success:`Yes`
96-
RSA-OAEP-256 RSAKey :bdg-danger:`No`
97-
ECDH-ES ECKey :bdg-success:`Yes`
98-
ECDH-ES+A128KW ECKey :bdg-success:`Yes`
99-
ECDH-ES+A192KW ECKey :bdg-danger:`No`
100-
ECDH-ES+A256KW ECKey :bdg-success:`Yes`
101-
A128GCMKW OctKey :bdg-danger:`No`
102-
A192GCMKW OctKey :bdg-danger:`No`
103-
A256GCMKW OctKey :bdg-danger:`No`
104-
PBES2-HS256+A128KW RSAKey :bdg-danger:`No`
105-
PBES2-HS384+A192KW RSAKey :bdg-danger:`No`
106-
PBES2-HS512+A256KW RSAKey :bdg-danger:`No`
107-
=================== ========== ==================
87+
=================== ========== ===========================
88+
Algorithm name Key Type Requirements
89+
=================== ========== ===========================
90+
dir OctKey :bdg-success:`Recommended`
91+
A128KW OctKey :bdg-success:`Recommended`
92+
A192KW OctKey :bdg-muted:`Optional`
93+
A256KW OctKey :bdg-success:`Recommended`
94+
RSA1_5 RSAKey :bdg-danger:`Deprecated`
95+
RSA-OAEP RSAKey :bdg-success:`Recommended`
96+
RSA-OAEP-256 RSAKey :bdg-muted:`Optional`
97+
ECDH-ES ECKey :bdg-success:`Recommended`
98+
ECDH-ES+A128KW ECKey :bdg-success:`Recommended`
99+
ECDH-ES+A192KW ECKey :bdg-muted:`Optional`
100+
ECDH-ES+A256KW ECKey :bdg-success:`Recommended`
101+
A128GCMKW OctKey :bdg-muted:`Optional`
102+
A192GCMKW OctKey :bdg-muted:`Optional`
103+
A256GCMKW OctKey :bdg-muted:`Optional`
104+
PBES2-HS256+A128KW RSAKey :bdg-muted:`Optional`
105+
PBES2-HS384+A192KW RSAKey :bdg-muted:`Optional`
106+
PBES2-HS512+A256KW RSAKey :bdg-muted:`Optional`
107+
=================== ========== ===========================
108108

109109
All algorithms defined in RFC7518 for "enc" value are recommended, which
110110
including:

docs/guide/errors.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Here are some common errors and warnings, and how to handle them.
66
SecurityWarning
77
---------------
88

9+
.. versionadded:: 1.2.0
10+
911
You may encounter a ``SecurityWarning`` when using potentially
1012
unsafe algorithms or generating insecure keys. These warnings
1113
do not interrupt the execution of your application — they are
@@ -28,6 +30,8 @@ they are meant to alert you to potentially insecure practices.
2830
UnsupportedAlgorithmError
2931
-------------------------
3032

33+
.. versionadded:: 1.1.0
34+
3135
By default, **ONLY recommended** :ref:`jwa` are allowed. With non recommended
3236
algorithms, you may encounter the ``UnsupportedAlgorithmError``` error.
3337

0 commit comments

Comments
 (0)