Skip to content

Commit

Permalink
deprecate ES512
Browse files Browse the repository at this point in the history
  • Loading branch information
pascaldekloe committed Jun 17, 2022
1 parent cd92944 commit 3a4b458
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,8 @@ The following results were measured with Go 1.19-beta1 on an Apple M1.
name time/op
ECDSA/sign-ES256-8 19.8µs ± 0%
ECDSA/sign-ES384-8 196µs ± 0%
ECDSA/sign-ES512-8 526µs ± 0%
ECDSA/check-ES256-8 58.7µs ± 0%
ECDSA/check-ES384-8 632µs ± 0%
ECDSA/check-ES512-8 1.92ms ± 1%
EdDSA/sign-EdDSA-8 24.9µs ± 0%
EdDSA/check-EdDSA-8 54.0µs ± 0%
HMAC/sign-HS256-8 664ns ± 1%
Expand Down
1 change: 0 additions & 1 deletion bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ func BenchmarkECDSA(b *testing.B) {
}{
{testKeyEC256, ES256},
{testKeyEC384, ES384},
{testKeyEC521, ES512},
}

for _, test := range tests {
Expand Down
7 changes: 7 additions & 0 deletions jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ const (
EdDSA = "EdDSA" // EdDSA signature algorithms
ES256 = "ES256" // ECDSA using P-256 and SHA-256
ES384 = "ES384" // ECDSA using P-384 and SHA-384
// Deprecated: Use ES384 instead.
// “Go just implemented all specified curves from FIPS 186. If I were to
// make that choice today we'd have only P-256 and P-384.
//
// In 12 years, they will either all be broken by quantum computers, or
// P-384 and P-521 will both stand.”
// — Filippo Valsorda
ES512 = "ES512" // ECDSA using P-521 and SHA-512
HS256 = "HS256" // HMAC using SHA-256
HS384 = "HS384" // HMAC using SHA-384
Expand Down

0 comments on commit 3a4b458

Please sign in to comment.