SlideShare a Scribd company logo
1 of 48
Cryptocurrency Cabal
cs4501 Fall 2015
David Evans and Samee Zahur
University of Virginia
Class 2:
Cryptography
Upcoming Schedule
• Today: Introduction to Cryptography
• Wednesday: ECC and Signatures
– Elliptic Curve Cryptography, ECDSA
• Next Monday: Checkup 1
– Covers classes 1-3, readings (see notes)
• Tuesday, 15 September: Problem Set 1
1
Readings
2
Chapters 1-4 (skim Ch 3)
Who’s in the
class?
3
BS Computer Science (16)
BA Computer Science (10)
BS Computer Engineering (4)
Mathematics (6)
Economics (3)
Aerospace Engineering
Business (McIntire)
History
Linguistics
Political and Social Thought
Politics
Plan for Today
• Bitcoin Wallet
• Notion of ownership of non-physical good
• Conceptual understanding of key terms and
principles in cryptography
Cryptosystem, Attacks, Asymmetric Crypto
4
Several ways Bitcoin Wallet uses cryptography
Setting up a
Bitcoin
Wallet
5
6
7
Downloading entire blockchain
(~40GB)…takes several days…
8
HD:
Hierarchical
Deterministic
Wallet
13
Recap: Class 1
Currency is a medium of exchange
At a minimum, must be:
transferable – can be exchanged
scarce – limited supply
14
Can we make something scarce and transferable with just bits?
How can someone own
something made of bits?
15
16
How can
someone own
anything easily
reproduced?
17
Mechanized printing
Gutenberg movable type press: ~1450
18
Worshipful Company of
Stationers and
Newspaper Makers
(“Stationer’s Company”)
London 1403
Royal Charter 1557
Monopoly on printing
Responsibility to censor
19
“An Act for the Encouragement
of Learning, by Vesting the
Copies of Printed Books in the
Authors or Purchasers of
Copies, during the Times
therein mentioned…”
Statute of Anne, 1710
Author has exclusive 14-year right to
copy work (living author can extend
for another 14 years)
US Copyright Law
1790: 14 years (+ 14)
1831: 28 years (+ 14)
1976: life of author + 50
(75 for “corporate”)
1998: life of author + 70
(120 for “corporate”)
20
Created 1928
How can
someone own
something made
of bits without
an army (or
moose) helping?
21
22
Previous Cryptography Experience
23
None, 20
Little, 8
Prof.
Mahmoody’s
Course, 2 Do you have any
previous
experience with
cryptography?
24
What is cryptology?
Greek: κρυπτ´oς = “kryptos” = hidden (secret)
Cryptography – secret writing
Cryptanalysis – analyzing (breaking) secrets
Cryptanalysis is what an attacker does
Decryption is what the intended receiver does
Cryptosystems – systems that use secrets
Cryptology – science of secrets
25
Security is an engineering goal: it involves mathematics,
but is mostly about real implementations and people.
Cryptology is a branch of mathematics:
about abstract numbers and functions.
26
Introductions
Encrypt DecryptPlaintext
Ciphertext
Plaintext
Alice Bob
Eve
(passive attacker)
Insecure Channel
27
Active Attacker
Encrypt DecryptPlaintext
Ciphertext
Plaintext
Alice Bob
Insecure Channel
(e.g., the Internet)
Mallory
(active attacker)
28
Message Cryptosystem
Encrypt
Decrypt
Plaintext Ciphertext
PlaintextCiphertext
Two functions: E(m: byte[])  byte[]
and D(c: byte[])  byte[]
Correctness property: for all possible messages m, D(E(m)) = m
Security property: given c  E(m), it is “hard” to learn anything
interesting about m.
29
It is possible to
state the security
property precisely
(and prove a
cryptosystem
satisfies it given
hardness
assumptions).Shafi Goldwasser and Silvio Micali
2013 Turing Award Winners
(for doing this in the 1980s)
30
Message Cryptosystem
Encrypt
Decrypt
Plaintext Ciphertext
PlaintextCiphertext
Two functions: E(m: byte[])  byte[]
and D(c: byte[])  byte[]
Correctness property: for all possible messages m, D(E(m)) = m
Security property: given c  E(m), it is “hard” to learn anything
interesting about m.
31
Auguste Kerckhoffs
Kerckhoff’s Principle
32
“The enemy knows the
system being used.”
Claude Shannon,
Communication Theory
of Secrecy Systems
(1949)
Claude Shannon
1916-2001
(Keyed) Symmetric Cryptosystem
33
Encrypt DecryptPlaintext
Ciphertext
Plaintext
Insecure Channel
Encrypt DecryptPlaintext
Ciphertext
Plaintext
Insecure Channel
Key Key
Only secret is the key, not the E and D
functions that now take key as input
Asymmetric crypto:
different keys for E and
D, so you can reveal E
without revealing D.
Jefferson’s Wheel Cipher
34
Jefferson’s Wheel Cipher
26 wheels arranged in a secret order on a
spindle, each wheel has randomly-
permutated alphabet around rim
Encrypt: turn wheels to display plaintext,
then pick a “random” row as ciphertext
Decrypt: arrange wheels in same (secret)
order, line up ciphertext, look for plaintext
35
36
Auguste Kerckhoffs (1883)Thomas Jefferson (1790s)
Should it
be “TJ’s
Principle”?
37
on the periphery of each, and
between the black lines, put all the
letters of the alphabet, not in their
established order, but jumbled, &
without order, so that no two shall be
alike. now string them in their
numerical order on an iron axis, one
end of which has a head, and the
other a nut and screw; the use of
which is to hold them firm in any given
position when you choose it.
Jefferson’s description of wheel cipher (1802)
Key Space
Key space: K = set of possible keys
38
Key is order of wheels on spindle:
|K | = 26 × 25 × … × 1 > 1026
Key is jumbling of letters on wheels:
|K | = (26 × 25 × … × 1)26 > 10691
Brute Force Attack
39
def brute_force(ciphertext):
for guess in all_possible_keys(N):
plaintext = decrypt(key, ciphertext)
if plausible_message(plaintext):
return plaintext
Try all possible keys in some order,
until you find one that works.
Brute Force Attack
40
def brute_force(ciphertext):
for guess in all_possible_keys(N):
plaintext = decrypt(key, ciphertext)
if plausible_message(plaintext):
return plaintext
Try all possible keys in some order,
until you find one that works.
What is necessary for brute
force attack to succeed?
(Im)Practicality of Brute Force Attacks
Minimum energy needed to flip one bit
(Landauer limit) ≈ kT ln 2 ≈ 2.8 zepto-Joules
41
k ≈ 1.4 × 10-23 J/K (Boltzmann’s constant)
T = temperature (Kelvin) (300K)
42
Bit Flips Energy WolframAlpha Description
256 (DES) 2 × 10-3 J “acoustic energy in a whisper”
280 (“low security”) 3 × 103 J “metabolic energy of one gram
of sugar”
26!
(Jefferson+Kerkchoffs)
1 × 106 J “energy of one gram of gasoline”
2128 (AES minimum) 9 × 1017 J “twice energy consumption of
Norway in 1998”
2256 (AES maximum) 3 × 1056 J “1/120th mass energy equivalent
of galaxy’s visible mass”
43
Bit Flips Energy WolframAlpha Description
256 (DES) 2 × 10-3 J “acoustic energy in a whisper”
280 (“low security”) 3 × 103 J “metabolic energy of one gram
of sugar”
26!
(Jefferson+Kerkchoffs)
1 × 106 J “energy of one gram of gasoline”
2128 (AES minimum) 9 × 1017 J “twice energy consumption of
Norway in 1998”
2256 (AES maximum) 3 × 1056 J “1/120th mass energy equivalent
of galaxy’s visible mass”
This is the best (unrealistic) possible case
for a brute force attack: don’t need to do
anything other than represent key and
physically most efficient bit flips.
44
Bit Flips Energy WolframAlpha Description
256 (DES) 2 × 10-3 J “acoustic energy in a whisper”
280 (“low security”) 3 × 103 J “metabolic energy of one gram
of sugar”
26!
(Jefferson+Kerkchoffs)
1 × 106 J “energy of one gram of gasoline”
2128 (AES minimum) 9 × 1017 J “twice energy consumption of
Norway in 1998”
2256 (AES maximum) 3 × 1056 J “1/120th mass energy equivalent
of galaxy’s visible mass”
But, assumes better than brute force
attacks are not possible. All of these
ciphers have weaknesses, and are much
less secure than maximum security
possible for that size key.
Where might
your wallet use
symmetric
crypto?
45
46
mbhd-core/src/main/java/org/multibit/hd/core/managers/WalletManager.java
Charge
• Wednesday: ECC, signatures in bitcoin
• See notes for readings
• Checkup 1 next Monday
47
https://github.com/bitcoin-solutions/multibit-hd/blob/c040431dec7695244b6596b9ae0bd7e23a6f0ba5/mbhd-
swing/src/main/java/org/multibit/hd/ui/views/wizards/welcome/create_wallet/CreateWalletReportPanelView.java

