logoalt Hacker News

zshcoder • today at 7:21 AM • 2 replies • view on HN

Public keys end up in the blockchain transaction log as soon as you spend, right? So if a signature forgery attack is feasible on secp256k1 ecdsa, and you've ever sent anything from your wallet, I don't see why the attacker couldn't just send all your coins wherever they want.

edit: also taproot addresses (very common on modern hw wallets) are just your pubkey


Replies

Jach • today at 9:55 AM

In bitcoin core, your "wallet" is a collection of addresses, and the default behavior when you make a transaction under the amount that belongs to some source address(es) is to send the amount to the specified destination, and the remainder to a new "change" address, thus emptying out the original address(es) and avoiding address reuse. Most addresses on the chain with unspent outputs use the segwit format which just has a hash of the public key for the destination side, so as you and I said the public key doesn't get revealed until the destination tries to send. Not a problem under the majority of behavior where addresses aren't reused.

Taproot and legacy address schemes don't have quite the same protection -- indeed already some really old coins on a legacy address scheme have just moved to a segwit destination: https://www.bitkub.com/en/blog/four-satoshi-era-wallets-move...

➕ show 1 reply
benmmurphy • today at 8:54 AM

Modern BC uses the hash of the public key so the attacker needs to wait until you submit a tx to a miner then front run you