Skip to content

Conversation

@quexten
Copy link
Contributor

@quexten quexten commented Sep 30, 2025

๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/PM-26537

๐Ÿ“” Objective

Updates argon2 and enables the parallelism feature. This is implemented via rayon and should work out of the box on non-wasm builds.

โฐ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

๐Ÿฆฎ 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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 30, 2025

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ 2999ff47-bddd-42cb-9c40-7c46e33f1dfa

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Sep 30, 2025

Codecov Report

โœ… All modified and coverable lines are covered by tests.
โœ… Project coverage is 78.34%. Comparing base (79eb8c4) to head (4a7d0eb).
โš ๏ธ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #480      +/-   ##
==========================================
- Coverage   78.36%   78.34%   -0.03%     
==========================================
  Files         291      291              
  Lines       29343    29343              
==========================================
- Hits        22994    22988       -6     
- Misses       6349     6355       +6     

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

๐Ÿš€ New features to boost your workflow:
  • โ„๏ธ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • ๐Ÿ“ฆ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@quexten quexten force-pushed the dep/argon2-parallel branch from 7dc2454 to 604011f Compare October 6, 2025 10:22
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2025

@quexten quexten changed the title Update argon2 to support parallelism via rayon [PM-26537] Update argon2 to support parallelism via rayon Oct 6, 2025
@quexten quexten marked this pull request as ready for review October 23, 2025 16:58
@quexten quexten requested review from a team as code owners October 23, 2025 16:58
Copy link
Member

@dani-garcia dani-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! thankfully turned out to not need a lot of changes this time.

Out of curiosity, did you check what speed up we get with a benchmark?

@quexten
Copy link
Contributor Author

quexten commented Oct 27, 2025

@dani-garcia When testing locally on x86_64 I got a speedup linear to the parallelism (i.e for p=4 I got a 75% reduction in derivation time). This is the benchmarks of the original PR: RustCrypto/password-hashes#547 (comment)

I did not test on actual android / ios builds, but for our default KDF settings it should also result in a 75% reduction.

@quexten quexten merged commit 045ced5 into main Nov 3, 2025
53 checks passed
@quexten quexten deleted the dep/argon2-parallel branch November 3, 2025 14:20
bw-ghapp bot pushed a commit to bitwarden/sdk-swift that referenced this pull request Nov 3, 2025
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.

5 participants