Skip to content

Commit 2999acf

Browse files
Spomkygitbook-bot
Spomky
authored andcommitted
GitBook: [master] 6 pages modified
1 parent e01d6b8 commit 2999acf

File tree

6 files changed

+39
-32
lines changed

6 files changed

+39
-32
lines changed

README.md

+34-27
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ The [detached payload](https://tools.ietf.org/html/rfc7515#appendix-F) is suppor
4545

4646
| Key Type | Supported | Comment |
4747
| --- | :---: | --- |
48-
| `oct` | YES | Symmetric keys |
49-
| `RSA` | YES | RSA based asymmetric keys |
50-
| `EC` | YES | Elliptic Curves based asymmetric keys |
51-
| `OKP` | YES | Octet Key Pair based asymmetric keys |
48+
| oct | YES | Symmetric keys |
49+
| RSA | YES | RSA based asymmetric keys |
50+
| EC | YES | Elliptic Curves based asymmetric keys |
51+
| OKP | YES | Octet Key Pair based asymmetric keys |
5252

5353
JWK objects support JSON Web Key Thumbprint \([RFC 7638](https://tools.ietf.org/html/rfc7638)\).
5454

55-
_Note: we use a _`none`_ key type for the _`none`_ algorithm only._
55+
_Note: we use a_ `none` _key type for the_ `none` _algorithm only._
5656

5757
### Key Sets \(JWKSet\)
5858

@@ -62,52 +62,59 @@ JWKSet is fully supported.
6262

6363
| Signature Algorithm | Supported | Comment |
6464
| --- | :---: | --- |
65-
| `HS256`, `HS384` and `HS512` | YES | |
66-
| `HS256`, `ES384` and `ES512` | YES | |
67-
| `RS256`, `RS384` and `RS512` | YES | |
68-
| `PS256`, `PS384` and `PS512` | YES | |
69-
| `none` | YES | **Please note that this is not a secured algorithm. USE IT WITH CAUTION!** |
70-
| `EdDSA`_ with _`Ed25519`_ curve_ | YES | [With PHP 7.1, third party extension highly recommended](https://github.com/jedisct1/libsodium-php) |
71-
| `EdDSA`_ with _`Ed448`_ curve_ | NO | No extension or built-in implementation available |
65+
| HS256, HS384 and HS512 | YES | |
66+
| ES256, ES384 and ES512 | YES | |
67+
| RS256, RS384 and RS512 | YES | |
68+
| PS256, PS384 and PS512 | YES | |
69+
| none | YES | **Please note that this is not a secured algorithm. USE IT WITH CAUTION!** |
70+
| EdDSA with Ed25519 curve | YES | [With PHP 7.1, third party extension highly recommended](https://github.com/jedisct1/libsodium-php) |
71+
| EdDSA with Ed448 curve | NO | No extension or built-in implementation available |
72+
| HS1 | YES | From v1.2. **Experimental. Not recommended ; for testing purpose or compatibility with old systems only.** |
73+
| RS1 | YES | From v1.2. **Experimental. Not recommended ; for testing purpose or compatibility with old systems only.** |
74+
| HS256/64 | YES | From v1.2. **Experimental. Not recommended ; for testing purpose or compatibility with old systems only.** |
7275

7376
### Supported Key Encryption Algorithms
7477

7578
| Key Encryption Algorithm | Supported | Comment |
7679
| --- | :---: | --- |
77-
| `dir` | YES | |
78-
| `RSA1_5`, `RSA-OAEP` and `RSA-OAEP-256` | YES | The algorithms `RSA1_5` and `RSA-OAEP`are now deprecated. Please use with caution. |
79-
| `ECDH-ES`, `ECDH-ES+A128KW`, `ECDH-ES+A192KW` and `ECDH-ES+A256KW` | YES | |
80-
| `A128KW`, `A128KW` and `A128KW` | YES | |
81-
| `PBES2-HS256+A128KW`, `PBES2-HS384+A192KW` and `PBES2-HS512+A256KW` | YES | |
82-
| `A128GCMKW`, `A192GCMKW` and `A256GCMKW` | YES | |
83-
| `EdDSA` with `X25519` curve | YES | [With PHP 7.1, third party extension highly recommended](https://github.com/jedisct1/libsodium-php) |
84-
| `EdDSA` with `X448` curve | NO | No extension or built-in implementation available |
80+
| dir | YES | |
81+
| RSA1\_5, RSA-OAEP and RSA-OAEP-256 | YES | The algorithms RSA1\_5 and RSA-OAEP are now deprecated. Please use with caution. |
82+
| ECDH-ES, ECDH-ES+A128KW, ECDH-ES+A192KW and ECDH-ES+A256KW | YES | |
83+
| A128KW, A192KW and A256KW | YES | |
84+
| PBES2-HS256+A128KW, PBES2-HS384+A192KW and PBES2-HS512+A256KW | YES | |
85+
| A128GCMKW, A192GCMKW and A256GCMKW | YES | |
86+
| ECDH-ES with X25519 curve | YES | [With PHP 7.1, third party extension highly recommended](https://github.com/jedisct1/libsodium-php) |
87+
| ECDH-ES with X448 curve | NO | No extension or built-in implementation available |
88+
| RSA-OEAP-384 and RSA-OAEP-512 | YES | From v1.2. **Experimental. For testing purpose only.** |
89+
| ChaCha20-Poly1305 | YES | From v1.2. **Experimental. For testing purpose only.** |
8590

8691
### Supported Content Encryption Algorithms
8792

88-
| Content Encryption Algorithm | Supported |
93+
| Content Encryption Algorithm | Supported | Comment |
8994
| --- | :---: |
90-
| `A128CBC-HS256`, `A192CBC-HS384` and `A256CBC-HS512` | YES |
91-
| `A128GCM`, `A192GCM` and `A256GCM` | YES |
95+
| A128CBC-HS256, A192CBC+HS384 and A256CBC-HC512 | YES | |
96+
| A128GCM, A192GCM and A256GCM | YES | |
97+
| A128CTR, A192CTR and A256CTR | YES | From v1.2. **Not recommended. For testing purpose only.** |
9298

9399
## Prerequisites
94100

95101
This framework needs at least:
96102

97103
* ![PHP 7.1+](https://img.shields.io/badge/PHP-7.1%2B-ff69b4.svg),
98-
* OpenSSL extension.
99104
* GMP extension.
100105
* MBString extension.
101106

102-
Please consider the following optional requirements:
107+
Depending on the algorithms you using, other PHP extensions may be required \(e.g. OpenSSL\).
108+
109+
Please also consider the following optional requirements:
103110

104111
* If you intent to use `EdDSA` or `ECDH-ES` algorithm with `Ed25519`/`X25519` curves on PHP 7.1, please install this [third party extension](https://github.com/jedisct1/libsodium-php)
105112

106113
## Continuous Integration
107114

108115
It has been successfully tested using `PHP 7.1`, `PHP 7.2` and `nightly` with all algorithms.
109116

110-
Tests vectors from the [RFC 7520](http://tools.ietf.org/html/rfc7520) are fully implemented and all tests pass.
117+
Tests vectors from the [RFC 7520](http://tools.ietf.org/html/rfc7520) are fully implemented and all tests pass. Other test vector sources may be used \(e.g. new algorithm specifications\).
111118

112119
We also track bugs and code quality using [Scrutinizer-CI](https://scrutinizer-ci.com/g/web-token/jwt-framework) and [Sensio Insight](https://insight.sensiolabs.com/projects/b7efa68f-8962-41cf-a2e3-4444426bc95a).
113120

@@ -123,7 +130,7 @@ Code coverage is analyzed by [Coveralls.io](https://coveralls.io/github/web-toke
123130

124131
## Security Recommendations
125132

126-
**To avoid security issues on your application, please follow these **[**Security Recommendations**](security-recommendations.md)** carefully**.
133+
**To avoid security issues on your application, please follow these** [**Security Recommendations**](security-recommendations.md) **carefully**.
127134

128135
## Performances
129136

advanced-topics/signed-tokens-and/unencoded-payload.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ $jws = $jwsBuilder
1919
->build();
2020
```
2121

22-
_As a remainder, both _`b64`_ and _`crit`_ parameters MUST be in the protected header._
22+
_As a remainder, both_ `b64` _and_ `crit` _parameters MUST be in the protected header._
2323

benchmarks/result-table.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The table hereafter is the result of all benchmarks _with our development environment_. It is given to help you to select the appropriate algorithms for your application.
44

5-
**The use of the algorithm **`ECDH-ES`** with curves **`P-256`**, **`P-384`** or **`P-521`** is not recommended**. The cryptographic operations with those curves are done using a pure PHP function and hence very slow.
5+
**The use of the algorithm** `ECDH-ES` **with curves** `P-256`**,** `P-384` **or** `P-521` **is not recommended**. The cryptographic operations with those curves are done using a pure PHP function and hence very slow.
66

77
The use of the RSA algorithms with a very long key \(more that 4096 bits\) is quite slow, but offers a good protection.
88

components/key-jwk-and-key-set-jwkset/key-management.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ composer require web-token/jwt-key-mgmt
5151
* `EC` : Elliptic Curve key pair
5252
* `OKP`: Octet key pair
5353

54-
_Note: for the _`none`_ algorithm, the framework needs a key of type _`none`_. This is a specific key type that must only be used with this algorithm._
54+
_Note: for the_ `none` _algorithm, the framework needs a key of type_ `none`_. This is a specific key type that must only be used with this algorithm._
5555

5656
For all asymmetric keys, you will ALWAYS receive a private key.
5757

components/signed-tokens-jws/signature-algorithms.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This framework comes with several signature algorithms. These algorithms are in
2121
* `PS384`
2222
* `PS512`
2323
* Edwards-curve Digital Signature Algorithm \(EdDSA\)
24-
* `EdDSA` \(_only with the _`Ed25519`_ curve_\)
24+
* `EdDSA` \(_only with the_ `Ed25519` _curve_\)
2525
* Unsecured algorithm
2626
* `none`
2727

migration/from-spomky-labs-jose/header-checking.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ $checkerManager->add(new AudienceChecker('My Service'));
4141
$checkerManager->addTokenTypeSupport(new TokenSupport());
4242
```
4343

44-
_Please note that the header _`crit`_ is always checked._
44+
_Please note that the header_ `crit` _is always checked._
4545

0 commit comments

Comments
 (0)