add argon2 kdf fields #1763

Closed
opened 2026-04-06 02:21:10 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @tessus on 2/1/2023

Changes:

  • added columns to db schema with DEFAULT NULL
  • added a pub enum UserKdfType
  • if UserKdfType is Argon2id, server responses will include 2 more KVPs for memory and parallelism

Test plan:

  • used quexten's webvault (which includes the UI changes for Argon2) to switch KDF to argon2 and back to pbkdf2
Previous text (for reference)

This is still a work in progess. The following items have to be clarified first:

  • default db values or NULL?
  • default iterations might have to be changed depending on the type (PBKDF2, ARGON2)
  • enum for kdf type?

During compilation I get an error:

error: recursion limit reached while expanding `__static_cond!`

consider increasing the recursion limit by adding a `#![recursion_limit = "194"]` attribute to your crate (`vaultwarden`)

However in the code it says:

// The recursion_limit is mainly triggered by the json!() macro.
// The more key/value pairs there are the more recursion occurs.
// We want to keep this as low as possible, but not higher then 128.
// If you go above 128 it will cause rust-analyzer to fail,

So, what now?

*Originally created by @tessus on 2/1/2023* Changes: - added columns to db schema with DEFAULT NULL - added a pub enum `UserKdfType` - if UserKdfType is Argon2id, server responses will include 2 more KVPs for memory and parallelism Test plan: - used quexten's webvault (which includes the UI changes for Argon2) to switch KDF to argon2 and back to pbkdf2 <details> <summary>Previous text (for reference)</summary> This is still a work in progess. The following items have to be clarified first: - default db values or NULL? - default iterations might have to be changed depending on the type (PBKDF2, ARGON2) - enum for kdf type? During compilation I get an error: ``` error: recursion limit reached while expanding `__static_cond!` consider increasing the recursion limit by adding a `#![recursion_limit = "194"]` attribute to your crate (`vaultwarden`) ``` However in the code it says: ``` // The recursion_limit is mainly triggered by the json!() macro. // The more key/value pairs there are the more recursion occurs. // We want to keep this as low as possible, but not higher then 128. // If you go above 128 it will cause rust-analyzer to fail, ``` So, what now? </details>
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1763