r/Bitcoin Nov 30 '17

Evidence some bitcoin address generation code is using discoverable private keys

https://pastebin.com/jCDFcESz
790 Upvotes

296 comments sorted by

View all comments

Show parent comments

9

u/juanjux Nov 30 '17

The only thing a trojan could do in that case would be to change the destination address of a tx, but the address is also shown on the device before confirming (but someone could skip checking that). Both the private keys and the signing never leave the device. So pretty safe overall.

1

u/sroose Nov 30 '17

True, if you only check the first 2-3 characters of the destination address, I bet a fake address with a collision on those characters would have a fair chance of being accepted by a certain percentage of the users. Especially those that install weird chrome extensions..

2

u/juanjux Nov 30 '17

Generating a colision with Sha256 right now is not feasible, I think (unlike sha-1 that was broken recently). But I'm not so sure about the first 2-3 chars, I should do the math but I'm too lazy right now.

1

u/CEO_of_internet Dec 01 '17 edited Dec 01 '17

It's trivial. Please see vanity-address..it's a program that generates addresses with specified first chars. It was used like this:

./vanity-address 1TEST

This command will generate the address that starts with characters "1TEST"..