More Related Content

What's hot

Computer security
Computer security Computer security
Computer security Harry Potter
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeDavid Evans
 
Secure and privacy-preserving data transmission and processing using homomorp...
Secure and privacy-preserving data transmission and processing using homomorp...Secure and privacy-preserving data transmission and processing using homomorp...
Secure and privacy-preserving data transmission and processing using homomorp...DefCamp
 
A survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic EncryptionA survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic Encryptioniosrjce
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic EncryptionVictor Pereira
 
ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...
ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...
ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...Cyber Security Alliance
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic EncryptionGöktuğ Serez
 
Partial Homomorphic Encryption
Partial Homomorphic EncryptionPartial Homomorphic Encryption
Partial Homomorphic Encryptionsecurityxploded
 
On Mining Bitcoins - Fundamentals & Outlooks
On Mining Bitcoins - Fundamentals & OutlooksOn Mining Bitcoins - Fundamentals & Outlooks
On Mining Bitcoins - Fundamentals & OutlooksFilip Maertens
 

What's hot (13)

Merkle Trees
Merkle TreesMerkle Trees
Merkle Trees
 
Computing on Encrypted Data
Computing on Encrypted DataComputing on Encrypted Data
Computing on Encrypted Data
 
Computer security
Computer security Computer security
Computer security
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero Knowledge
 
