Skip to content
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

Implement KeyEncryptable support for Asymmetric keys #447

Merged
merged 10 commits into from
Jan 12, 2024

Conversation

dani-garcia
Copy link
Member

Type of change

- [ ] Bug fix
- [ ] New feature development
- [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Implement KeyEncryptable support for Asymmetric keys.

Copy link

codecov bot commented Dec 18, 2023

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (b385d2d) 49.51% compared to head (fc4ef1b) 50.04%.

Files Patch % Lines
crates/bitwarden/src/crypto/key_encryptable.rs 25.00% 6 Missing ⚠️
...ates/bitwarden/src/crypto/asymmetric_crypto_key.rs 95.83% 3 Missing ⚠️
...ates/bitwarden/src/crypto/enc_string/asymmetric.rs 95.65% 2 Missing ⚠️
crates/bitwarden/src/client/encryption_settings.rs 50.00% 1 Missing ⚠️
...rates/bitwarden/src/crypto/symmetric_crypto_key.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #447      +/-   ##
==========================================
+ Coverage   49.51%   50.04%   +0.53%     
==========================================
  Files         154      155       +1     
  Lines        7398     7467      +69     
==========================================
+ Hits         3663     3737      +74     
+ Misses       3735     3730       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

dani-garcia added a commit that referenced this pull request Dec 19, 2023
## Type of change

```
- [ ] Bug fix
- [ ] New feature development
- [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
```

## Objective
Split `EncString` into an asymmetric variant. I've left the symmetric
variant with the name `EncString` as it's the most common variant to
avoid major changes.

This is somewhat related to #447 and should be merged first so that PR
can take advantage of the symm/asymm separation.

I've moved the `EncString` files into their own folder to organize the
crypto directory a bit better too.
# Conflicts:
#	crates/bitwarden/src/client/encryption_settings.rs
#	crates/bitwarden/src/crypto/enc_string/symmetric.rs
@dani-garcia dani-garcia requested a review from Hinton December 19, 2023 16:31
# Conflicts:
#	crates/bitwarden/src/client/encryption_settings.rs
@dani-garcia dani-garcia requested a review from Hinton January 9, 2024 11:31
# Conflicts:
#	crates/bitwarden/src/crypto/enc_string/asymmetric.rs
#	crates/bitwarden/src/crypto/symmetric_crypto_key.rs
Hinton
Hinton previously approved these changes Jan 11, 2024
# Conflicts:
#	crates/bitwarden/src/crypto/symmetric_crypto_key.rs
@dani-garcia dani-garcia merged commit 4c91270 into main Jan 12, 2024
42 checks passed
@dani-garcia dani-garcia deleted the ps/key-refactor-generic branch January 12, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants