You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/algorithms.rst
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,38 @@ This library currently supports:
19
19
* PS512 - RSASSA-PSS signature using SHA-512 and MGF1 padding with SHA-512
20
20
* EdDSA - Both Ed25519 signature using SHA-512 and Ed448 signature using SHA-3 are supported. Ed25519 and Ed448 provide 128-bit and 224-bit security respectively.
21
21
22
+
Minimum Key Length Requirements
23
+
-------------------------------
24
+
25
+
PyJWT enforces minimum key lengths per industry standards. Keys below these
26
+
minimums will trigger an ``InsecureKeyLengthWarning`` by default, or raise
27
+
``InvalidKeyError`` if ``enforce_minimum_key_length`` is enabled.
28
+
29
+
.. list-table::
30
+
:header-rows: 1
31
+
:widths: auto
32
+
33
+
* - Algorithm
34
+
- Minimum Key Length
35
+
- Standard
36
+
* - HS256
37
+
- 32 bytes (256 bits)
38
+
- RFC 7518 Section 3.2
39
+
* - HS384
40
+
- 48 bytes (384 bits)
41
+
- RFC 7518 Section 3.2
42
+
* - HS512
43
+
- 64 bytes (512 bits)
44
+
- RFC 7518 Section 3.2
45
+
* - RS256/384/512
46
+
- 2048 bits
47
+
- NIST SP 800-131A
48
+
* - PS256/384/512
49
+
- 2048 bits
50
+
- NIST SP 800-131A
51
+
52
+
See :ref:`key-length-validation` for configuration details.
53
+
22
54
Asymmetric (Public-key) Algorithms
23
55
----------------------------------
24
56
Usage of RSA (RS\*) and EC (EC\*) algorithms require a basic understanding
0 commit comments