6. Asymmetric Cryptography
§ Cryptographic
public/private key pair -
mathematically linked
§ Use public key to
encrypt, private key to
decrypt and vice versa.
Problem:
How does/did Khoa know (that) it
was Bach who sent the recipe?
7. Hash function and Digital Signature
Sa/m: Digital Signature of Sender
on message M
9. What is Bitcoin?
§ Bitcoin (capital “B”) is a peer-to-peer network that maintains
a public decentralized ledger of digital math-based assets
known as bitcoins (lowercase “b”). The integrity of this ledger
is backed and secured by a subnetwork of computers (miners)
who audit and archive its transactions for a reward.
§ The supply of bitcoins is fixed at 21 million and each bitcoin
can be divided into a hundred million pieces (10-8 BTC) called
satoshi.
§ No need for trusted third-party.
§ Not backed by any government or organization.
§ Instantaneous peer-to-peer transactions.
10. Who created Bitcoin?
§ Nov 1, 2008: Satoshi Nakamoto publishes white
paper titled Bitcoin: A Peer-to- Peer Electronic
Cash System via “The Cryptography Mailing
List”.
§ January 3, 2009: Satoshi releases Bitcoin
source code and software client to the world.
§ 2009 – 2010: Satoshi updates the source code
and writes hundreds of posts totaling 80,000
words (length of a novel).
§ April 23, 2011: Satoshi vanishes from the
Internet after emailing a developer saying he
has “moved onto other things”.
11. § Satoshi could be a woman, a man, or a group of people. Nobody knows!
§ In Japanese satoshi means “clear-thinking” or “wise”, naka can mean “inside” or “relationship”
and moto is used to describe “the origin” or “the foundation.” Strung together it reads
“thinking clearly inside the foundation”.
14. Bitcoin addresses
bitcoins are not “stored” anywhere.
There a no “accounts”
§ Public address: “receive” bitcoins
§ Private address: prove bitcoins
ownership, sign messages
15. Transactions
A transaction is a message containing:
§ input(s): output of previous transaction sent to
your wallet address (prove ownership of your
bitcoins)
§ output(s): bitcoin address of receiver and BTC
amount you want to send.
Transfer of bitcoin ownership from inputs to output.
Your transaction broadcasted to the Bitcoin network
16. Blockchain
Blockchain = block + chain
§ The blockchain is a database containing historical recorded of all the transactions that
ever occurred in the network.
§ Every full node in the network has a copy that they keep up to date and verify
§ Broadcasted transactions are gathered into a “block”
§ Blocks are “mined” and appended to the blockchain
§ Block “chain” each other using “hash”
17. Mining
§ Where do bitcoins come from? With paper money, a government decides when to print and
distribute money. Bitcoin doesn't have a central government.
§ Who gets to write the next block?
Bitcoin using Proof-of-Work (PoW) protocol to archive decentralized consensus:
1. Miners solve mathematically hard puzzle (takes ~10 minutes to solve)
2.The first one to find the solution announces it to the network
3. Gets write to the next block
4. Generate new bitcoins as a reward
Reward halves every 4 years (currently 12.5 BTC/block)
18. Orphaned Block
▪ Detached or Orphaned blocks are valid
blocks which are not part of the main chain.
They can occur naturally when two miners
produce blocks at similar times or they can
be caused by an attacker (with enough
hashing power) attempting to reverse
transactions.
23. Your bank controls your money
q Cyprus crisis (https://en.wikipedia.org/wiki/2012%E2%80%9313_Cypriot_financial_crisis)
§ On 25 March 2013, a €10 billion international bailout by the Eurogroup, European
Commission (EC), European Central Bank (ECB) and International Monetary Fund(IMF)
was announced, in return for Cyprus agreeing to close the country's second-largest
bank, the Cyprus Popular Bank (also known as Laiki Bank), imposing a one-time bank
deposit levy on all uninsured deposits there, and possibly around 48% of uninsured
deposits in the Bank of Cyprus (the island's largest commercial bank)
§ Cyprus freezes all bank accounts, restricting all withdrawals and transfers of money
q A woman who lost VND245 billion ($10.8 million) from her account at a Vietnamese bank
has rejected a token compensation offer, saying the it's too low and that the bank
needs to be more transparent.
24. Governments take populations hostage:
Zimbabwe hyper inflation
§1999 - Zimbabwe president Robert Mugabe
begins redistributing private farm land,
leading to a steep drop in economic
productivity.
§2000 - Mugabe prints an excessive amount
of money to finance the Second Congo War,
spending ~$23M per month.
§2008-2009 - Inflation climbs to an alleged
6.5 sextillion percent.
§2009 - Zimbabwe abandons the Zimbabwean
Dollar (Z$) and does not replace it with
another fiat currency.
Source: https://en.wikipedia.org/wiki/Hyperinflation_in_Zimbabwe
28. How do I get bitcoins?
§ Buy bitcoins on exchanges
§ Coinbase (coinbase.com)
§ Remitano (remitano.com)
§ LocalBitcoins
(localbitcoins.com)
§ Buy from other people (beware
of scam)
§ Mining (hard but interesting)
§ Find someone private-key (just
kidding :D)
29. How do I store my bitcoins?
1. Create a wallet
a. Online (web wallet)
b. Offline
§Software wallet
§Hardware wallet
§Paper wallet
2. Keep your wallet safe
a. Stored online
b. Stored on computer
c. Stored offline
convenience
security
30. Where to spend my bitcoins?
Source: https://99bitcoins.com/who-accepts-bitcoins-payment-companies-stores-take-bitcoins/
https://medium.com/@CoinATMRadar/how-to-use-a-bitcoin-atm-or-how-does-a-bitcoin-atm-work-283d7a08d7e
31. Issues
▪ Some form of centralization
▪ Hard to understand
▪ Energy consumption
▪ No “customer support”
▪ Negative press
33. Hard to understand
Bitcoin is combination of:
▪ Game theory
▪ Cryptography
▪ Distributed system
▪ Peer-to-peer network
▪ Economic and monetary theory
36. Negative Press
Ø Bitcoin is a ponzi scheme
Ø But only nerds like cryptos!
– You mean like when computer geek Jeff Bezos was starting a little
company called Amazon to sell books on this thing called the
Internet that nobody but nerds understood? I mean there are all
these book stores I can go to, why would I need that?
Ø But…But It’s Backed By Nothing
– Nothing has any inherent value except the value we put in it.
– Same applies to euros and dollars.
Ø But…But It’s Unstable
– You know this story too. Cryptos are unstable. They can go to
nothing overnight. You can lose a lot of money.
– This argument tells you absolutely zero.
– Anything can go to nothing over night.
– Nothing is immune. Not central markets or decentralized ones.