security: remove private key logging and fix shell variable quoting#162
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
security: remove private key logging and fix shell variable quoting#162devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
- Remove info!() calls that log private/secret key material in plaintext from bip-0360 ref-impl (lib.rs lines 131, 273-274, 491) - Remove private key value from slh_dsa_key_gen.rs log output (line 25), keeping only the key size - Downgrade remaining public key debug log from info!() to debug!() - Quote shell variables in signet_miner_loop.sh to prevent word splitting and glob expansion Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Signed-off-by: Marcel Raschke <42359664+MarcelRaschke@users.noreply.github.com> Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes plaintext private key logging from the bip-0360 reference implementation and fixes unquoted shell variables that could cause word splitting.
Changes
Private key logging removed (
bip-0360/ref-impl/rust/src/lib.rs):info!()call logging SLH-DSA private key during script construction (was line 131)info!()call logging allsecret_key_bytesofkeypairs_of_interest(was lines 273–274) — public keys and merkle root are still loggedinfo!()call logging SLH-DSA private key during signature creation (was line 491)info!()todebug!()Private key logging removed (
bip-0360/ref-impl/rust/src/bin/slh_dsa_key_gen.rs):info!()to log only the private key size, not the key valueShell variable quoting (
bip-0360/ref-impl/common/utils/signet_miner_loop.sh):$BITCOIN_SOURCE_DIR,$P2MR_ADDR, and$(date +%s)in the miner invocation to prevent word splitting/glob expansionNot fixed (noted for awareness)
bip-0158/go.mod):btcd/btcutilpinned to Jan 2019 snapshots. Updating would require code changes sincebtcutilwas absorbed intobtcd/btcutilin newer versions — risky without the ability to compile/test.bip-0158/gentestvectors.golines 175–176):User: "kek",Pass: "kek"for local btcd. These are clearly dev-only credentials for localhost, but worth noting.bip-0360/ref-impl/rust/examples/p2mr-end-to-end.sh):LEAF_SCRIPT_PRIV_KEY_HEXis exported. This is inherent to the end-to-end demo workflow (construction → spending) and can't be removed without breaking the flow.Link to Devin session: https://app.devin.ai/sessions/4225031c36e144a6bff2180ecebebfe3
Requested by: @MarcelRaschke