How does Bitcoin work?
Self Test
-
Answer:
A digital signature is a signature that covers a specific message with a specific private key.
-
Answer:
Handwritten signatures look the same on every document that they appear. Digital signatures are specific to the document, or message, that they sign.
-
Answer:
The message, the public key for the entity that signed the message, and the signature itself.
-
Answer:
It’s trivial to make perfect copies of digital transactions. For any electronic money system, the double-spend problem refers to trying to prevent the transaction “Alice pays $100” from being used over and over again. This is typically solved using a centralised ledger (i.e. a bank). Bitcoin solves the double-spend problem without requiring a centralised authority controlling the ledger.
-
Answer:
It is a function that takes arbitrary data as input as returns a number that
- appears to be randomly generated,
- cannot be “reversed” without an infeasible amount of work.
Essentially, a hash function is a one-way function that returns a summary, or digest of the input data that is indistinguishable from a random result.
-
Answer:
It is a cryptographic exercise that statistically requires a predetermined amount of effort to produce, but very little effort to verify. For example, you might require someone to hash a list of transactions along with a number (called a nonce) that produces a digest that starts with 30 zeros.
Because hash functions are one-way functions, you know that someone had to do 2^20 (roughly 1,000,000,000) hashes, on average, to generate that hash. When they present the proof, you have to do exactly one hash, using the provided nonce, to verify the claimed proof of work.
-
Answer:
Bitcoin nodes always treat the longest cumulative proof-of-work chain as the true record of the bitcoin ledger. It’s possible for a block to get overtaken by a competing chain, in which case transactions on the losing chain would be “reversed” if they’re not also on the alternative chain.
The deeper on the blockchain a transaction is, the less likely that enough proof of work will be generated to rewrite this section of the blockchain.