-
Notifications
You must be signed in to change notification settings - Fork 50
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
[PM-5691] Extract crypto to separate crate #402
Conversation
No New Or Fixed Issues Found |
# Conflicts: # crates/bitwarden-crypto/src/enc_string.rs # crates/bitwarden-crypto/src/rsa.rs # crates/bitwarden/Cargo.toml # crates/bitwarden/src/auth/login/access_token.rs # crates/bitwarden/src/auth/login/api_key.rs # crates/bitwarden/src/auth/login/password.rs # crates/bitwarden/src/client/client.rs # crates/bitwarden/src/client/encryption_settings.rs # crates/bitwarden/src/crypto/enc_string.rs # crates/bitwarden/src/crypto/enc_string/symmetric.rs # crates/bitwarden/src/crypto/mod.rs # crates/bitwarden/src/mobile/crypto.rs # crates/bitwarden/src/tool/generators/client_generator.rs # crates/bitwarden/src/tool/generators/passphrase.rs # crates/bitwarden/src/uniffi_support.rs # crates/bitwarden/src/vault/cipher/attachment.rs # crates/bitwarden/src/vault/cipher/card.rs # crates/bitwarden/src/vault/cipher/cipher.rs # crates/bitwarden/src/vault/cipher/field.rs # crates/bitwarden/src/vault/cipher/identity.rs # crates/bitwarden/src/vault/cipher/login.rs # crates/bitwarden/src/vault/cipher/secure_note.rs # crates/bitwarden/src/vault/collection.rs # crates/bitwarden/src/vault/folder.rs # crates/bitwarden/src/vault/password_history.rs # crates/bitwarden/src/vault/send.rs
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #402 +/- ##
==========================================
+ Coverage 50.04% 50.15% +0.10%
==========================================
Files 155 157 +2
Lines 7467 7493 +26
==========================================
+ Hits 3737 3758 +21
- Misses 3730 3735 +5 ☔ View full report in Codecov by Sentry. |
# Conflicts: # crates/bitwarden/src/platform/generate_fingerprint.rs
# Conflicts: # crates/bitwarden/src/error.rs # crates/bitwarden/src/vault/send.rs
# Conflicts: # crates/bitwarden-crypto/src/keys/symmetric_crypto_key.rs # crates/bitwarden/src/crypto/mod.rs # crates/bitwarden/src/vault/send.rs
# Conflicts: # crates/bitwarden/src/auth/password.rs
# Conflicts: # crates/bitwarden-crypto/src/enc_string/asymmetric.rs # crates/bitwarden-crypto/src/enc_string/symmetric.rs # crates/bitwarden-crypto/src/keys/master_key.rs # crates/bitwarden-crypto/src/keys/symmetric_crypto_key.rs # crates/bitwarden-crypto/src/rsa.rs # crates/bitwarden/src/auth/login/access_token.rs # crates/bitwarden/src/client/access_token.rs # crates/bitwarden/src/platform/generate_fingerprint.rs
# Conflicts: # crates/bitwarden-crypto/src/enc_string/symmetric.rs # crates/bitwarden-crypto/src/keys/master_key.rs # crates/bitwarden-crypto/src/keys/symmetric_crypto_key.rs # crates/bitwarden/src/crypto/mod.rs
# Conflicts: # crates/bitwarden-crypto/src/keys/master_key.rs # crates/bitwarden/src/crypto/mod.rs
# Conflicts: # crates/bitwarden-crypto/src/asymmetric_crypto_key.rs # crates/bitwarden-crypto/src/enc_string/asymmetric.rs # crates/bitwarden-crypto/src/encryptable.rs # crates/bitwarden-crypto/src/keys/key_encryptable.rs # crates/bitwarden-crypto/src/keys/symmetric_crypto_key.rs # crates/bitwarden/src/client/encryption_settings.rs # crates/bitwarden/src/crypto/mod.rs # crates/bitwarden/src/vault/cipher/attachment.rs # crates/bitwarden/src/vault/cipher/card.rs # crates/bitwarden/src/vault/cipher/cipher.rs # crates/bitwarden/src/vault/cipher/field.rs # crates/bitwarden/src/vault/cipher/identity.rs # crates/bitwarden/src/vault/cipher/local_data.rs # crates/bitwarden/src/vault/cipher/login.rs # crates/bitwarden/src/vault/cipher/secure_note.rs # crates/bitwarden/src/vault/collection.rs # crates/bitwarden/src/vault/folder.rs # crates/bitwarden/src/vault/password_history.rs # crates/bitwarden/src/vault/send.rs
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.
There's a need to add bitwarden-crypto
here: https://github.com/bitwarden/sdk/blob/1028efde6557e30d241c03fd4754d32fe38db17a/.github/workflows/version-bump.yml#L18
And also to publish workflow: https://github.com/bitwarden/sdk/blob/main/.github/workflows/publish-rust-crates.yml
Continuation on #402. This PR extracts the generators to their own crate to establish clear boundaries between the code. There is still some logic in the client to expose generators that we may want to revisit. Also extracts explicit errors for the different generators for better error handling downstream when/if desired.
Type of change
Objective
We should make an effort to break up the large
bitwarden
crate into smaller more isolated crates. This extracts the cryptographic primitives into a crate, which better isolates them and may improve compile time slightly. We should continue to extract further areas.Code changes
crates/bitwarden-crypto
.Screenshots
Before you submit