Lecture 1 - Introduction to Cryptography and Cryptocurrencies Flashcards
Why would you want to use Blockchain technologies?
Applications can run:
* In a decentralized fashion, by eliminating /limiting the need for a central authority
and Achieve the same functionality with the same amount of certainty
What is Blockchain?
Blockchain is decentralized distributed data structure that is replicated and shared among the members of a network.
It uses cryptographic methods (Hash functions), peer-to-peer networks and a distributed consensus protocol
What is meant by trust-less networks?
Blockchain enables trust-less networks since parties can transact even though they do not trust each other
What is the result of using cryptography in blockchain?
Use of cryptography in blockchain brings authoritativeness/proofs behind all the interactions
What makes smart contracts smart?
Smart contracts which are self-executing scripts over blockchain allow for distributed and heavily automated workflows
What are the five properties of blockchain?
- Decentralization
- Immutability
- Chronology
- Transparency
- Pseudonymity
Explain Immutability
Data written to database cannot be changed or deleted without consensus leading to data integrity
Explain the Decentralization property
No single point of failure/control achieved by decentralized architecture and a distributed database
Explain the Transparency property
All data sent through the blockchain is visible to all network participants
Explain the pseudonymity property
The identity of data senders and receivers is unknown
Explain the Chronology property
Every transaction is time-stamped and can be traced back
What is a hash function?
You take an input, parse it through a cryptographic hash function, then the output will be a digest(string) of fixed length (256 bits for example)
Two identical inputs to the same hash function will produce identical hash digests. True or False
TRUE
Two different inputs to the same hash function will produce identical hash digests. True or False
FALSE
What are the three security properties of hash functions?
- Collision-free
- Hiding
- Puzzle-friendly
Explain the Collision-Free hash security property
Nobody can find two different inputs that give the same digest
Do collisions in hash properties exist?
Yes, but it is very very(infeasible) difficult to find one!
Explain the Hiding hash security property
It’s very difficult to find the input of the hash function based on the output.
Explain the Puzzle-friendly hash security property
If a hash function is puzzle friendly, then there is no
solving strategy for this type of puzzle that is much
better than trying random values of x
What is a hash pointer?
A hash pointer is:
* A pointer to where some info is stored and a cryptographic hash of the info
If we have a hash pointer we can ____
- Ask to get the info back
2. Verify that the info hasn’t changed
Explain the concept of linked lists.
What does a linked list contain? What does it enable?
A linked list is a list of objects(blocks) that contain two different things
- Previous hash value
- A block of data
If anything changes in the chain of blocks, then you can see exactly where, as all of the hashes before the change will be different than the old one
Explain a Merkle tree
A merkle tree is like linked lists, but can hold more items, and is treated not like a linear list, but a tree that branches out
What are the advantages of a Merkle tree
- Tree holds many items
- You just need to remember the root hash to confirm whether there has been any changes/tampering
- Can verify membership in O(log n) time/space
Variant: A sorted Merkle tree can verify non-membership in O(log n)
In broad terms, explain encryption
Encryption is a process of encoding information
It converts plain/original information into ciphertext/encrypted blob
Associated with keys for encrypting/decrypting
There are two types of encryption methods (Not sha256 etc). What are they?
Symmetric = Use same key Asymmetric = Use different keys
Explain symmetric encryption
Symmetric uses the same key encrypt and decrypt
- Both parties need to know the key
Algorithms: AES(Advanced Encryption Standard)
Explain asymmetric encryption
Asymmetric uses a key pair
- Public key
- Private/secret key
If we use one key to encrypt, then we can only decrypt with the other key
Algorithms: RSA (Rivest-Shamir-Adleman)
If Bob wants to encrypt a message that only Alice can open, how would he do this using Asymmetric cryptography?
Bob encrypts the message using Alice’s public key
Alice can then decrypt the message using her PRIVATE key
If Bob wants to verify that Alice sent a message what would be the steps of this using Asymmetric Cryptography?
Alice writes a message to Bob. She signs it using her PRIVATE key.
Bob can then verify it using Alice’s PUBLIC key
Explain what is meant by a Digital Signature
- Only you can sign, but anyone can verify
- Signature is tied to a particular document
- Using pair of keys (private and public)
What is meant by public key == an identity
To speak as a public key, you must know the matching secret key.
Therefore, you can treat a public key as an identity
if you see sig such that verify(pk, msg, sig)==true, think of it as
pk says, “[msg]”.
to “speak for” pk, you must know matching secret key sk
Anyone can make a new identity at any time, and they can make as many as they want. True or False
True!
What are the implications of public keys/addresses in relation to privacy?
Addresses are not directly connected to real-world identities
Observers can link together an address’s activities over time, make inferences
What is meant by “Double-spending attack”/”Double spending problem”
The double-spending problem is the main design challenge in digital currency
The double-spending problem is a phenomenon in which a single unit of currency is spent simultaneously more than once.
What is a solution to the Double-spending problem?
Coins cannot be transferred, subdivided or combined.
But you can get the same effect by using transactions.
To subdivide:
- Create new transaction
- Consume the coin
- Pay out two new coins to yourself