Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
| @@ -275,7 +276,7 @@ impl WrappedAccountCryptographicState { | |||
| ) -> Result<(SymmetricKeyId, Self), AccountCryptographyInitializationError> { | |||
| let user_key = ctx.make_symmetric_key(SymmetricKeyAlgorithm::XChaCha20Poly1305); | |||
| let private_key = ctx.make_private_key(PublicKeyEncryptionAlgorithm::RsaOaepSha1); | |||
| let signing_key = ctx.make_signing_key(SignatureAlgorithm::Ed25519); | |||
There was a problem hiding this comment.
Note: This defaults to ML-DSA for all v2 users!
🔍 SDK Breaking Change Detection ResultsSDK Version:
Breaking change detection completed. View SDK workflow |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #920 +/- ##
==========================================
- Coverage 83.50% 83.45% -0.05%
==========================================
Files 379 379
Lines 45720 45871 +151
==========================================
+ Hits 38178 38283 +105
- Misses 7542 7588 +46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| Value::Bytes(seed.to_vec()), | ||
| ), | ||
| ( | ||
| coset::Label::Int(AkpKeyParameter::Pub.to_i64()), |
There was a problem hiding this comment.
Note for reviewers; The cose spec says PUB is always required, even in private keys, so the private key (signing key) here contains both pub and private values.
There was a problem hiding this comment.
Is this per https://datatracker.ietf.org/doc/draft-ietf-cose-dilithium/ ?
It's quite odd to me that they chose to make pub required when previous RFCs ecdsa don't. It feels different enough for a comment to me.
There was a problem hiding this comment.
It's quite odd to me that they chose to make pub required when previous RFCs ecdsa don't.
It was not REQUIRED but RECOMMENDED to add them for eliptic curves. For RSA, it was also REQUIRED https://datatracker.ietf.org/doc/html/rfc8230/#section-4
o For public keys, the fields 'n' and 'e' MUST be present. All
other fields defined in the following table below MUST be absent.
o For private keys with two primes, the fields 'other', 'r_i',
'd_i', and 't_i' MUST be absent; all other fields MUST be present.
|
Requesting additional reviews from @dani-garcia as platform-support for Auth and @Hinton due to CXF changes |
|
Thanks. I'll note that the cxf changes are just tests, that the compiler complained about. (I did not dig into what changed). The same applies to the auth changes. |
harr1424
left a comment
There was a problem hiding this comment.
Exporter changes look good
MGibson1
left a comment
There was a problem hiding this comment.
This looks good to me, I am annoyed by the pub key decision so I wouldn't mind a comment there, but nothing else from me.
| Value::Bytes(seed.to_vec()), | ||
| ), | ||
| ( | ||
| coset::Label::Int(AkpKeyParameter::Pub.to_i64()), |
There was a problem hiding this comment.
Is this per https://datatracker.ietf.org/doc/draft-ietf-cose-dilithium/ ?
It's quite odd to me that they chose to make pub required when previous RFCs ecdsa don't. It feels different enough for a comment to me.
77b21c2 to
e0047f0
Compare
|




🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-34825
bitwarden/server#7435
📔 Objective
Adds post-quantum ML-DSA key pair support for v2 user identity key pairs.
Please note that ML-DSA-44 is FIPS-level-2 security level. It is FIPS compatible under:
https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.204.pdf
The encoding via cose is defined here:
https://datatracker.ietf.org/doc/draft-ietf-cose-dilithium/
The CTX parameter is left empty, since we already do context binding within the signed messages. We support only the randomized signature mode, because it is recommended.
ML-DSA are made the default key type for v2 users, so that they don't require a migration of signature keys to get post-quantum ready.
🚨 Breaking Changes