Merged
Conversation
voidmain
requested changes
Nov 21, 2025
Member
voidmain
left a comment
There was a problem hiding this comment.
A couple of comments and one possible error. Otherwise, looks good.
|
|
||
| // The JCA does not ship with SHAKE256 which will be used to calculate the hash for Ed448. | ||
| // - Expect this to fail unless FIPS has been enabled. | ||
| try { |
Member
There was a problem hiding this comment.
Can you replace this with a call to requireShake256?
| KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(curve); | ||
| keyPairGenerator.initialize(new NamedParameterSpec(curve), new SecureRandom() { | ||
| public void nextBytes(byte[] bytes) { | ||
| System.arraycopy(privateKey, 0, bytes, 0, privateKey.length); |
Member
There was a problem hiding this comment.
Can this throw an exception if privateKey is longer than bytes?
| key = privateKey; | ||
| } | ||
|
|
||
| key = Objects.requireNonNullElse(privateKey, publicKey); |
| case ES256: | ||
| case HS256: | ||
| case RS256: | ||
| leftMostBits = switch (algorithm) { |
Member
There was a problem hiding this comment.
Join lines with the variable declaration
| verifier.initVerify(publicKey); | ||
| verifier.update(message); | ||
|
|
||
| if (!(verifier.verify(signature))) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for EdDSA. Note that this will be moving the min. version of java to 17.
Ed25519andEd448Issue
Related
Update our listing on jwt.io to indicate our support for
Ed25519.