Secure and privacy-preserving data transmission and processing using homomorp...
Secure and privacy-preserving data transmission and processing using homomorp...Secure and privacy-preserving data transmission and processing using homomorp...
Secure and privacy-preserving data transmission and processing using homomorp...
 
A survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic EncryptionA survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic Encryption
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic Encryption
 
1508.07756v1
1508.07756v11508.07756v1
1508.07756v1
 
ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...
ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...
ASFWS 2012 - Hash-flooding DoS reloaded: attacks and defenses par Jean-Philip...
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic Encryption
 
Partial Homomorphic Encryption
Partial Homomorphic EncryptionPartial Homomorphic Encryption
Partial Homomorphic Encryption
 
On Mining Bitcoins - Fundamentals & Outlooks
On Mining Bitcoins - Fundamentals & OutlooksOn Mining Bitcoins - Fundamentals & Outlooks
On Mining Bitcoins - Fundamentals & Outlooks
 
Hash function
Hash functionHash function
Hash function
 

Viewers also liked

Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key SignaturesDavid Evans
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More ParanoidDavid Evans
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?David Evans
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting TransactionsDavid Evans
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm ConfirmationsDavid Evans
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in BitcoinDavid Evans
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to CryptographyPopescu Petre
 
Network security & cryptography
Network security & cryptographyNetwork security & cryptography
Network security & cryptographyRahulprasad Yadav
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network securitypatisa
 

Viewers also liked (16)

Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key Signatures
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More Paranoid
 
Mining
MiningMining
Mining
 
More mining
More miningMore mining
More mining
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?
 
Altcoins
AltcoinsAltcoins
Altcoins
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting Transactions
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm Confirmations
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in Bitcoin
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Network security & cryptography
Network security & cryptographyNetwork security & cryptography
Network security & cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
cryptography
cryptographycryptography
cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 

Similar to Introduction to Cryptography

Engineering Cryptographic Applications: Symmetric Encryption
Engineering Cryptographic Applications: Symmetric EncryptionEngineering Cryptographic Applications: Symmetric Encryption
Engineering Cryptographic Applications: Symmetric EncryptionDavid Evans
 
IS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption TechniquesIS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption TechniquesSarthak Patel
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesJanani S
 
Introductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information SecurityIntroductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information SecurityBikramjit Sarkar, Ph.D.
 
Data Protection Techniques and Cryptography
Data Protection Techniques and CryptographyData Protection Techniques and Cryptography
Data Protection Techniques and CryptographyTalha SAVAS
 
Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)Zara Nawaz
 
Cs166 mynote
Cs166 mynoteCs166 mynote
Cs166 mynoteKaya Ota
 
sabith.pptx
sabith.pptxsabith.pptx
sabith.pptxsabith15
 
Crypto theory to practice
Crypto theory to practiceCrypto theory to practice
Crypto theory to practiceLuis Goldster
 
Crypto theory practice
Crypto theory practiceCrypto theory practice
Crypto theory practiceJames Wong
 
