Follow-up from the review discussion on #2545. While adding defer keyScalar.Zero() to DecodeWIF, @allocz noted that btcutil/wif.go has several other code paths where memory holding private-key material is not zeroed after use. Opening this to track a broader audit of key-zeroing hygiene across wif.go and to confirm the desired behavior against the project's security assumptions, separate from the scoped fix in #2545.
Refs #2545.
Follow-up from the review discussion on #2545. While adding
defer keyScalar.Zero()toDecodeWIF, @allocz noted thatbtcutil/wif.gohas several other code paths where memory holding private-key material is not zeroed after use. Opening this to track a broader audit of key-zeroing hygiene acrosswif.goand to confirm the desired behavior against the project's security assumptions, separate from the scoped fix in #2545.Refs #2545.