From 9c3f4ff8d40cf9208290d9073d6151f17ceecbb9 Mon Sep 17 00:00:00 2001 From: pasta Date: Thu, 13 Aug 2026 13:56:20 -0500 Subject: [PATCH] fix(bls): cleanse generated secret candidate --- src/bls/bls.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bls/bls.cpp b/src/bls/bls.cpp index 49981ee9190f..8d5b1b83703c 100644 --- a/src/bls/bls.cpp +++ b/src/bls/bls.cpp @@ -8,6 +8,7 @@ #ifndef BUILD_BITCOIN_INTERNAL #include +#include #endif #include @@ -73,6 +74,7 @@ void CBLSSecretKey::MakeNewKey() } catch (...) { } } + memory_cleanse(buf, sizeof(buf)); fValid = true; cachedHash.SetNull(); }