Live data from Hacker News

A peek under Bitcoin’s hood: Writing a client that can create a transaction

samlewis.me

61–67 of 67 posts

Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction

#61

Earlier quoted context omitted.

I was under the impression that ecdsa was potentially broken by quantum computers, but SHA-256 was not. Is that not the case?

Yes, in theory. See https://en.wikipedia.org/wiki/Elliptic_curve_cryptography#Qu... ECDSA is vulnerable to a modified version of Shor's quantum integer factorization algorithm. However, nobody on Earth is known to be close to producing such a computer. Adiabatic quantum computers like the ones produced by D-Wave are not known to be capable of running Shor's algorithm. See https://en.wikipedia.org/wiki/Adiabatic_quant…

Huh I knew that Grover's algorithm would yield speed ups in db searches, but apparently I didn't read the wikipedia article closely enough. It allows for inversion of any function in sqrt time!

Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction

#62

Earlier quoted context omitted.

There are many of us with bots sweeping weak keys. Some of us give the coins back to a safe address, some people just keep it. It's like finding money on the sidewalk.

A lot of people are equating this to theft. While I can see their point, the concept of ownership in bitcoin is closely tied to control of the private keys. In this case many people control certain weak private keys so in a way you are giving your money away by sending to these addresses.

Taking money from someone who did not intend to give it to you is a dick move, regardless of legality or technical difficulty of doing so.

Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction

#63
post #40

Wrt transactions, I don't understand why you need to send yourself the unspent BTCs. Why does it make things significantly easier?

It's essentially for efficiency but not merely; it would be impractical to do with partial spends. Transactions are immutable and spend all of their inputs because it's easier to track and verify no double spend has occurred. If you allowed for partial spends, you'd have to trace the ancestry and descendants of all the transactions to verify whether there was enough bitcoin to spend it. This way if you have a transaction and it hasn't been spent since it originated, you know exactly how much can be spent.

I think it's natural to think of addresses as having a certain amount of bitcoin in them like an account at a bank. But bitcoin doesn't actually have accounts with balances. It just has transactions that have yet to be spent. You can calculate the amount of bitcoin that is spendable by an address so it looks like an account, which is what every wallet does but underneath it's just a collection of transactions that point to some address that you have the private key of.

Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction

#64

Earlier quoted context omitted.

There are many of us with bots sweeping weak keys. Some of us give the coins back to a safe address, some people just keep it. It's like finding money on the sidewalk.

This is like admitting to stealing things from people who leave their houses unlocked. If you think that is all good then you need to re-evaluate your life choices.

You can try to create whatever analogy you want that makes it seem worse, but it's a fact that if you use a weak key somebody is going to sweep it. The only thing preventing it from being lost forever is people getting it first and returning it to secure keys.

Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction

#65
post #62

Earlier quoted context omitted.

A lot of people are equating this to theft. While I can see their point, the concept of ownership in bitcoin is closely tied to control of the private keys. In this case many people control certain weak private keys so in a way you are giving your money away by sending to these addresses.

Taking money from someone who did not intend to give it to you is a dick move, regardless of legality or technical difficulty of doing so.

If it can be taken, somebody is going to take it. It can be people that intend to keep it, or could be a person to intends to give it back. If you left a bunch of money unsecured, which would you prefer? Not having it taken isn't an option if you use a weak key.

Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction

#66

Earlier quoted context omitted.

There are many of us with bots sweeping weak keys. Some of us give the coins back to a safe address, some people just keep it. It's like finding money on the sidewalk.

No, it's like picking money off the sidewalk when someone drops their coins and then running away.

It depends on if they "run away" and keep it, or if they return it to the proper owner in a secure manner.

Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction

#67
post #59

Earlier quoted context omitted.

There are many of us with bots sweeping weak keys. Some of us give the coins back to a safe address, some people just keep it. It's like finding money on the sidewalk.

It's more like stealing from an unlocked locker at a public pool.

Not incorrect, but only if you assume the pool is available to every person on Earth and that no government has jurisdiction over things. In that case, I would personally take the items from the locker and leave information on how to securely retrieve them.
Post reply on HN