Title: Theory / Important / CS / Algo / Blockchain-5 / Bitcoin / Introduction
Tags: computer_to_instruction hasNotNewEffectReturnsMeaning fromCommandLine FromInstruction hasSeenConjDef algoToProblem cardSimpleType1butnoTyp2 exampleToQuestion fromMath seen_description typToType

Name: Problem which should be solved for bitcoins
Page: 3
Chapter: 1
Example: Can I trust that the money is authentic and not counterfeit?
Example2: “double-spend” problem
Example3: Can I be sure that no one else can claim this money belongs to them and not me?

Name: Bitcoin wallet
Definition: Software for the bitcoin protocol
Page: 3
Chapter: 1

Name: Desktop wallet
Definition: Wallet for a desktop computer
Page: 7
Chapter: 1

Name: Mobile wallet
Definition: Wallet for a smartphone
Page: 7
Chapter: 1

Name: Web wallet
Definition: Wallet accessed through the web
Page: 7
Chapter: 1

Name: Hardware wallet
Definition: Devices that operate a secure self-contained bitcoin wallet on special-purpose hardware. They are operated via USB with a desktop web browser or via near-field-communication (NFC) on a mobile device.
Page: 7
Chapter: 1

Name: Paper wallet
Definition: Printed bitcoin keys, for long time storage
Page: 7
Chapter: 1

Name: A full-node client
Definition: A client that stores the entire history of bitcoin transactions (every transaction by every user, ever), manages users’ wallets, and can initiate transactions directly on the bitcoin network.
Page: 7
Chapter: 1
Name2: A full client

Name: Lightweight client
Definition: A client which connects to bitcoin full nodes (mentioned previously) for access to the bitcoin transaction information, but stores the user wallet locally and independently creates, validates, and transmits transactions.
Page: 7
Chapter: 1
Context: bitcoin
Name2: Simple-payment-verification
Abbreviation2: SPV

Name: Third-party API client
Definition: A client which interacts with bitcoin through a third-party system of application programming interfaces (APIs), rather than by connecting to the bitcoin network directly.
Page: 8
Chapter: 1

Question: Most secure wallet ?
Answer: Hardware or paper, because harder to hack.
Page: 8
Chapter: 1
Context: Cryptocurrency

Question: Least secure wallet ?
Answer: Web: because one should trust a third-party
Page: 8
Chapter: 1

Question: Least secure client ?
Answer: Third-party, because it should be trust
Page: 8
Chapter: 1

Question: Most secure client ?
Answer: Full-node client.
Page: 8
Chapter: 1

Name: Floating exchange rate
Definition: Buy/sell price fluctuates according to supply/demand in various markets where it is traded
Page: 12
Chapter: 1

Name: Blockchain explorer
Definition: A web application that operates as a bitcoin search engine. Allows to search for addresses, transactions, and blocks and see the relationships and flows between them.
Page: 15
Chapter: 2

Name: Payement request
Definition: Destination address
Page: 16
Chapter: 2
Context: Bitcoin
Definition2: payment amount
Conjdef: Data containing
Definition3: generic description

Name: A satoshi
Chapter: 2
Page: 16
Represents: Smallest amount of bitcoin
Exponant: -9
Typ: Bitcoin

Name: A transaction
Definition: A set of inputs and outputs, with inputs sligthly greater than outputs
Page: 17
Chapter: 2
Context: Bitcoin

Name: Transaction fees
Definition: Fees for the miner
Page: 17
Chapter: 2

Name: A chain of transactions
Definition: A list of transactions such that the ith transaction input contains an element from the i-1-th transaction output.
Page: 19
Chapter: 2

Name: Making change
Definition: Paying yourself in a transaction, the difference between your previous input, the payement you must do, and the fees.
Page: 20
Chapter: 2

Question: What happen when a payement is done ?
Answer: It is associated with an encumber, which should be only redeemed only by the one who should receive the payement.
Page: 24
Chapter: 2

Question: What happen when a transaction is done ?
Answer: The unverified version floods. Added to the new list of stuff to add in the next block.
Page: 24
Chapter: 2

Name: Flooding
Definition: Sending an information to each connected node, which does the same if they didn't yet know the information.
Page: 24
Chapter: 2

Name: Mining
Definition: Creating a costly proof of transactions, which can be verified cheaply.
Page: 26
Chapter: 2

Name: Application specific integrated circuit
Definition: hundreds of mining algorithms printed in hardware
Page: 27
Chapter: 2
Abbreviation: ASIC

Name: Genesis block
Definition: Block 0, initiating the blockchain
Page: 28
Chapter: 2

Name: Satoshi client
Definition: The first bitcoin implementation
Page: 31
Chapter: 3

Name: Bitcoin core
Definition: Satoshi client's evolution
Page: 31
Chapter: 3

Question: The reference implementation is
Answer: bitcoin core
Page: 31
Chapter: 3

Instruction: bitcoind
Page: 31
Effect: command line bitcoin client
Chapter: 3

Name: Transaction id
Definition: A number uniquely identifying a transaction
Page: 41
Chapter: 3
Abbreviation: txid