Crypto theory to practice
Crypto theory to practiceCrypto theory to practice
Crypto theory to practiceTony Nguyen
 
Crypto theory to practice
Crypto theory to practiceCrypto theory to practice
Crypto theory to practiceDavid Hoen
 
Crypto theory to practice
Crypto theory to practiceCrypto theory to practice
Crypto theory to practiceHarry Potter
 
Crypto theory practice
Crypto theory practiceCrypto theory practice
Crypto theory practiceYoung Alista
 
Crypto theory practice
Crypto theory practiceCrypto theory practice
Crypto theory practiceFraboni Ec
 
Computer security
Computer security Computer security
Computer security Tony Nguyen
 
Computer security
Computer securityComputer security
Computer securityDavid Hoen
 
Computer security
Computer securityComputer security
Computer securityJames Wong
 

Similar to Introduction to Cryptography (20)

Engineering Cryptographic Applications: Symmetric Encryption
Engineering Cryptographic Applications: Symmetric EncryptionEngineering Cryptographic Applications: Symmetric Encryption
Engineering Cryptographic Applications: Symmetric Encryption
 
IS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption TechniquesIS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption Techniques
 
Network security CS2
Network security CS2Network security CS2
Network security CS2
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Introductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information SecurityIntroductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information Security
 
Data Protection Techniques and Cryptography
Data Protection Techniques and CryptographyData Protection Techniques and Cryptography
Data Protection Techniques and Cryptography
 
Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)
 
Cs166 mynote
Cs166 mynoteCs166 mynote
Cs166 mynote
 
sabith.pptx
sabith.pptxsabith.pptx
sabith.pptx
 
Crypto theory to practice
Crypto theory to practiceCrypto theory to practice
Crypto theory to practice
 
Crypto theory practice
Crypto theory practiceCrypto theory practice
Crypto theory practice
 
Crypto theory to practice
Crypto theory to practiceCrypto theory to practice
Crypto theory to practice
 
Crypto theory to practice
Crypto theory to practiceCrypto theory to practice
Crypto theory to practice
 
Crypto theory to practice
Crypto theory to practiceCrypto theory to practice
Crypto theory to practice
 
Crypto theory practice
Crypto theory practiceCrypto theory practice
Crypto theory practice
 
Crypto theory practice
Crypto theory practiceCrypto theory practice
Crypto theory practice
 
Computer security
Computer securityComputer security
Computer security
 
Computer security
Computer security Computer security
Computer security
 
Computer security
Computer securityComputer security
Computer security
 
Computer security
Computer securityComputer security
Computer security
 

More from David Evans

Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksDavid Evans
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in ParadiseDavid Evans
 
Mining Economics
Mining EconomicsMining Economics
Mining EconomicsDavid Evans
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the MassesDavid Evans
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of ReserveDavid Evans
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!David Evans
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinDavid Evans
 
Alternate Cryptocurrencies
Alternate CryptocurrenciesAlternate Cryptocurrencies
Alternate CryptocurrenciesDavid Evans
 
Quiz 2: Bitcoin Protocol, Mining, Supsersizing
Quiz 2: Bitcoin Protocol, Mining, SupsersizingQuiz 2: Bitcoin Protocol, Mining, Supsersizing
Quiz 2: Bitcoin Protocol, Mining, SupsersizingDavid Evans
 
Mostly About Superfish
Mostly About SuperfishMostly About Superfish
Mostly About SuperfishDavid Evans
 
Mining Pools and Profits
Mining Pools and ProfitsMining Pools and Profits
Mining Pools and ProfitsDavid Evans
 

More from David Evans (17)

Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in Paradise
 
Mining Economics
Mining EconomicsMining Economics
Mining Economics
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the Masses
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of Reserve
 
Silk Road
Silk RoadSilk Road
Silk Road
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, Permacoin
 
Alternate Cryptocurrencies
Alternate CryptocurrenciesAlternate Cryptocurrencies
Alternate Cryptocurrencies
 
Script
ScriptScript
Script
 
Selfish Mining
Selfish MiningSelfish Mining
Selfish Mining
 
Quiz 2: Bitcoin Protocol, Mining, Supsersizing
Quiz 2: Bitcoin Protocol, Mining, SupsersizingQuiz 2: Bitcoin Protocol, Mining, Supsersizing
Quiz 2: Bitcoin Protocol, Mining, Supsersizing
 
Mostly About Superfish
Mostly About SuperfishMostly About Superfish
Mostly About Superfish
 
