Skip to content

Add support for Ed25519 and Ed448#429

Merged
fdennis merged 32 commits intomainfrom
cose-alg-id
Oct 29, 2025
Merged

Add support for Ed25519 and Ed448#429
fdennis merged 32 commits intomainfrom
cose-alg-id

Conversation

@fdennis
Copy link
Copy Markdown
Contributor

@fdennis fdennis commented Aug 12, 2025

Fixes #319

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 12, 2025

Test Results

2 305 tests   2 297 ✅  1m 3s ⏱️
   46 suites      8 💤
   46 files        0 ❌

Results for commit 5e6177c.

♻️ This comment has been updated with latest results.

@fdennis fdennis requested a review from emlun August 18, 2025 13:40
Copy link
Copy Markdown
Member

@emlun emlun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright! 🙂 we'll also need corresponding constants in PublicKeyCredentialParameters, and to add Ed448 to the default preferredPubkeyParams (also in RelyingPartyV2). I'd say to add it after ES512, since Ed448 and ES512 are at the same security level and the current default prefers ES256 over EdDSA.

Then we also need some tests! 🙂

@emlun emlun self-requested a review October 27, 2025 15:27
Copy link
Copy Markdown
Member

@emlun emlun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I fixed a few small issues, refactored a couple things and tweaked code style a bit: https://github.com/Yubico/java-webauthn-server/pull/429/files/9cb7678ec627b8c40c8584ed6ac1dc7410e9215d..40acf2117024faf2192ea968bfcab3f513c05e61

  • I noticed that we're sometimes using the JCA identifier "EdDSA" (since before) and sometimes "Ed25519" or "Ed448", so I got curious about which is most appropriate. This led me to notice that some of these switch statements are no longer exhaustive, so I added tests to catch that: 14fa04a and 48464e4. d8f634d doesn't have a test, but rather addresses similar warnings from the Scala compiler.
  • Then commit 1f2c6b3 makes the change to using only the "Ed25519" and "Ed448" identifiers.
  • I noticed that the COSE alg of the key in the BasicAttestationEd448 test case was set to -7 (EdDSA), because that was still hard-coded in eddsaPublicKeyToCose: 070d895 and 3e06a2a.
  • Most of commits 03a2109 through 40acf21 are various refactorings and some subjective code style fixes. I think these changes make the code easier to read and follow (most of the affected code is from before the PR).

@fdennis fdennis marked this pull request as ready for review October 28, 2025 17:19
@fdennis fdennis merged commit 39899be into main Oct 29, 2025
20 checks passed
@fdennis fdennis deleted the cose-alg-id branch October 29, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Prefer fully-specified COSE algorithm identifiers

2 participants