Instruction: decoderawtransaction foo
Page: 46
Effect: Takes foo as hexadecimal and show the json of the encoded transaction
Context: bitcoin-cli
Chapter: 3

Instruction: getrawtransaction foo
Page: 45
Context: bitcoin-cli
Chapter: 3
Returns: an hexadecimal encoding of the transaction
Assuming: foo as a block txid

Instruction: getblockhash foo
Page: 45
Context: bitcoin-cli
Chapter: 3
Returns: the hash of the block of height foo

Instruction: getblock foo
Page: 48
Context: bitcoin-cli
Chapter: 3
Returns: the json of the block foo

Instruction: RawProxy()
Page: 46
Context: module RawProxy
Chapter: 3
Returns: A raw proxy object

Instruction: p.bar(foo)
Page: 50
Effect: Apply bitcoind bar foo
Context: module RawProxy
Chapter: 3
Variables: p:RawProxy

Name: cryptography
Definition: secret writing in greek
Page: 55
Chapter: 4
Context: module RawProxy

Name: encryption
Definition: the science of secret writing
Page: 55
Chapter: 4
Context: module RawProxy

Name: Digital signature
Definition: prove knowledge of a secret without revealing that secret
Page: 55
Chapter: 4
Context: module RawProxy

Name: Digital fingerprint
Definition: prove authenticity of data
Page: 55
Chapter: 4
Context: module RawProxy

Name: A public key
Page: 56, 63
Chapter: 4
Context: module RawProxy
Intuition: A key used to receive funds

Name: A private key
Definition: A key used to sign a transaction to receive funds
Page: 56, 63
Chapter: 4
Context: module RawProxy
Property: Randomly generated number

Name: A key pair
Definition: A private key, and the public key computed from it
Page: 57
Chapter: 4
Context: module RawProxy

Question: Why use asymmetric cryptography in bitcoin ?
Answer: Allow to sign a payment, not hide it
Page: 57
Chapter: 4

Question: Bitcoin's private key is
Answer: a 256 bit random number
Page: 58
Chapter: 4

Instruction: getnewaddress
Page: 58
Effect: Generate a new key and print the public key
Context: bitcoind
Chapter: 4

Instruction: dumpprivkey foo
Page: 59
Effect: show the private key associated to the public key foo in the Wallet Import Format,
Context: bitcoind
Chapter: 4
Assuming: foo's private key is in the wallet

Name: Wallet Import Format
Page: 59
Chapter: 4
Abbreviation: WIF
Typ: Base58 chesum-encoded format

Question: The public key of bitcoin is
Answer: \(k*G\) with \(k\) the private key, \(G\) the generator point.
Page: 60
Chapter: 4

Page: 60
Effect: Given a generator point \(G\) and a public key \(K\), finding the private key \(k\) such that \(K=k\times G\)
Chapter: 4
Extra: Problem
Name: Finding the discrete logarithm

Name: Base64
Definition: 26 lowercase letters, 26 capital letters, 10 numerals, and 2 more characters such as “ + ” and “/”
Page: 67
Chapter: 4

Name: Base58
Definition: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz letters and digits, without 0,O,1,I, to avoid confusion
Page: 67
Chapter: 4

Name: Base58check
Definition: one byte prefix, (to state which kind of data is encoded)
Page: 67
Chapter: 4
Definition2: Base58 text,
Conjdef: A text composed of
Definition3: 4 bytes from SHA256(SHA256(prefix+data))

Name: A compressed private key
Definition: A private key, prefixed by 0x01
Page: 75
Chapter: 4
Intuition: Key to use with compressed public keys

Question: Why is it hard to keep private key confidential ?
Answer: Because they also need to be available
Page: 80
Chapter: 4

Name: Passphrase
Definition: Long password composed of multiple words
Page: 80
Chapter: 4

Name: BIP-38
Definition: A private key, secured by a passphrase
Page: 80
Chapter: 4

Name: M-of-N multisig
Definition: A signature format where N people can sign, and at least M must sign to validate something
Page: 82
Chapter: 4

Name: Vanity address
Definition: valid bitcoin addresses that contain human-readable messages.
For example, 1LoveBPzzD72PUXLzCkYAtGFYmK5vYNR33
Page: 82
Chapter: 4

Question: How to find vanity address
Answer: Test private key at random until you find one
Page: 82
Chapter: 4

Question: What is the danger with Vanity adress ?
Answer: If you remember that someone's public adress start with foobar, then you'll check that foobar is present as a prefix of an address. Thus you'll be more easily fooled if the remaining of the adress is not the same, since you'll think you don't really have to check everything

Question: What should be done when spending money from a paper wallet ?
Answer: Either spend all, or put all change to another paper wallet
Page: 90

Page: 60
Chapter: 4
Name: secp256k1
Set: The set of solution of \(y^2=x^3+7\mod p\) for some fixed \(p=115792089237316195423570985008687907853269984665640564039457584007908834671663\), and a «point at infinity»
+: \(((x,y),(x',y'))\mapsto(x'',-y'')\) where \((x'',y'')\) is only points on the line \([(x,y),(x',y')]\),
0: point at infinity
-: \((x,y)\mapsto (x,-y)\)