Mining Pools and Profits
Mining Pools and ProfitsMining Pools and Profits
Mining Pools and Profits
 
More Mining
More MiningMore Mining
More Mining
 
Mining
MiningMining
Mining
 
DigiCash
DigiCashDigiCash
DigiCash
 

Recently uploaded

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Recently uploaded (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

Introduction to Cryptography

  • 1. Cryptocurrency Cabal cs4501 Fall 2015 David Evans and Samee Zahur University of Virginia Class 2: Cryptography
  • 2. Upcoming Schedule • Today: Introduction to Cryptography • Wednesday: ECC and Signatures – Elliptic Curve Cryptography, ECDSA • Next Monday: Checkup 1 – Covers classes 1-3, readings (see notes) • Tuesday, 15 September: Problem Set 1 1
  • 4. Who’s in the class? 3 BS Computer Science (16) BA Computer Science (10) BS Computer Engineering (4) Mathematics (6) Economics (3) Aerospace Engineering Business (McIntire) History Linguistics Political and Social Thought Politics
  • 5. Plan for Today • Bitcoin Wallet • Notion of ownership of non-physical good • Conceptual understanding of key terms and principles in cryptography Cryptosystem, Attacks, Asymmetric Crypto 4 Several ways Bitcoin Wallet uses cryptography
  • 7. 6
  • 9. 8
  • 10.
  • 12.
  • 13.
  • 14. 13
  • 15. Recap: Class 1 Currency is a medium of exchange At a minimum, must be: transferable – can be exchanged scarce – limited supply 14 Can we make something scarce and transferable with just bits?
  • 16. How can someone own something made of bits? 15
  • 17. 16 How can someone own anything easily reproduced?
  • 19. 18 Worshipful Company of Stationers and Newspaper Makers (“Stationer’s Company”) London 1403 Royal Charter 1557 Monopoly on printing Responsibility to censor
  • 20. 19 “An Act for the Encouragement of Learning, by Vesting the Copies of Printed Books in the Authors or Purchasers of Copies, during the Times therein mentioned…” Statute of Anne, 1710 Author has exclusive 14-year right to copy work (living author can extend for another 14 years)
  • 21. US Copyright Law 1790: 14 years (+ 14) 1831: 28 years (+ 14) 1976: life of author + 50 (75 for “corporate”) 1998: life of author + 70 (120 for “corporate”) 20 Created 1928
  • 22. How can someone own something made of bits without an army (or moose) helping? 21
  • 23. 22
  • 24. Previous Cryptography Experience 23 None, 20 Little, 8 Prof. Mahmoody’s Course, 2 Do you have any previous experience with cryptography?
  • 25. 24 What is cryptology? Greek: κρυπτ´oς = “kryptos” = hidden (secret) Cryptography – secret writing Cryptanalysis – analyzing (breaking) secrets Cryptanalysis is what an attacker does Decryption is what the intended receiver does Cryptosystems – systems that use secrets Cryptology – science of secrets
  • 26. 25 Security is an engineering goal: it involves mathematics, but is mostly about real implementations and people. Cryptology is a branch of mathematics: about abstract numbers and functions.
  • 28. 27 Active Attacker Encrypt DecryptPlaintext Ciphertext Plaintext Alice Bob Insecure Channel (e.g., the Internet) Mallory (active attacker)
  • 29. 28 Message Cryptosystem Encrypt Decrypt Plaintext Ciphertext PlaintextCiphertext Two functions: E(m: byte[])  byte[] and D(c: byte[])  byte[] Correctness property: for all possible messages m, D(E(m)) = m Security property: given c  E(m), it is “hard” to learn anything interesting about m.
  • 30. 29 It is possible to state the security property precisely (and prove a cryptosystem satisfies it given hardness assumptions).Shafi Goldwasser and Silvio Micali 2013 Turing Award Winners (for doing this in the 1980s)
  • 31. 30 Message Cryptosystem Encrypt Decrypt Plaintext Ciphertext PlaintextCiphertext Two functions: E(m: byte[])  byte[] and D(c: byte[])  byte[] Correctness property: for all possible messages m, D(E(m)) = m Security property: given c  E(m), it is “hard” to learn anything interesting about m.
  • 33. 32 “The enemy knows the system being used.” Claude Shannon, Communication Theory of Secrecy Systems (1949) Claude Shannon 1916-2001
  • 34. (Keyed) Symmetric Cryptosystem 33 Encrypt DecryptPlaintext Ciphertext Plaintext Insecure Channel Encrypt DecryptPlaintext Ciphertext Plaintext Insecure Channel Key Key Only secret is the key, not the E and D functions that now take key as input Asymmetric crypto: different keys for E and D, so you can reveal E without revealing D.
  • 36. Jefferson’s Wheel Cipher 26 wheels arranged in a secret order on a spindle, each wheel has randomly- permutated alphabet around rim Encrypt: turn wheels to display plaintext, then pick a “random” row as ciphertext Decrypt: arrange wheels in same (secret) order, line up ciphertext, look for plaintext 35
  • 37. 36 Auguste Kerckhoffs (1883)Thomas Jefferson (1790s) Should it be “TJ’s Principle”?
  • 38. 37 on the periphery of each, and between the black lines, put all the letters of the alphabet, not in their established order, but jumbled, & without order, so that no two shall be alike. now string them in their numerical order on an iron axis, one end of which has a head, and the other a nut and screw; the use of which is to hold them firm in any given position when you choose it. Jefferson’s description of wheel cipher (1802)
  • 39. Key Space Key space: K = set of possible keys 38 Key is order of wheels on spindle: |K | = 26 × 25 × … × 1 > 1026 Key is jumbling of letters on wheels: |K | = (26 × 25 × … × 1)26 > 10691
  • 40. Brute Force Attack 39 def brute_force(ciphertext): for guess in all_possible_keys(N): plaintext = decrypt(key, ciphertext) if plausible_message(plaintext): return plaintext Try all possible keys in some order, until you find one that works.
  • 41. Brute Force Attack 40 def brute_force(ciphertext): for guess in all_possible_keys(N): plaintext = decrypt(key, ciphertext) if plausible_message(plaintext): return plaintext Try all possible keys in some order, until you find one that works. What is necessary for brute force attack to succeed?
  • 42. (Im)Practicality of Brute Force Attacks Minimum energy needed to flip one bit (Landauer limit) ≈ kT ln 2 ≈ 2.8 zepto-Joules 41 k ≈ 1.4 × 10-23 J/K (Boltzmann’s constant) T = temperature (Kelvin) (300K)
  • 43. 42 Bit Flips Energy WolframAlpha Description 256 (DES) 2 × 10-3 J “acoustic energy in a whisper” 280 (“low security”) 3 × 103 J “metabolic energy of one gram of sugar” 26! (Jefferson+Kerkchoffs) 1 × 106 J “energy of one gram of gasoline” 2128 (AES minimum) 9 × 1017 J “twice energy consumption of Norway in 1998” 2256 (AES maximum) 3 × 1056 J “1/120th mass energy equivalent of galaxy’s visible mass”
  • 44. 43 Bit Flips Energy WolframAlpha Description 256 (DES) 2 × 10-3 J “acoustic energy in a whisper” 280 (“low security”) 3 × 103 J “metabolic energy of one gram of sugar” 26! (Jefferson+Kerkchoffs) 1 × 106 J “energy of one gram of gasoline” 2128 (AES minimum) 9 × 1017 J “twice energy consumption of Norway in 1998” 2256 (AES maximum) 3 × 1056 J “1/120th mass energy equivalent of galaxy’s visible mass” This is the best (unrealistic) possible case for a brute force attack: don’t need to do anything other than represent key and physically most efficient bit flips.
  • 45. 44 Bit Flips Energy WolframAlpha Description 256 (DES) 2 × 10-3 J “acoustic energy in a whisper” 280 (“low security”) 3 × 103 J “metabolic energy of one gram of sugar” 26! (Jefferson+Kerkchoffs) 1 × 106 J “energy of one gram of gasoline” 2128 (AES minimum) 9 × 1017 J “twice energy consumption of Norway in 1998” 2256 (AES maximum) 3 × 1056 J “1/120th mass energy equivalent of galaxy’s visible mass” But, assumes better than brute force attacks are not possible. All of these ciphers have weaknesses, and are much less secure than maximum security possible for that size key.
  • 46. Where might your wallet use symmetric crypto? 45
  • 48. Charge • Wednesday: ECC, signatures in bitcoin • See notes for readings • Checkup 1 next Monday 47 https://github.com/bitcoin-solutions/multibit-hd/blob/c040431dec7695244b6596b9ae0bd7e23a6f0ba5/mbhd- swing/src/main/java/org/multibit/hd/ui/views/wizards/welcome/create_wallet/CreateWalletReportPanelView.java

Editor's Notes

  1. 1 Bitcoin = 100M satoshi = 10^8 satoshi 1 Bitcoin = 1000 mBTC