Cryptography Part 2 Flashcards

1
Q

Introduction (Notes)

A

Let’s look at a specific example of cryptography used as part of a larger system.

We’ll look at cryptocurrencies, and specifically at Bitcoin, the oldest cryptocurrency still standing
- What are the problems they need to solve?
- How do they go about it?
- What are the attack vectors?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the motivations behind Crypto-currency?

A
  1. Trends in finance
    - E-commerce naturally increases e-payments
    - Charges for financial services, especially in developing countries
    - Worries about currency stability, surveillance, interruption of payments, nostalgia for gold standard
  2. Is there a way to do cash over the internet?
    - A “born digital” currency without legacy costs
    - Immune to manipulation by banks or governments
    • The extent to which this is an actual risk in practice is open to debate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The challenges of digital cash

A

No double spending
- Clearly undesirable if the same “coins” can be spent without being transferred
No duplication
- Atoms (Physical) versus bits (Digital)
No repudiation
- Transfers must be final
Paying for the infrastructure
- Why would anyone contribute computing power? How do they pay their costs (if there are any)?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What problems does crypto-currency address?

A

Cryptography can be used to address these problems:
- Holding the cash: Unique tokens held in an encrypted wallet, requiring authentication to access
- Non-repudiation: Transfers are logged into a public ledger, with cryptography used to prevent alteration
- Double spending: The ledger records each transaction, so we can check for previous spending of a token
Other challenges still remain:
- Cryptography requires computation
- How do we trust the ledger?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Notes on Trust and Consensus?

A

Important Note: We need to agree that transactions took place, and trust that they can’t be changed.

The act of signing a transaction
- Signer(s) affirm that the transaction happened
- We can check this automatically
- We need some way of trusting the signers
- Get consensus from a majority of participants
- Incentivise the participants not to lie about transactions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe an example of a consensus problem?

A

A set of P participants each decide some value V of something: how do we agree a shared value of V?
- Take an average? Vote on the correct value?
What if some of the participants are lying?
- This is the Byzantine Generals Problem
- Under what circumstances can the generals agree on their decision, given that some may be lying and they don’t know who, or how many?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is meant by a blockchain?

A

Meaning: a distributed database that maintains a continuously growing list of ordered records, called blocks.

Note: Make the ledger of transactions public.
- Every spend of every coin
- Spend generates “change”, which is then essentially a new fractional coin

Note: Each block is simply a record of several transactions
- Chain the blocks together to form a list (or chain)

Features:
- Timestamp
- Block Number
- Transactions
- Link to previous block in the chain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How can we agree on the transactions?

A
  1. Cryptographic Hashing
    - Meaning: a process that uses a cryptographic hash function (CHF) to create a unique and irreversible representation of data.
    - A hash function converts a large space of values into elements of a smaller space.
    - Hash functions are easy to compute but difficult to reverse. (A one-way function)
    - Makes it hard to alter a message so that it has the same hash as the original. (Any tampering will change the hash code, so have to hack the published hash as well as the file itself), The SHA256 is currently considered to be secure.
  2. Nonces (Not the Diddy definition):
    a process that involves adding a value to a given block of data, such that it hashes to a specific value.

What does this do?
- A block can check if it has been changed (because it will no longer hash to a specific value [nonce]), and can check that the last block in the chain is the one it should be linked to (because it can check that its hash is the same as the one it holds).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is meant by Mining?

A

Meaning: Cryptocurrency mining is the process of generating new coins and verifying transactions for cryptocurrencies.

Note: The hashes are generated by mining.
- A new block is distributed to all miners.
- A race to construct the appropriate nonce, which is then checked by all the miners. (This process is known as proof of work).
- If > 50% agree, the block is accepted onto the chain and the winning miner gets a “bounty” of new coins.
* This is the consensus step: being a majority vote.
* This is generally what encourages miners to solve the hashing problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Notes on Blockchain

A

Note: The entire structure of the blockchain protects its integrity.

Note: This is an entire system of linked blocks of data with embedded crypto, which may reduce, or increase, vulnerabilities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How can we potential attack a cryptocurrency system?

A
  1. Change a block to change or repudiate a transaction
  2. Insert or delete a block.
  3. Verify a transaction that didn’t occur (or reject one that did).

Key-note: In other words, nobody attacks the crypto; they focus on attacking the other parts of the system, that are more likely to be vulnerable (for example, social-side of the system).

Note: Despite this, attack do happen, as they are constantly reported in the news. They typically make use of the weak points of the broader system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Where does the Security come from in relation to crypto-currency?

A
  1. From the incentives
    • Miners are paid if they construct blocks properly, in a way that is agreed by a majority of their peers.
  2. From the protocol
    - How blocks are added and traversed checks the integrity of the chain
  3. From the hashing
    - Constructing a nonce that correctly completes a block
    - Changing the chain faster than blocks can be mined and added to it (where changes will be detected)
    - Key-Note: Computing the hash is easy: the difficulty is in constructing a nonce that leads to the hashing generating a specific value.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you spend money in cryptocurrency?

A
  1. Hold (fractions of) coins in a wallet.
    - Local or online
  2. Wallet has a keypair
    - Identified by the public key (Wallet Address) (which is unique).
    - Anonymous to the extent of not being tied to any other identifier: having the keys is proof of identity.
  3. Each transaction is a cryptographically-signed assignment of coins to another wallet
    - Private key access is needed to make a transfer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Where does anonymity come from?

A
  1. Identity.
    - Identity = Public Key: no other binding to an individual.
  2. Authentication.
    - Authentication = Private Key: no other identification needed.

Note: This is not a perfect system
- Wallet addresses allow tracking of transactions.
- If the owner of an address is discovered, their actions can then be unwound from the blockchain.
- Moving cryptocurrencies to “real” once often ties the owner to a bank account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Summary of Cryptography Part 2

A

A system that seems to rely on cryptography also has lots of other components making it secure.
- A hashing algorithm
- A protocol for adding blocks
- A way of checking the integrity of the blockchain
- A way of confirming the intent to spend
How essential is cryptography?
- A key ingredient to secure individual elements, but only a component of a larger socio-technical system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly