What is the length of SHA-256 output?
256 bits
Which of the following is NOT a type of security service? -Confidentiality -Authentication -Digital Signature -Message Integrity -(Service) Availability -RSA
RSA
A hash algorithm produces the same size output regardless of input size (T/F).
True
Nonce
A random number used only once (in a lifetime or in a communication session)
Is DES Symmetric or Asymmetric Key cryptography?
Symmetric key cryptography
IS RSA Symmetric or Asymmetric Key cryptography?
Asymmetric key cryptography
Which of the following is not about a property of Cryptographic Hash Function? -Collision-resistance -Hiding -Puzzle Friendliness -Variable Size Input
Variable size input
Which of the following types of modifications of a blockchain data structure can be detected? -Insertion of a block -Deletion of a block -Tampering of data in a block -Reordering of blocks
All of them can be detected
Hiding personally identifiable information is about ______
Privacy
Anonymity can be measured by the size of the crowd that one can be blended into. (T/F)
True
Using a public key as an identity solves the problem of anonymity. (T/F)
False
Spending a crypto-currency more than once is called ______.
Double Spending
Merkle Tree
A binary tree with hash pointers that can verify membership in O(log n) time and when it is sorted you can also verify non-membership in O(log n) time.
APIs for digital signatures
sk: secret signing key pk: public verification key
Three algorithms (sk, pk) := generateKeys(keysize) sig := sign(sk, message) isValid := verify(pk, message, sig)
Genesis Block
The first block created in the blockchain
What are attributes of decentralized systems
-No single bottleneck -More reliable: fault tolerant -More secure: Attack tolerant -No single point of control: No monopoly
Examples of Centralized Systems
City Records, Banks, voting authorities, Networks
What was the first Decentralized Finance
Barter system, it was peer-to-peer
Money vs. Currency
Money is a broader term that refers to an intangible system of value that makes the exchange of goods and service possible, now and in the future. Currency is simply one, tangible form of money.
Social Technology
A set of ideas and practices which organize what we produce and consume, and the way we live together
Properties of Physical or Electronic Tokens or Commodities
Unit of Account: Defines Values Medium of Exchange: Acceptability Store/Transfer of Value: Non Perishable
Confidentiality (Network Security)
Only sender, intended receiver should "understand" message contents -Sender encrypts message -Receiver decrypts message
Authentication (Network Security)
Sender and receiver want to confirm of each other
Message Integrity (Network Security)
Sender and receiver want to ensure message not altered (in transit, or afterwards) without detection
Access and Availability (Network Security)
Services must be accessible and available to users
Eavesdrop (Adversary Models)
Interception of messages
Impersonation (Adversary Models)
Can fake (spoof) source address in packet (or any field in packet)
Hijacking (Adversary Models)
"Take over" ongoing connection by removing sender or receiver, inserting himself in place
Denial of Service (Adversary Models)
Prevent service from being used by others (e.g., by overloading resources)
Cryptography Language
m: plaintext message K_A(m): Ciphertext, encrypted with key K_A m = K_B(K_A(m))
Symmetric Key Cryptography
Key is shared by sender and receiver
What is the goal of encryption?
Confidentiality from intruder/eavesdropper; only accessible by a legitimate receiver
Properties of a Hash Function
-The input can be any string of any size -It produces a fixed-size output -Is efficiently computable -Is deterministic (same input produces same output)
Substitution Cipher
Substituting one thing for another (e.g., monalphabetic cipher)
Public Key Cryptography
Sender and receiver do not share secret key. Public encryption key is known to all but the private decryption key is known only to receiver.
Creating a public/private key pair
Choose two large prime numbers p and q
Compute n = pq, z = (p-1)(q-1)
Choose e (where e<n) that has no common factors with z (e,z are "relatively prime")
Choose d such that ed mod z = 1.
public key is (n,e) and private key is (n,d).
What properties must be satisfied for a a hash function to be cryptographic hash function?
Property 1: Collision-Resistance Property 2: Hiding Property 3: "Puzzle Friendliness" (One-Way)
Collision-Resistance (Hash Property)
Nobody can find x and y such that x != y and H(x) = H(y)
Hiding (Hash Property)
Given H(x), it is infeasible to find x.
Puzzle-Friendly (Hash Property)
For every possible output value y, if k is chosen from a distribution with high min-entropy, then it is infeasible to find x such that H(k | x) = y.
Proof-of-Work
Each block contains transactions to be validated and the previous hash value.
K-anonymity
A release of data is said to have the k-anonymity property if the information for each person contained in the release cannot be distinguished from at least k-1 individuals whose information also appear in the release
Hash Pointer
A pointer to where some info is stored and the hash of the info
What can we do if we have a hash pointer?
We can ask to get info back, and verify that it hasn't changed
What are the networking requirements of blockchain?
-No centralized server (single point of failure, censorship) -Key Primitive (Broadcast blocks and transactions to all nodes) -Robustness over churns (Some nodes go offline, new nodes join)
What are some aspects of Decentralization in Bitcoin?
-Its a Peer to peer network -Mining is open to anyone -There are updates to software by core developers trusted by the community
6 Steps to mining Bitcoin
Join the network and listen for transactions
Listen for new blocks and maintain the block chain
Assemble a new valid block
Find the nonce to make your block valid
Hope everybody accepts your new block
Profit
What are some advantages of GPU mining?
-Easily available and easy to set up -Parallel alus -Bit-specific instructions -Can drive many GPUs from 1 CPU -Can be overclocked
What is "Goodput"?
The idea that some errors are okay
Goodput: throughput x success rate
Worth over-clocking by 50% with 30% errors
What are some disadvantages of GPU mining?
-Poor utilization of hardware -Poor cooling -Large power draw -Few boards to hold multiple GPUs
What are some advantages of FPGA (Field Programmable Gate Area) mining?
-Higher performance than GPUs -Better Cooling -Extensive customization and optimization
What are some disadvantages of FPGA (Field Programmable Gate Area) mining?
-Higher draw than GPUs designed for -Poor optimization of 32-bit adds -Fewer hobbyists with sufficient expertise -More expensive than GPUs -Marginal performance/cost advantage over GPUs
What are Bitcoin ASICs?
An application-specific integrated circuit for bitcoin mining. -Designed to be run constantly for life -Require significant expertise, long lead-times -Perhaps the fastest chip development ever
Embodied Energy (Bitcoin Mining)
Energy used to manufacture mining chips & other equipment
Electricity (Bitcoin Mining)
Used to perform computation
Cooling (Bitcoin Mining)
Required to protect equipment
What is the purpose of Mining Pools?
Pool participants all attempt to mine a block with the same coinbase recipient, send the money to the key owned by the pool manager, then distribute revenues to members based on how much work they have performed.
What are some mining pool variations
-Pay per share: flat reward per share, minus a significant fee -Proportional: Typically since last block, lower risk for pool manager, and more work to verify -"Luke-jr" approach: No management fee, miners can only get paid out in whole BTC, pool owner keeps spread
What is the syntax of a Transaction?
Address: hash of a public key
Transaction inputs and outputs
Signatures on transactions
UTXO model
Transaction Fees
Coinbase transactions
Transaction mempool
What is contained in a Bitcoin Block Header?
The block version
Previous block header hash
Merkle Root Hash
The block time
Difficulty Target
Nonce
Race Conditions of Bitcoin Network
Transactions or blocks may conflict, but the default behavior is to accept whatever is heard first. The network position matters
What is Block Propagation?
You relay a new block when you hear it if: the block meets the hash target and the block has all valid transactions
What were the design goals of the Bitcoin Scripting Language ("Script")
-Built for Bitcoin -Simple and compact -Support for cryptography -Stack-based -Limits on time and memory -No looping -Turing-incomplete