From 71a81e9922a30cb6d8a02b08926d171fbf343384 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 03:12:21 +0000 Subject: [PATCH 1/3] Initial plan From ba26c3ec32c66bfd3688527179d88eb22cf21765 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 03:14:02 +0000 Subject: [PATCH 2/3] Simplify secureZero in evm.ts to only use fill(0) Co-authored-by: Corey-Code <37006206+Corey-Code@users.noreply.github.com> --- src/lib/crypto/evm.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/crypto/evm.ts b/src/lib/crypto/evm.ts index 699f2cf..557106f 100644 --- a/src/lib/crypto/evm.ts +++ b/src/lib/crypto/evm.ts @@ -116,12 +116,9 @@ function deriveChild( } /** - * Securely zero out a Uint8Array to prevent sensitive data from lingering in memory + * Zero out a Uint8Array to prevent sensitive data from lingering in memory */ function secureZero(arr: Uint8Array): void { - if (typeof crypto !== 'undefined' && crypto.getRandomValues) { - crypto.getRandomValues(arr); - } arr.fill(0); } From eda902034e250756dee06cd36174d290e6a6573e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 03:14:30 +0000 Subject: [PATCH 3/3] Update secureZero comment to be more accurate about memory guarantees Co-authored-by: Corey-Code <37006206+Corey-Code@users.noreply.github.com> --- src/lib/crypto/evm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/crypto/evm.ts b/src/lib/crypto/evm.ts index 557106f..579c99f 100644 --- a/src/lib/crypto/evm.ts +++ b/src/lib/crypto/evm.ts @@ -116,7 +116,7 @@ function deriveChild( } /** - * Zero out a Uint8Array to prevent sensitive data from lingering in memory + * Clear a Uint8Array to reduce the likelihood of sensitive data lingering in memory */ function secureZero(arr: Uint8Array): void { arr.fill(0);