From b54c12ba10c3f6607a6345caaa4d528e90f1ce0a Mon Sep 17 00:00:00 2001 From: whoswhip Date: Thu, 5 Mar 2026 22:03:32 -0500 Subject: [PATCH] fix(encryption): improve encryption security: adjust salt size and memory parameters for AES encryption --- SharpbinV3.Client/src/lib/utils/encryption.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/SharpbinV3.Client/src/lib/utils/encryption.ts b/SharpbinV3.Client/src/lib/utils/encryption.ts index 34a1b4b..6e5a3b8 100644 --- a/SharpbinV3.Client/src/lib/utils/encryption.ts +++ b/SharpbinV3.Client/src/lib/utils/encryption.ts @@ -20,8 +20,8 @@ function fromBase64(data: string): Uint8Array { export async function encryptAES(content: string, password: string): Promise { const enc = new TextEncoder(); - const salt = window.crypto.getRandomValues(new Uint8Array(32)); - const memorySize = 65536; + const salt = window.crypto.getRandomValues(new Uint8Array(16)); + const memorySize = 262144; const iterations = 3; const parallelism = 1; @@ -37,8 +37,8 @@ export async function encryptAES(content: string, password: string): Promise