-
-
Notifications
You must be signed in to change notification settings - Fork 60
Add MLDSA{65,87}
support
#229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
==========================================
- Coverage 83.79% 83.61% -0.18%
==========================================
Files 56 60 +4
Lines 1493 1532 +39
==========================================
+ Hits 1251 1281 +30
- Misses 242 251 +9
🚀 New features to boost your workflow:
|
Package.swift
Outdated
@@ -27,11 +27,26 @@ let package = Package( | |||
.product(name: "Logging", package: "swift-log"), | |||
] | |||
), | |||
.target( | |||
name: "_QuantumJWTKit", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_PQJWTKit (post-quantum == PQ) sounds cooler to me which is also in line with acronyms like "PQC" (post-quantum cryptography). Though Quantum
is also fine with me since it's more clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I didn't think about that! I had considered _PostQuantumJWTKit
but it seems a bit long. Although yes, I think just your version is a bit less clear
Why don't we hide these algorithms behind a |
@fpseverino yes that was in fact the plan in the beginning. And nothing has changed, I just forgot 🙈 done! |
MLDSA{65,87}
support inside new _QuantumJWTKit
moduleMLDSA{65,87}
support
Are we expecting these APIs to ever change? Or should we use a package trait instead of SPI? |
The RFC isn't final yet so even though unlikely the spec and therefore the APIs might still change |
We should now depend on the |
Since swift-crypto now supports ML-DSA{65,87}, this adds support for ML-DSA based JWTs. While ML-DSA is now a formalised standard (RFC 204), its usage in JOSE is still in draft state, which means its specification could change.
Because of this, we're hiding the new APIs behind
@_spi(PostQuantum)
annotations, separating them from the public API and allowing therefore breaking changes, at least until the specification will be finalised.To use them, simply
but know that the APIs could be subject to change outside of major versions of JWTKit.
This PR is currently refers to the main branch of swift-crypto since no release has yet been tagged with the new post-quantum algorithms. This will change as soon as a decision is made whether to release the new APIs as a minor release before the new 2026 Crypto major release, or to wait and have them in the main Crypto module. (Discussion happening here)