1. Home
  2. Explore
  3. Computer Science
  4. How Bitcoin Works

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

How Bitcoin Works

  • 17Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Digital Signatures

What is a digital signature, and how does it depend on the message and private key?

17 questions

  1. 1

    What is a digital signature, and how does it depend on the message and private key?

    Model answer

    A digital signature is a function that produces a unique string based on both the message and the signer's private key, ensuring that only the private key holder can produce it and that it is invalid for any other message.

    Explanation

    The signature is created using a signing function that takes the message and private key as input. The message dependency prevents copying a signature to another document.

  2. 2

    How does a digital signature prevent forgery?

    Model answer

    Forgery is infeasible because without the private key, the only way to produce a valid signature is by guessing and checking, which is computationally impractical due to the huge number of possible signatures (e.g., 2^256 possibilities).

    Explanation

    The security relies on the difficulty of finding a signature that verifies correctly with the public key. Guessing is the only strategy, and the space is astronomically large.

  3. 3

    Why must a signed transaction include a unique ID?

    Model answer

    A unique ID prevents replay attacks, where an attacker could copy a valid transaction-signature pair and reuse it, since the signature is tied to the specific message containing the ID.

    Explanation

    Without a unique ID, the same signed transaction could be submitted multiple times, effectively duplicating the payment. The ID ensures each transaction is a new message requiring a new signature.

  4. 4

    What is a cryptographic hash function?

    Model answer

    A cryptographic hash function maps any input to a fixed-length output (e.g., 256 bits) such that it is deterministic, any change in input completely changes the output unpredictably, and it is infeasible to reverse the function.

    Explanation

    Properties include collision resistance, preimage resistance, and avalanche effect. SHA256 is a common example.

  5. 5

    What is SHA256?

    Model answer

    SHA256 is a cryptographic hash function that produces a 256-bit output and is widely used in security protocols like Bitcoin and secure web connections.

    Explanation

    It is a specific algorithm that outputs 256 bits and has the properties of a cryptographic hash function.

  6. 6

    What is a proof of work in the context of a blockchain?

    Model answer

    A proof of work is a number (nonce) added to a block such that the hash of the block begins with a specified number of zero bits, demonstrating that a large amount of computational effort was expended to find it.

    Explanation

    The only way to find such a nonce is by guessing and checking, so the proof of work shows that work was done. It can be verified quickly by computing the hash.

  7. 7

    How does proof of work enable trust in a blockchain?

    Model answer

    Since changing any transaction in a block would require redoing the proof of work for that block and all subsequent blocks, it makes fraudulent alterations computationally infeasible, and nodes trust the chain with the most cumulative work.

    Explanation

    The work is tied to the block's content. Altering history requires redoing all the work, which is impractical unless the attacker has majority of the network's computing power.

  8. 8

    What is a blockchain?

    Model answer

    A blockchain is a distributed ledger organized as a chain of blocks, where each block contains a list of transactions, a proof of work, and the hash of the previous block, linking them together.

    Explanation

    The hash of the previous block ensures that blocks are linked in order, making it tamper-evident.

  9. 9

    How are new blocks created in a cryptocurrency like Bitcoin?

    Model answer

    Miners collect broadcasted transactions, assemble them into a block, and repeatedly try different nonces until they find one that makes the block's hash start with enough zeros. They then broadcast the block to the network.

    Explanation

    This process is called mining. The difficulty is adjusted so that on average a new block is found every 10 minutes.

  10. 10

    What is the block reward?

    Model answer

    The block reward is a special transaction in each new block that creates new cryptocurrency (e.g., Bitcoin) out of thin air and awards it to the miner who created the block.

    Explanation

    It incentivizes miners to do the work. In Bitcoin, the reward halves every 210,000 blocks.

  11. 11

    What is mining in the context of cryptocurrencies?

    Model answer

    Mining is the process of creating blocks by collecting transactions, performing proof of work, and broadcasting the block to the network, which also introduces new currency into the system.

    Explanation

    Miners are block creators. They compete to find the proof of work and are rewarded with block rewards and transaction fees.

  12. 12

    How does a decentralized network reach consensus on which blockchain is correct?

    Model answer

    Nodes follow the protocol to always accept the longest chain (the one with the most cumulative proof of work) as the valid one, resolving conflicts by waiting for additional blocks.

    Explanation

    This rule allows the network to agree on a single history even without central authority. The chain with most work is considered the one most likely to be genuine.

  13. 13

    Why should a user wait for several confirmations before trusting a transaction?

    Model answer

    Because an attacker might create a fraudulent block and try to build a longer chain; waiting for multiple blocks on top of a transaction ensures that the legitimate network's chain has surpassed any alternative fork, making the transaction effectively irreversible.

    Explanation

    The probability that an attacker can outpace the honest network decreases exponentially with each additional block. Typically, 6 confirmations are recommended for Bitcoin.

  14. 14

    How does the Bitcoin protocol adjust the difficulty of the proof of work?

    Model answer

    The protocol periodically recalculates the target number of leading zeros so that the average time to find a new block remains about 10 minutes, even as the total mining power changes.

    Explanation

    This ensures a steady block issuance rate. If blocks are found too quickly, the target becomes harder (more zeros required); if too slowly, it becomes easier.

  15. 15

    What is the total supply of Bitcoin, and why?

    Model answer

    The total supply will never exceed 21 million Bitcoin because the block reward is halved every 210,000 blocks (about every 4 years), approaching zero asymptotically.

    Explanation

    The geometric decrease in the block reward means the total number of bitcoins created converges to 21 million.

  16. 16

    What are transaction fees in Bitcoin, and why might a user include one?

    Model answer

    Transaction fees are optional payments attached to a transaction that go to the miner who includes it in a block; users include fees to incentivize miners to prioritize their transaction when blocks are limited in size.

    Explanation

    Miners choose which transactions to include based on fees. Higher fees mean faster confirmation. This is especially important when demand is high.

  17. 17

    What is the block size limit in Bitcoin, and what is a consequence of it?

    Model answer

    Each block is limited to about 2400 transactions, which restricts the processing speed to roughly 3-7 transactions per second, leading to higher transaction fees during peak demand.

    Explanation

    This limit is controversial; it contrasts with systems like Visa that can handle thousands per second. The small block size creates a market for transaction fees.

1 of 17
Question 1 of 17

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent