Intro Flashcards
What is consensus?
The process of reaching an agreed output between n processes which all have an input in_i and a output out_i
Rules for consensus
- Termination
- Agreement: All nonfaulty process must output the same
- Validity: If all inputs are same the output of nonfaulty must be the same
Synchronus Distributed System
- Messages are recieved within bound
- Clock drift has bound
- Step in process takes bounded amount of time
Asynchronus Distributed System
- No bounds on anything whatssoever
- Internet is asynchronus system
- Consensus can never be reached (weaker notion required)
=> Proof idea: Hard to distinguish very slow process from crashed one (other nodes would wait forever)
Crash threat model
Every process is honest but can fail => n = 2f+1 processes needed to allow for f faulty processes
Byzantine threat model
Processes can act arbitrarily (equivocation) => n = 3f+1 processes and f+1 rounds of agreement needed to allow for f byzantine processes (n^2 message compexity)
BFT consensus
Hard to scale the number of consensus nodes only tested up to 20
Cryptographic foundations of BTC
HashFunctions and their onewayness
Public Key crypto: Verifiable signatures
RSA vs ECDSA
ECDSA keys smaller (better for BTC) and faster in keygen, compareable in signature generation but RSA significantly faster in signature verification
Security of Payments
Fairness: Cant pay more than you own
Resistance to impersonation: Can’t authorize payments of other users
Non-repudiation: Users can’t deny payments that are registered by the system
Accountability: User that misbehaves can be punished
Roles in Bitcoin
Miners: Do hash calculations and thus mine new blocks
Full-Nodes: Have a history of blocks and transactions and can respond to requests a user might have
(Lightweight-)Users: Regular users in the system that want to do transcations etc.
UTXO Model
Every transaction input must be the output of another transaction.
Thus if a user wants to use to pay he might need to split a previous transcation or combine multiple Unspend Transactions Outputs(UTXO).
Mining
Miners calculate hashes of so that Hash(prev_hash, nonce, F(Tx)) < Difficulty
Bitcoin Security Pillars
- All transactions are publicly announced and signed with the private key of the sender that should match the public key of the UTXO
=> Non-repudiations, Resistance to Impersonation, Non repudiation - Transactions can’t be changed, are checked before being able to be included in a new block, are only confirmed after six blocks are built on the block
=> Fairness - Penelty system in place which disconnects neighbour nodes for 24 hours => Accountability