From acd6608d4343fc003131122e7e181987d757104d Mon Sep 17 00:00:00 2001 From: Martin Domajnko <35891136+martines3000@users.noreply.github.com> Date: Mon, 4 Sep 2023 10:27:11 +0000 Subject: [PATCH] fix: increase num of iterations (#459) --- .changeset/three-balloons-heal.md | 5 +++++ packages/snap/src/Encryption.service.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/three-balloons-heal.md diff --git a/.changeset/three-balloons-heal.md b/.changeset/three-balloons-heal.md new file mode 100644 index 000000000..05dcf12b3 --- /dev/null +++ b/.changeset/three-balloons-heal.md @@ -0,0 +1,5 @@ +--- +'@blockchain-lab-um/masca': patch +--- + +Increase number of iterations for PBKDF2 to 600k. diff --git a/packages/snap/src/Encryption.service.ts b/packages/snap/src/Encryption.service.ts index 6da095c52..db83afa77 100644 --- a/packages/snap/src/Encryption.service.ts +++ b/packages/snap/src/Encryption.service.ts @@ -36,7 +36,7 @@ class EncryptionService { { name: 'PBKDF2', salt, - iterations: 100000, + iterations: 600000, hash: 'SHA-256', }, importedKey, @@ -94,12 +94,12 @@ class EncryptionService { { name: 'PBKDF2', salt: hexToUint8Array(salt), - iterations: 100000, + iterations: 600000, hash: 'SHA-256', }, importedKey, { name: 'AES-GCM', length: 256 }, - true, + false, ['encrypt', 'decrypt'] );