MLDSA signature validation support#29
Open
hwupathum wants to merge 1 commit into
Open
Conversation
📝 WalkthroughWalkthroughChangesThe PR adds ML-DSA-44, ML-DSA-65, and ML-DSA-87 JWT verification support, updates JWK typing for AKP keys, upgrades ML-DSA JWT verification
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant DefaultCrypto
participant jose.importJWK
participant jose.jwtVerify
DefaultCrypto->>jose.importJWK: Import ML-DSA JWK
jose.importJWK-->>DefaultCrypto: Return CryptoKey or Uint8Array
DefaultCrypto->>jose.jwtVerify: Verify id_token
jose.jwtVerify-->>DefaultCrypto: Return verification result
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| export interface JWKInterface { | ||
| alg: string; | ||
| e: string; | ||
| e?: string; |
There was a problem hiding this comment.
Is this change intentional? why have we marked e and n as optional attributes?
Author
There was a problem hiding this comment.
Yes, the JWK format of MLDSA algorithm is different and does not have these parameters
Author
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.

Purpose
This pull request adds support for post-quantum ML-DSA (RFC 9864) algorithms using AKP JWKs to the JWT verification process, updates the
joselibrary to v6.2.3, and introduces corresponding tests and type updates. These changes ensure that the codebase can handle modern cryptographic standards and remain compatible with the latest library APIs.ML-DSA support and cryptographic updates:
ML-DSA-44,ML-DSA-65,ML-DSA-87) toTokenConstants.SUPPORTED_ALGORITHMSfor JWT signature validation.JWKInterfacetype to support AKP JWKs (RFC 9864) by makingeandnoptional and adding apubfield for raw public key bytes.DefaultCryptoandNodeCryptoUtilsto use the correct key type from the updatedjoselibrary. [1] [2]Testing and library upgrades:
DefaultCrypto.test.ts.josedependency from v5.2.0 to v6.2.3 across the codebase and lockfiles to ensure compatibility with new cryptographic features. [1] [2] [3] [4] [5] [6] [7] [8] [9]Approach
Update the jose library to 6.x.x version and update the algorithm constant list.
Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit