What is Nostr?
laanwj /
npub1p23…rnl6
2024-11-05 16:02:12
in reply to nevent1q…k05a

laanwj on Nostr: that's just not true, bitcoin core developers were well aware of the edge cases of ...

that's just not true, bitcoin core developers were well aware of the edge cases of memset-before-deallocation for a long time

here's the commit from 2012 that introduces use of OPENSSL_cleanse() instead of memset:
https://github.com/bitcoin/bitcoin/commit/0f8a6477825fbaad0d37233bdd3011d748f607ab

in addition to cleaning up, secure_allocator uses a pool of locked memory to keep wallet keys and such out of swap space

memset, where it is used for cleaning up keys, is used with an extra memory barrier to prevent it from being optimized away. this is the same method used many other libraries such as BoringSSL as well and even the linux kernel
Author Public Key
npub1p23eukh0nxsqpfaakz6fj9vvj27y4gs0kevnrffdq4d4adkl7uuq7crnl6