CMSC389C
Describe how we can save space by not storing the entire blockchain?
If we have the most recent blocks, and the current UTXO pool, we can get rid of old blocks. All that is needed is that at least some nodes contain the full blockchain (beginning with the genesis block).
A 51% attacker could potentially
-Make it unprofitable for other miners to mine -Suppress transactions from the blockchain
What is blockchain
A blockchain is an append-only data structure that records information in history -split into blocks that chain together to make the entire structure
UTXO
Bitcoin that has been sent to you but you have not spent yet (unspent transaction output)
how do other countries gov approach regulation
China, venezuela, and iran are working on creating their own national cryptocurrency
So we've found a proper nonce, now what?
publish! problems: -just because you've found a block doesn't mean it will be accepted by the network -recall that the one valid blockchain is the longest one -if people choose not to build on your block, or they start building but switch to another chain, then your work goes to waste
Ways to change your merkle tree
reorder the transactions we gathered to create a different merkle tree to create a nonce that is correct
The time limit for finding blocks on Bitcoin's blockchain is
10 minutes
How many confirmations do merchants usually wait for in Bitcoin? Why?
6 confirmations is considered pretty standard for Bitcoin transactions, because at that point it is highly unlikely that miners are mining on an alternate chain that may invalidate your block.
What is crypocurrency
A digital asset designed to work as a medium of exchange using cryptography to secure the transactions to control the creation of additional units of the currency Cannot be held in physical format (wallets can be physical, coins themselves cannot)
What is the main protection to losing your private keys with lite, node, and hardware wallets?
A seed — a string of words that allow you to regenerate all of your private keys in the event that you lose your wallet.
What is required for an attacker to modify transactions or other information on the network?
more CPU power than all of the honest nodes
bitcoin uses central authority to mediate transactions and protect from fraud?
false
What might you have to do as a miner if you don't find a proper nonce?
ou may have to change some information about the block and try again (i.e., using a different address for the coinbase transaction, reordering the transactions, etc.)
Name one of the reasons the coinbase transaction exists
(The coinbase transaction increases the supply of Bitcoin in circulation) or (The coinbase transaction provides incentives for miners to keep the network moving)
Nonce
-32-bit integer that is included in the block -the nonce will hash together with the previous block hash and merkle root to create the block's hash -a block hash is valid if it is less than a certain target, usually means starting with a certain number of 0 bits (ex: 0x000023FB... not 0x12FD)
Mining Pools
-A pool is an entity that allows miners to use their hash power together, with the goal of discovering a block -block reward is usually distributed among miners based on the amount of hashing power they provide to the collective pool -in addition to creating new coins, pools simultaneously work to keep bitcoins network functioning
How is the coin creation controlled?
-Decentralization -usually but not always through some form of mining -prevents counterfeit coins -prevents oversupply -(sort of) controls inflation -Number of coins created may or may not have an absolute cap (bitcoin has cap of 21 million coins)
Why have a coinbase transaction?
-Incentive -Supply and Demand
Life Wallets
-Many cryptocurrencies have wallet software that you can download on your computer, and checks in with a node/nodes to gather info when you want to spend money -these wallets store private keys on your computer -Biggest advantage to these are increased security -if your laptop gets compromised for any reason, your coins may still be stolen (if you wipe/lose your laptop on accident, potentially lost your coins)
How is cryptography used?
-Mathematically complex -gives way to hash-based data structures - cryptography hence name CRYPTOcurrency
What is mining?
-Mining is the process of creating blocks and publishing them on the network (mining is used in many cryptocurrencies to allow for coins to be created)
Why use SHA-256?
-Security - its nearly impossible to break SHA-256, which keeps transactions safe and secure on the network -Difficulty - takes a lot of computing power to find the right hash for a block, since similar inputs give vastly different hashes -Verification - anyone can verify the validity of block by simply re-computing the hash of that block
Hierarchical deterministic
-Seed is a random 128-bit value presented as a set of 12 strings to the user -Each address is a point picked out of a mathematically complex function -tend to be more secure than string deterministic wallets
Hardware Wallets
-Some form of hardware that holds your private keys and plugs into your computer when you want to actually spend your coins -usually need to interact with some form of software in order to send interactions -ONLY deliver a sig to the computer(means even on a compromised computer, you can make safe transactions) -higher security
What is the coinbase transaction?
-Special transaction that the miner adds to his/her block that creates Bitcoins out of thin air as a reward for finding the block - once coinbase transaction reward diminishes to 0, miners will mainly profit from collecting transaction fees
How is a bitcoin transferred
-When transactions are created, they are posted on the network -nodes have to verify the transaction by checking several things (the sig over the transaction input must be valid, amount of bitcoin sent must be less than or equal to amount of bitcoin the user has, and the bitcoin being spent has not already been spent in another transaction) -nodes pass verified transactions on to miners so that they may be included in the next valid block -transactions are not considered to be final until they have a certain number of confirmations (usually somewhere between 2 and 6 for most merchants)
SHA-256
-a powerful one-way hash function used to give a unique identifier to each block on the blockchain -pre-image resistance - (given hash value h, difficult to find data d such that hash(d) =h -Collision resistance - given data d, difficult to find data d_2 such that hash(d_1) = hash(d_2) (also known as second-preimage resistance)
why would regular people be interested in crypto
-anonymous -quick -easy international transactions -low fees -investing -illegal activity
why would businesses be interested in crypto
-avoid certain taxes -accept international customers -avoid international bank fees -speed -accessibility
How does bitcoins blockchain achieve append-only?
-bitcoin uses SHA-256 applied twice to achieve this
List of transactions
-called a merkle tree (hash-based binary tree of transactions)
Online wallets
-exchanges (such as coinbase) will usually create a wallet for you when you sign up for the site, so you can just trade cryptocurrency instantly on the exchange -A major pro is convenience (its very easy and fast to log on to coinbase and send your coins wherever you want -for exchanges that carry many types of cryptocurrency, its also very easy to convert between cryptocurrencies -biggest con: security Historically, exchanges have been hacked many times and if your private keys are being stored by the exchange , then anyone who steals it can now steal all of your money
Wallet
-how most people keep track of their bitcoin addresses and private keys -wallets can generate signature on your behalf so you can issue your transactions
why would the gov be interested in cryptocurrencuy
-prevent money laundering -prevent money from crossing borders unnoticed -prevent dirty money from entering the regular economy -threatens to upheave traditional fiat currency and forms of payment -billions of dollars locked up in crypto, can have severe effect on normal economic health
Node wallets
-similar to light wallet but keep the entire blockchain locally and act as a node; no need to check in to gather info before spending -Nodes on bitcoins network are responsible for gathering and verifying transactions and then passing them to miners for inclusion in a block -same risk as lite wallets
Fiat Currency
Any currency issued by a central government (ex: USD, EUR)
What is the function of digital signatures in Bitcoin?
Digital signatures prove that the owner of address A actually wants to send their bitcoins to address B by using address A's private key.
How are blocks linked together to create bitcoins blockchain?
Each block contains info about the previous block, namely the previous block's hash
Cryptocurrency is backed by the government in case you lose your private keys
False
If you lose your (randomly generated) Bitcoin private key, it's fairly easy to recover it.
False
How is cryptocurrency ownership treated by the U.S. government?
Like property
Why create/use a multisig address?
Multiple entities may want to have control over funds (say, the executive board of a corporation). Multisig addresses ensure that no one bad actor in a group can steal the entire group's funds — you need a majority of the group to sign off on any transactions from this address.
Are cryptocurrencies always decentralized? If yes, explain why. If no, provide a counterexample.
No, Venezuela
Once you publish a block, is it immediately accepted by the network? Explain.
No. Once a block is published, it is only accepted by the network if other miners mine new blocks on top of yours.
Describe the most common mining pool reward scheme
One entity controls the pool (called the pool master). Miners can join, and they prove the amount of work they are doing by sending all "near misses" (block hashes that almost, but don't quite have the required number of leading 0s) to the pool master. When a block is finally found, the reward is split amongst the miners proportional to the amount of work they've sent to the pool master.
What is the most common Bitcoin script?
Pay-to-pubkey-hash: OP_DUP OP_HASH160 <hash of pubkey> OP_EQUALVERIFY OP_CHECKSIG
What are the components of a bitcoin block?
Previous block hash, list of transactions, and Nonce
How are transactions kept private on the Bitcoin network?
Private and public keys/addresses are not linked to any personal info
Describe transaction batching and why it may be useful
Transaction batching is useful for reducing the number of UTXOs in the pool, as well as avoiding transaction fees if you want to aggregate a number of your addresses in order to send bitcoin to one address.
What is the most secure way to generate private keys? Why does this also help with privacy?
Randomly — this ensures that no one can guess your private key just by knowing your personal information
What steps do governments take to prevent money laundering?
Require businesses to know their customers' identities Require a variety of companies to file reports on large transactions that they participate in
How does SHA-256 contribute to network efficiency?
SHA-256 makes it extremely difficult to create blocks, but is extremely efficient for checking existing ones.
Who created Bitcoin
Satoshi Nakamoto
Cryptojacking
The technique of hijacking computer systems for mining cryptocurrency (without user consent) using some or all of the systems CPU/GPU power
Describe the Tor onion protocol (you can also draw a diagram and label it)
The user's computer wraps the request in 3 layers of encryption and sends it to the entry node of their Tor circuit. As the nodes of the Tor circuit pass the request along, they unwrap each layer until the exit node unwraps the last layer, and sends the request to the destination.
What does it mean to own bitcoin
-in order to own bitcoin, you must own a bitcoin address -private keys are what allows you to send bitcoin from your address to another (like a password) -your bitcoin address is a hash of your public key, which itself is part of an ECDSA pair with your private key
benefits of hash-based data stuctures
-keeps coins and transactions secure -prevents fraud and modification -helps with anonymity
Why have a digital signature?
-keeps transactions secure as an owner can only sign transactions with their private key
What happens if you use an exchange to store funds?
-most exchanges require some form of identification for legal reasons (these exchanges then manage private and public keys on behalf of your legal identity, so when you send coins from an address, the exchange has a record that you did that) -Depending on the exchange's residence country, governments may subpoena personal and/or financial data of users -buying a cryptocurrency for fiat and exchanging cryptocurrencies are all taxable transactions in the US -by law, you are required to submit a report detailing crypto exchanges on your taxes, therefore decreasing anonymity of exchanges
How are people usually tracked down
-not using multiple addresses -side channels (hacked exchanges can reveal use IP logs) -blockchain analysis -cashing out (usually requires bank account or wire transfer)
Types of wallets
-online wallets -Lite wallets -node wallets -hardware wallets -paper wallets
Why would we have a time limit on how often blocks are found?
-prevent attacks -keep a steady puzzle-to-network diffusion ratio
Paper wallets
-simply private/public key pairs written down on a piece of paper -hardest to use -when you want to spend money, you'll have to input your key into a website/software to create the transactions (YOU SHOULD ALWAYS SPEND THE ENTIRE BALANCE IF YOU DO THIS) -If you don't spend the entire balance, your coins may be severely compromised
Kinds of deterministic wallets
-string deterministic -hierarchical determinisic
Why is append-only blockchain important for bitcoin
-to prevent fraudulent transactions -prevent people from creating their own coins -keep people from reversing transactions or double spending their currency
String deterministic
-user chooses some string -addresses created by hashing string with a counter
Deterministic wallets
-you can lose your coins if you lose lite, node, or hardware wallets-most of these wallets have protection against them -instantiated with a seed -some info that is used to then create every private key that you own -as long as you do not lose your seed, you can lose your wallet and just instantiate a new one with the same seed
Briefly explain HD wallets and why they are better than string deterministic.
HD wallets use a randomized seed as input to a mathematically complex function that generates your private keys. This is better than string deterministic because the function generating the keys is much harder to guess.
Does selling your cryptocurrency for cash leave any traces? Why or why not?
Yes. Just because you sell for cash, doesn't mean the person you sent the bitcoin to won't get deanonymized. If that happens, and they are questioned about where they got the bitcoin from, you could also get deanonymized.
Why should you spend the entire balance when you use a paper wallet?
You have to enter your private key into a service that may be corrupt, so if any balance is left in the wallet it may get stolen.
What is crypto considered to be by the government?
property
Blockchain analysis
there is a whole field of study leveraged by the FBI called "blockchain analysis" in which the FBI or any gov agency will draw graphs of transactions between addresses in order to track the flow of bitcoin from point A to point B -works well in deanonymizing users on the network