-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Switch to rustcrypto argon2 on desktop #11753
Conversation
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.
Changes LGTM, but we should also remove these lines in the electron builder config:
clients/apps/desktop/electron-builder.json
Lines 23 to 26 in e39ab59
"!**/node_modules/argon2/**/*", | |
"**/node_modules/argon2/argon2.cjs", | |
"**/node_modules/argon2/package.json", | |
"**/node_modules/argon2/build/Release/argon2.node" |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #11753 +/- ##
==========================================
- Coverage 33.53% 33.51% -0.03%
==========================================
Files 2886 2892 +6
Lines 90152 90229 +77
Branches 17135 17128 -7
==========================================
+ Hits 30235 30239 +4
- Misses 57527 57599 +72
- Partials 2390 2391 +1 ☔ View full report in Codecov by Sentry. |
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.
I think there are some changes to Cargo.lock that haven't been commited since the addition of the zeroize feature. I've tried to build this branch locally and my Cargo.lock gets updated
Sorry about that, fixed now. |
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.
Looking good, a few minor things to check out.
Co-authored-by: Thomas Avery <[email protected]>
8206e30
No New Or Fixed Issues Found |
Just noticed one webpack config that still references the old clients/apps/desktop/webpack.main.js Line 85 in 5592d64
|
It was waiting for QA. Let's test this on main instead, given we have a long window until next rc cut. Enabling automerge. |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-14185
flathub/com.bitwarden.desktop#222
📔 Objective
Cross-compiling and building desktop in some environments (arm cross compile; flatpak build from source) is made difficult by the native CPP dependency. This PR switches the desktop argon2 implementation to use rustcrypto's argon2 crate (same as the SDK) via desktop_native. Note: The crate currently implements parallelism sequentially, so this change does have a performance impact. In a quick measurement, for the default settings (with parallelism = 4), unlock was 33% as fast as the npm module. However, given that other clients use the same rust implementation via the sdk, this seems like a reasonable trade-off.
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes