Earlier quoted context omitted.
Bitcoin addresses are basically a public key, so you can generate them offline the same way you can generate pgp keys, openssl keys, SSH keys you use to access GitHub etc. The chances of a collision are so astronomically low that our sun will probably run out of fuel and explode before two identical keys are generated.
With the comfort of a public blockchain at hand why not eliminate this case at address-creation time?
A peek under Bitcoin’s hood: Writing a client that can create a transaction
31–40 of 67 posts
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#32I am actually really surprised it took a month for someone to swipe the BTC he sent to an address with a private key of 0xfacebeef. That could be found via an incremental search in under an hour of CPU search time on one computer. I note that compressed public keys are not being used in these examples - it's highly recommended to use them, since they reduce transaction size and cost. Regarding weak keys - there have…
Just a warning for people, I was playing around with BTC the other day and not generating random entropy from urandom, just putting in a short string. I found my BTC was stolen immediately when I did this. It wasn't a lot of coins, since I was just testing, but it certainly cost me some debugging time as I wondered how the extra transaction had occurred. Basically, someone out there has already generated the keys cor…
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#33Earlier quoted context omitted.
Bitcoin addresses are basically a public key, so you can generate them offline the same way you can generate pgp keys, openssl keys, SSH keys you use to access GitHub etc. The chances of a collision are so astronomically low that our sun will probably run out of fuel and explode before two identical keys are generated.
With the comfort of a public blockchain at hand why not eliminate this case at address-creation time?
Let's say the probability of someone cloning a Velociraptor within the next 20 years is 1 in 1 trillion. Let's say that given a Velociraptor has been cloned, it has a probability of 1 in 1 million of escaping. Let's say that given a Velociraptor is on the lam, it has a 1 in 100 billion chance of breaking into your house. Let's say that if there's a Velociraptor in your house, checking for it increases your chance of survival by 1%.
Let's assume there are 1 quadrillion Bitcoin addresses created.
Under the assumption of correct implementation, checking for velociraptors in your closet is literally more rational than checking for duplicate addresses.
Now, there is some value in checking for duplicate keys as a safeguard against implementation bugs, but that's best covered by generating a billion addresses on your own and checking for duplicates within your personal set.
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#34Looks like there was bitcoin left in the address he published the private key for until about 30 minutes ago. I hope that was a deliberate giveaway. https://blockchain.info/tx/2685ff794de17cebdf94eb0f111e8b8c0...
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#35Earlier quoted context omitted.
With the comfort of a public blockchain at hand why not eliminate this case at address-creation time?
Let's do some back-of-the-envelope calculations. Let's say the probability of someone cloning a Velociraptor within the next 20 years is 1 in 1 trillion. Let's say that given a Velociraptor has been cloned, it has a probability of 1 in 1 million of escaping. Let's say that given a Velociraptor is on the lam, it has a 1 in 100 billion chance of breaking into your house. Let's say that if there's a Velociraptor in your…
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#36Looks like there was bitcoin left in the address he published the private key for until about 30 minutes ago. I hope that was a deliberate giveaway. https://blockchain.info/tx/2685ff794de17cebdf94eb0f111e8b8c0...
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#37Article says > This is also why address reuse in Bitcoin is encouraged as to sign a transaction you need to reveal your public key. If you don't reuse an address after sending a transaction from the address, you don't need worry about the private key of that address being exposed. Shouldn't that say "address reuse in Bitcoin is discouraged "? Otherwise I don't think I understand what he's trying to say.
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#38Very cool. This could be used to implement offline wallet with minimal amount of third party code. One issue I'd like to point is I wish the author used proper random generated private key. Examples on the internet have a nasty habits of being copy pasted and reused verbatim :(
I don't think there's any harm in people copying and pasting examples, it only becomes an issue if they start depositing money to either of the addresses that I listed the private keys for. I hope that's an obvious enough mistake not to make! Thanks for the feedback anyway, I'll keep an eye on those addresses and if they start getting mysterious deposits change the article to include more cryptographically secure keys.
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#39Earlier quoted context omitted.
FWIW, I was looking at eth code in the weekend and it's pretty accessible (I was looking at go -- I've read that eth python should be even more readable). The address part is very similar, even simpler, than bitcoin. It's the same elliptic curve, same way to build private/public keys. For the address, it uses a different hash function, Keccak256, and then it's just serialized in hex. Code here [1]. Pointers to key ge…
Keccak256? Isn't that just SHA3 with a digest of 256 bits?