jwt-eddsa 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +11 -0
- data/README.md +15 -0
- data/lib/jwt/eddsa/algo.rb +1 -5
- data/lib/jwt/eddsa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0d415ca54370f90339da39f00476c658febf70142ae5cd9ed641364937a1bdbe
|
|
4
|
+
data.tar.gz: 541bfdaff6cbdc4f3b7a968350419bc3870c9946efaf8266ed5175fb9dd56e7f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f9d5d3ae3ead1df70ee98122f2f07a385be566c2fe8423511786aa027267213bc6cb0be9f5e0b747ccb38d50e0cde74809958a36f35692003eec1e85dcdcd02
|
|
7
|
+
data.tar.gz: d92f359a73bd56a256f8681b4ef5cd3617476ab217197911f69b91b47e4596f7844c8ce147043b01cb4ca2eecb5e657315588f349b1bdb96bba064eca9a4fb25
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.0](https://github.com/jwt/ruby-jwt-eddsa/compare/v1.1.0...v2.0.0) (2026-11-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* signing with Ed25519 or ED25519, or with a JWK whose alg is Ed25519, now writes "alg": "Ed25519" instead of "alg": "EdDSA". Sign with EdDSA to keep the old header.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Sign Ed25519 tokens with the RFC 9864 algorithm name ([#35](https://github.com/jwt/ruby-jwt-eddsa/issues/35)) ([edcd974](https://github.com/jwt/ruby-jwt-eddsa/commit/edcd974f27f3dc329b2100010812fc0103017da5))
|
|
13
|
+
|
|
3
14
|
## [1.1.0](https://github.com/jwt/ruby-jwt-eddsa/compare/v1.0.0...v1.1.0) (2026-11-04)
|
|
4
15
|
|
|
5
16
|
|
data/README.md
CHANGED
|
@@ -27,6 +27,21 @@ token = JWT.encode({pay: "load"}, private_key, "EdDSA")
|
|
|
27
27
|
payload, header = JWT.decode(token, private_key.verify_key, true, algorithm: "EdDSA")
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
Two algorithm names are supported for Ed25519 keys:
|
|
31
|
+
|
|
32
|
+
- `EdDSA`, from [RFC 8037](https://datatracker.ietf.org/doc/html/rfc8037). Most JWT libraries support it.
|
|
33
|
+
- `Ed25519`, from [RFC 9864](https://datatracker.ietf.org/doc/html/rfc9864), which deprecates `EdDSA` in favour of names that identify the curve.
|
|
34
|
+
|
|
35
|
+
The `alg` header names the algorithm you sign with, in its registered spelling. ruby-jwt looks algorithm names up regardless of case, so signing with `Ed25519` or `ED25519` writes `"alg": "Ed25519"`, and signing with `EdDSA` writes `"alg": "EdDSA"`.
|
|
36
|
+
|
|
37
|
+
`JWT.decode` only accepts a token whose `alg` is one of the allowed algorithms, also when the keys come from a JWKS. A token signed with `Ed25519` is rejected when only `EdDSA` is allowed, and the other way round. `JWT::EncodedToken#verify_signature!` with a key passed directly checks the signature with the allowed algorithms, but does not compare them with the `alg` header.
|
|
38
|
+
|
|
39
|
+
An OKP JWK without `alg` uses `EdDSA`. To sign or verify `Ed25519` tokens with `JWT::Token` and `JWT::EncodedToken` using a JWK as the key, create the JWK with `alg: "Ed25519"`. In a JWKS given to `jwks:`, a JWK without `alg` verifies tokens with either name.
|
|
40
|
+
|
|
41
|
+
### Upgrading to 2.0
|
|
42
|
+
|
|
43
|
+
Signing with `Ed25519` or `ED25519`, or with a JWK whose `alg` is `Ed25519`, used to write `"alg": "EdDSA"`. It now writes `"alg": "Ed25519"`. If the tokens you sign must keep `"alg": "EdDSA"`, for example because the verifier only allows `EdDSA`, sign with `EdDSA` instead.
|
|
44
|
+
|
|
30
45
|
OKP JWKs must specify `crv: "Ed25519"` to provide a signing or verification key.
|
|
31
46
|
Requesting a key with a missing or unsupported curve (including `X25519` and
|
|
32
47
|
`Ed448`) raises `JWT::JWKError`. Such JWKs can still be imported, so an unrelated
|
data/lib/jwt/eddsa/algo.rb
CHANGED
data/lib/jwt/eddsa/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jwt-eddsa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joakim Antman
|
|
@@ -78,7 +78,7 @@ licenses:
|
|
|
78
78
|
metadata:
|
|
79
79
|
homepage_uri: https://github.com/jwt/ruby-jwt-eddsa
|
|
80
80
|
source_code_uri: https://github.com/jwt/ruby-jwt-eddsa
|
|
81
|
-
changelog_uri: https://github.com/jwt/ruby-jwt-eddsa/blob/
|
|
81
|
+
changelog_uri: https://github.com/jwt/ruby-jwt-eddsa/blob/v2.0.0/CHANGELOG.md
|
|
82
82
|
rubygems_mfa_required: 'true'
|
|
83
83
|
rdoc_options: []
|
|
84
84
|
require_paths:
|