[PR #2328] [MERGED] [PS-2358] Add kdf configuration options #67457

Closed
opened 2026-05-14 09:36:55 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2328
Author: @quexten
Created: 1/25/2023
Status: Merged
Merged: 1/30/2023
Merged by: @kspearrin

Base: masterHead: feature/kdf-options


📝 Commits (10+)

  • eaf79b9 Implement kdf configuration
  • e765f2d Remove unused import
  • b016914 Move kdf parameters to kdfConfiguration struct
  • d3fb671 Remove unused state migration service keys
  • 8aabd1c Revert newline changes in PCLCryptoFunctionService
  • b95fccf Merge branch 'master' into feature/kdf-options
  • d737c81 Update KdfConfiguration.cs
  • afd4240 Add checks for argon2, clean statemigration service
  • 4ff8a7e Update constants
  • 5804842 Clean up code

📊 Changes

20 files changed (+135 additions, -101 deletions)

View changed files

📝 src/App/Pages/Accounts/LockPageViewModel.cs (+5 -8)
📝 src/App/Pages/Accounts/RegisterPageViewModel.cs (+6 -4)
📝 src/App/Pages/Accounts/SetPasswordPageViewModel.cs (+7 -6)
📝 src/App/Pages/Accounts/UpdateTempPasswordPageViewModel.cs (+2 -3)
📝 src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs (+2 -5)
📝 src/Core/Abstractions/ICryptoService.cs (+3 -4)
📝 src/Core/Abstractions/IStateService.cs (+1 -4)
📝 src/Core/Constants.cs (+4 -1)
📝 src/Core/Models/Domain/Account.cs (+4 -0)
src/Core/Models/Domain/KdfConfiguration.cs (+27 -0)
📝 src/Core/Models/Request/RegisterRequest.cs (+2 -0)
📝 src/Core/Models/Request/SetKeyConnectorKeyRequest.cs (+7 -4)
📝 src/Core/Models/Request/SetPasswordRequest.cs (+2 -0)
📝 src/Core/Models/Response/IdentityTokenResponse.cs (+4 -0)
📝 src/Core/Models/Response/PreloginResponse.cs (+5 -0)
📝 src/Core/Services/AuthService.cs (+5 -7)
📝 src/Core/Services/CryptoService.cs (+34 -18)
📝 src/Core/Services/StateService.cs (+5 -25)
📝 src/iOS.Core/Controllers/BaseLockPasswordViewController.cs (+5 -6)
📝 src/iOS.Core/Controllers/LockPasswordViewController.cs (+5 -6)

📄 Description

Type of change

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

Objective

This PR adds configuration option support for the argon2 kdf.

Code changes

For all files: Basically anywhere where kdfIterations / kdfType is used (in requests, stateservice) we simply add the optional variables kdfMemory and kdfParalleism. The defaults are: 64 (MiB) for memory and 4 parallelism.

This reopens mistakenly closed: https://github.com/bitwarden/mobile/pull/2322

I just applied the commit as a patch on the latest master, though there were 2 errors, which I can check in ~2 hours.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2328 **Author:** [@quexten](https://github.com/quexten) **Created:** 1/25/2023 **Status:** ✅ Merged **Merged:** 1/30/2023 **Merged by:** [@kspearrin](https://github.com/kspearrin) **Base:** `master` ← **Head:** `feature/kdf-options` --- ### 📝 Commits (10+) - [`eaf79b9`](https://github.com/bitwarden/android/commit/eaf79b90a618ee16d6f36ac59f05128462bd6e5b) Implement kdf configuration - [`e765f2d`](https://github.com/bitwarden/android/commit/e765f2de659d219f34b19c6523bf92baa958f809) Remove unused import - [`b016914`](https://github.com/bitwarden/android/commit/b016914520711492ff2dfce1cb973ec29e93bf22) Move kdf parameters to kdfConfiguration struct - [`d3fb671`](https://github.com/bitwarden/android/commit/d3fb671ac8a05e5f57d6dcddda5fbf5af6642e13) Remove unused state migration service keys - [`8aabd1c`](https://github.com/bitwarden/android/commit/8aabd1c4f328095572b66021ed12e54a63378a5b) Revert newline changes in PCLCryptoFunctionService - [`b95fccf`](https://github.com/bitwarden/android/commit/b95fccf51f218b47751305dcb5b6ab193cc016df) Merge branch 'master' into feature/kdf-options - [`d737c81`](https://github.com/bitwarden/android/commit/d737c8149797809a3e1857fff0ba464a4067f697) Update KdfConfiguration.cs - [`afd4240`](https://github.com/bitwarden/android/commit/afd42406060d62cb0726e52af49a9df6ca5deeea) Add checks for argon2, clean statemigration service - [`4ff8a7e`](https://github.com/bitwarden/android/commit/4ff8a7ecdb6b2e8ea4c22cb378ae9e3b226a2659) Update constants - [`5804842`](https://github.com/bitwarden/android/commit/58048427009097c3497bddd92952c27bfc5490e0) Clean up code ### 📊 Changes **20 files changed** (+135 additions, -101 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Accounts/LockPageViewModel.cs` (+5 -8) 📝 `src/App/Pages/Accounts/RegisterPageViewModel.cs` (+6 -4) 📝 `src/App/Pages/Accounts/SetPasswordPageViewModel.cs` (+7 -6) 📝 `src/App/Pages/Accounts/UpdateTempPasswordPageViewModel.cs` (+2 -3) 📝 `src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs` (+2 -5) 📝 `src/Core/Abstractions/ICryptoService.cs` (+3 -4) 📝 `src/Core/Abstractions/IStateService.cs` (+1 -4) 📝 `src/Core/Constants.cs` (+4 -1) 📝 `src/Core/Models/Domain/Account.cs` (+4 -0) ➕ `src/Core/Models/Domain/KdfConfiguration.cs` (+27 -0) 📝 `src/Core/Models/Request/RegisterRequest.cs` (+2 -0) 📝 `src/Core/Models/Request/SetKeyConnectorKeyRequest.cs` (+7 -4) 📝 `src/Core/Models/Request/SetPasswordRequest.cs` (+2 -0) 📝 `src/Core/Models/Response/IdentityTokenResponse.cs` (+4 -0) 📝 `src/Core/Models/Response/PreloginResponse.cs` (+5 -0) 📝 `src/Core/Services/AuthService.cs` (+5 -7) 📝 `src/Core/Services/CryptoService.cs` (+34 -18) 📝 `src/Core/Services/StateService.cs` (+5 -25) 📝 `src/iOS.Core/Controllers/BaseLockPasswordViewController.cs` (+5 -6) 📝 `src/iOS.Core/Controllers/LockPasswordViewController.cs` (+5 -6) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [x] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> This PR adds configuration option support for the argon2 kdf. ## Code changes For all files: Basically anywhere where kdfIterations / kdfType is used (in requests, stateservice) we simply add the optional variables kdfMemory and kdfParalleism. The defaults are: 64 (MiB) for memory and 4 parallelism. This reopens mistakenly closed: https://github.com/bitwarden/mobile/pull/2322 I just applied the commit as a patch on the latest master, though there were 2 errors, which I can check in ~2 hours. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-14 09:36:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#67457