1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[PS-2251] Implement argon2 kdf (#4468)

* Implement argon2

* Remove argon2 webassembly warning

* Replace magic numbers by enum

* move packages

* cleanup call to argon2

* update call to node argon2

* don't need  wasm-eval

* revert config changes

* Update libs/common/src/enums/kdfType.ts

Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>

* Update kdfType.ts

* apply DEFAULT_PBKDF2_ITERATIONS

* checkIfWasmSupported

Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>
This commit is contained in:
Bernd Schoolmann
2023-01-26 15:20:12 +01:00
committed by GitHub
parent d02af23b30
commit e055e68991
18 changed files with 343 additions and 107 deletions

View File

@@ -1,7 +1,12 @@
export enum KdfType {
PBKDF2_SHA256 = 0,
Argon2id = 1,
}
export const DEFAULT_ARGON2_MEMORY = 19;
export const DEFAULT_ARGON2_PARALLELISM = 1;
export const DEFAULT_ARGON2_ITERATIONS = 2;
export const DEFAULT_KDF_TYPE = KdfType.PBKDF2_SHA256;
export const DEFAULT_KDF_ITERATIONS = 600000;
export const DEFAULT_PBKDF2_ITERATIONS = 600000;
export const SEND_KDF_ITERATIONS = 100000;