SlideShare a Scribd company logo
Elliptic Curve Cryptography
for those who are afraid of math(s)
Martijn Grooten, Virus Bulletin
@martijn_grooten
BSides San Francisco, 29 February 2016
Elliptic Curve Cryptography for those who are afraid of maths
Disclaimer:
This talk will be useless.
Disclaimer:
This talk will be useless.
I am not a cryptographer.
Disclaimer:
This talk will be useless.
I am not a cryptographer.
Some things are wrong.
Elliptic curves
y2 = x3 + a·x + b
Elliptic curves
y2 = x3 + a·x + b
…and a prime number p.
Elliptic curves
y2 = x3 + a·x + b
…and a prime number p.
choice!
Elliptic Curve Cryptography for those who are afraid of maths
points
points≈numbers
P Q
P Q
P Q
P Q
P+Q
P Q
P+Q
“point addition”
P
P
P
P
P+P
P
2·P
P
“point doubling”
2·P
P
2·P
P
2·P
P
2·P
2·P+P
P
2·P
3·P
P
2·P
3·P
4·P
P
2·P
3·P
4·P
5·P
P
2·P
3·P
“(integer) multiplication”
6·P
4·P
5·P
So:
So:
We can “add” points to each other.
So:
We can “add” points to each other.
We can “multiply” points by an integer.
So:
We can “add” points to each other.
We can “multiply” points by an integer.
P + Q = Q + P
3·P + P = 2·P + 2·P = 4·P
5·(7·P) = 7·(5·P)
etc.
So:
We can “add” points to each other.
We can “multiply” points by an integer.
P + Q = Q + P
3·P + P = 2·P + 2·P = 4·P
5·(7·P) = 7·(5·P)
etc.
The points on a curve form an Abelian
Group (very exciting!).
From P to 100·P in eight steps
From P to 100·P in eight steps
To go from a point P to 100·P:
From P to 100·P in eight steps
To go from a point P to 100·P:
P → 2·P
2·P → 3·P
3·P → 6·P
6·P → 12·P
12·P → 24·P
24·P → 25·P
25·P → 50·P
50·P → 100·P
“Division” is very slow
“Division” is very slow
Given points P and Q, where Q=n·P,
the best way to find the number n is to
try P, 2·P, 3·P, etc. That is very slow.
“Division” is very slow
Given points P and Q, where Q=n·P,
the best way to find the number n is to
try P, 2·P, 3·P, etc. That is very slow.
The Discrete Logarithm Problem for
elliptic curves.
ECDH (Elliptic Curve Diffie-Hellman)
ECDH (Elliptic Curve Diffie-Hellman)
The challenge: Alice and Bob want to
“agree” on a secret key over a public
channel.
ECDH (Elliptic Curve Diffie-Hellman)
The challenge: Alice and Bob want to
“agree” on a secret key over a public
channel.
For example: Alice is a web browser, Bob a
web server and they want to exchange a
key to encrypt a TLS session.
ECDH (Elliptic Curve Diffie-Hellman)
Alice and Bob have agreed (publicly!)
on an elliptic curve and a point P on
the curve.
ECDH (Elliptic Curve Diffie-Hellman)
Alice and Bob have agreed (publicly!)
on an elliptic curve and a point P on
the curve.
Alice chooses secret large random
number a.
ECDH (Elliptic Curve Diffie-Hellman)
Alice and Bob have agreed (publicly!)
on an elliptic curve and a point P on
the curve.
Alice chooses secret large random
number a.
Bob chooses secret large random
number b.
ECDH (Elliptic Curve Diffie-Hellman)
ECDH (Elliptic Curve Diffie-Hellman)
Alice computes a·P (a times the point
P) and shares the answer with Bob.
ECDH (Elliptic Curve Diffie-Hellman)
Alice computes a·P (a times the point
P) and shares the answer with Bob.
Bob computes b·P and shares this too.
ECDH (Elliptic Curve Diffie-Hellman)
Alice computes a·P (a times the point
P) and shares the answer with Bob.
Bob computes b·P and shares this too.
Alice computes a·(b·P) (a times the
point Bob gave her).
ECDH (Elliptic Curve Diffie-Hellman)
Alice computes a·P (a times the point
P) and shares the answer with Bob.
Bob computes b·P and shares this too.
Alice computes a·(b·P) (a times the
point Bob gave her).
Bob computes b·(a·P).
ECDH (Elliptic Curve Diffie-Hellman)
Alice computes a·P (a times the point
P) and shares the answer with Bob.
Bob computes b·P and shares this too.
Alice computes a·(b·P) (a times the
point Bob gave her).
Bob computes b·(a·P).
Secret key: a·(b·P) = b·(a·P)
ECDH (Elliptic Curve Diffie-Hellman)
Homework: find ECDH in Wireshark
Random number generators
Random number generators
True randomness
Random number generators
True randomness
Random number generators
True randomness
Random number generators
True randomness
output
Random number generators
True randomness
output
Random number generators using ECC
Discrete Logarithm Problem:
n → n·P
gives “random” points/numbers.
Random number generators using
ECC
Discrete Logarithm Problem:
n → n·P
gives “random” points/numbers.
n0
Random number generators using
ECC
Discrete Logarithm Problem:
n → n·P
gives “random” points/numbers.
n0 n1
n0·P
Random number generators using
ECC
Discrete Logarithm Problem:
n → n·P
gives “random” points/numbers.
n0 n1 n2
n0·P n1·P
Random number generators using
ECC
Discrete Logarithm Problem:
n → n·P
gives “random” points/numbers.
n0 n1 n2
n0·P n1·P n2·P
Random number generators using
ECC
Discrete Logarithm Problem:
n → n·P
gives “random” points/numbers.
n0 n1 n2
n0·P n1·P n2·P
n1 n2
Random number generators using ECC
Discrete Logarithm Problem:
n → n·P
gives “random” points/numbers.
n0 n1 n2
n0·P n1·P n2·P
n1 n2
n1·P
Random number generators using ECC
Given: elliptic curve with two points P
and Q.
Random number generators using
ECC
n0
Given: elliptic curve with two points P
and Q.
32-byte seed
Random number generators using
ECC
n0 n1
Given: elliptic curve with two points P
and Q.
n0·P
32-byte seed
Random number generators using
ECC
n0 n1
Given: elliptic curve with two points P
and Q.
n0·P
n1·Q32-byte seed
30 bytes
Random number generators using
ECC
n0 n1 n2
Given: elliptic curve with two points P
and Q.
n0·P n1·P
n1·Q32-byte seed
30 bytes
Random number generators using ECC
n0 n1 n2
Given: elliptic curve with two points P
and Q.
n0·P n1·P
n1·Q n2·Q32-byte seed
30 bytes 30 bytes
Random number generators using ECC
n0 n1 n2
Given: elliptic curve with two points P
and Q.
n0·P n1·P n2·P
n1·Q n2·Q32-byte seed
30 bytes 30 bytes
Random number generators using ECC
n0 n1 n2
Given: elliptic curve with two points P
and Q.
n0·P n1·P n2·P
n1·Q n2·Q32-byte seed
30 bytes 30 bytes
Note: ideas from this slide and the next are borrowed from Bernstein, Heninger and
Lange (NCSC ‘14).
Random number generators using ECC
Fact: P=d·Q for some (large) number d.
Random number generators using ECC
n0 n1 n2
Fact: P=d·Q for some (large) number d.
n0·P n1·P n2·P
n1·Q n2·Q32-byte seed
30 bytes 30 bytes
Random number generators using ECC
n0 n1 n2
Fact: P=d·Q for some (large) number d.
n0·P n1·P n2·P
n1·Q n2·Q32-byte seed
30 bytes 30 bytes
216
possibilities
Random number generators using ECC
n0 n1 n2
Fact: P=d·Q for some (large) number d.
n0·P n1·P n2·P
n1·Q n2·Q32-byte seed
30 bytes 30 bytes
216
possibilities
r1
Random number generators using ECC
n0 n1 n2
Fact: P=d·Q for some (large) number d.
n0·P n1·P n2·P
n1·Q n2·Q32-byte seed
30 bytes 30 bytes
216
possibilities
r1
d·r1
Random number generators using ECC
n0 n1 n2
Fact: P=d·Q for some (large) number d.
n0·P n1·P n2·P
n1·Q n2·Q32-byte seed
30 bytes 30 bytes
216
possibilities
r1
d·r1
n2 = n1·P = n1(d·Q)
Random number generators using ECC
n0 n1 n2
Fact: P=d·Q for some (large) number d.
n0·P n1·P n2·P
n1·Q n2·Q32-byte seed
30 bytes 30 bytes
216
possibilities
r1
d·r1
n2 = n1·P = n1(d·Q)
= d·(n1·Q)
Random number generators using ECC
n0 n1 n2
Fact: P=d·Q for some (large) number d.
n0·P n1·P n2·P
n1·Q n2·Q32-byte seed
30 bytes 30 bytes
216
possibilities
r1
d·r1
n2 = n1·P = n1(d·Q)
= d·(n1·Q)
= d·r1
So who, if anyone, knows d?
So who, if anyone, knows d?
So who, if anyone, knows d?
“Dual_EC_DRBG”
So who, if anyone, knows d?
“Dual_EC_DRBG”
NB: this RNG is bad for many other
reasons!
What happened at Juniper?
What happened at Juniper?
Juniper used Dual_EC_DRBG (in
ScreenOS) but with different P, Q.
What happened at Juniper?
Juniper used Dual_EC_DRBG (in
ScreenOS) but with different P, Q.
In theory that is OK, but…
What happened at Juniper?
Juniper used Dual_EC_DRBG (in
ScreenOS) but with different P, Q.
In practice… Oops.
In theory that is OK, but…
Anything else up their sleeve?
Anything else up their sleeve?
The widely used curves (P-256 etc.)
use “unexplained” constants. We can't
exclude that they weren't chosen to
create a backdoor.
Anything else up their sleeve?
The widely used curves (P-256 etc.)
use “unexplained” constants. We can't
exclude that they weren't chosen to
create a backdoor.
There probably isn't such a backdoor,
but we should aim for “nothing up my
sleeve” constants (e.g. Curve25519).
Suggested reading
"A Riddle Wrapped in an Enigma"
by Neal Koblitz and Alfred J. Menezes
http://eprint.iacr.org/2015/1018.pdf
ECC: a good idea?
Elliptic curve cryptography is a good
idea because we can do with much
smaller keys.
ECC: a good idea?
Elliptic curve cryptography is a good
idea because we can do with much
smaller keys.
256-bit ECC ≈ 3072-bit RSA.
ECC: a good idea?
Elliptic curve cryptography is a good
idea because we can do with much
smaller keys.
256-bit ECC ≈ 3072-bit RSA.
Elliptic curve crypto uses complicated
maths. That is its biggest weakness.
Thank you!
@martijn_grooten
martijn.grooten@virusbtn.com
www.virusbulletin.com
PS “How Broken Is Our Crypto Really?”
3 March, 8:00am, room 2005 @ RSA.
Thank you!
@martijn_grooten
martijn.grooten@virusbtn.com
www.virusbulletin.com
PS “How Broken Is Our Crypto Really?”
3 March, 8:00am, room 2005 @ RSA.

More Related Content

What's hot (20)

PDF
CNS - Unit - 2 - Stream Ciphers and Block Ciphers
Gyanmanjari Institute Of Technology
 
PPTX
Classical encryption techniques
Janani S
 
PDF
Introduction - Lattice-based Cryptography
Alexandre Augusto Giron
 
PPTX
AES Encryption
Rahul Marwaha
 
PPTX
Number theory and cryptography
Yasser Ali
 
PPTX
Cryptographic algorithms
Anamika Singh
 
PPTX
Elgamal & schnorr digital signature scheme copy
North Cap University (NCU) Formely ITM University
 
PPTX
RSA Algorithm
Srinadh Muvva
 
PDF
Cs8792 cns - Public key cryptosystem (Unit III)
ArthyR3
 
PPTX
Asymmetric Cryptography.pptx
diaa46
 
PPTX
Cryptography and Information Security
Dr Naim R Kidwai
 
PPTX
Cryptography.ppt
Uday Meena
 
PDF
3. The Data Encryption Standard (DES) and Alternatives
Sam Bowne
 
PPTX
El Gamal Cryptosystem
Adri Jovin
 
PPT
AES.ppt
BincySam2
 
PPTX
Public Key Cryptography
Gopal Sakarkar
 
PPT
DES (Data Encryption Standard) pressentation
sarhadisoftengg
 
PPT
Block Cipher and its Design Principles
SHUBHA CHATURVEDI
 
PPTX
Random Oracle Model & Hashing - Cryptography & Network Security
Mahbubur Rahman
 
CNS - Unit - 2 - Stream Ciphers and Block Ciphers
Gyanmanjari Institute Of Technology
 
Classical encryption techniques
Janani S
 
Introduction - Lattice-based Cryptography
Alexandre Augusto Giron
 
AES Encryption
Rahul Marwaha
 
Number theory and cryptography
Yasser Ali
 
Cryptographic algorithms
Anamika Singh
 
Elgamal & schnorr digital signature scheme copy
North Cap University (NCU) Formely ITM University
 
RSA Algorithm
Srinadh Muvva
 
Cs8792 cns - Public key cryptosystem (Unit III)
ArthyR3
 
Asymmetric Cryptography.pptx
diaa46
 
Cryptography and Information Security
Dr Naim R Kidwai
 
Cryptography.ppt
Uday Meena
 
3. The Data Encryption Standard (DES) and Alternatives
Sam Bowne
 
El Gamal Cryptosystem
Adri Jovin
 
AES.ppt
BincySam2
 
Public Key Cryptography
Gopal Sakarkar
 
DES (Data Encryption Standard) pressentation
sarhadisoftengg
 
Block Cipher and its Design Principles
SHUBHA CHATURVEDI
 
Random Oracle Model & Hashing - Cryptography & Network Security
Mahbubur Rahman
 

Viewers also liked (20)

PPT
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
municsaa
 
PDF
Elliptic Curves and Elliptic Curve Cryptography
Md. Al-Amin Khandaker Nipu
 
PPTX
Introduction to Elliptic Curve Cryptography
David Evans
 
PDF
Elliptic Curve Cryptography: Arithmetic behind
Ayan Sengupta
 
PDF
Patterns for Secure Boot and Secure Storage in Computer Systems
Marcel Winandy
 
PDF
Zero to ECC in 30 Minutes: A primer on Elliptic Curve Cryptography (ECC)
Entrust Datacard
 
PPT
Elliptic curvecryptography Shane Almeida Saqib Awan Dan Palacio
Information Security Awareness Group
 
PPT
introduction to cryptography
Priyamvada Singh
 
DOC
Oruta privacy preserving public auditing for shared data in the cloud
Adz91 Digital Ads Pvt Ltd
 
PDF
Hidden Dangers Lurking in E-Commerce and Reducing Fraud with the Right SSL Ce...
CheapSSLsecurity
 
PDF
ECC vs RSA: Battle of the Crypto-Ninjas
James McGivern
 
PPT
(Crypto) DES And RSA Algorithms Overview
EL Bachir Nouni
 
PDF
JTAG Interface (Intro)
Nitesh Bhatia
 
PPTX
Mã hóa đường cong Elliptic
LE Ngoc Luyen
 
PPTX
Privacy preserving public auditing for regenerating-code-based cloud storage
Nagamalleswararao Tadikonda
 
PPTX
Oruta ppt
Manasa Chowdary
 
PDF
Oruta project report
Manasa Chowdary
 
PDF
SFO15-503: Secure storage in OP-TEE
Linaro
 
PPT
Privacy preserving public auditing for secure cloud storage
Mustaq Syed
 
DOC
Privacy Preserving Public Auditing for Data Storage Security in Cloud
Girish Chandra
 
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
municsaa
 
Elliptic Curves and Elliptic Curve Cryptography
Md. Al-Amin Khandaker Nipu
 
Introduction to Elliptic Curve Cryptography
David Evans
 
Elliptic Curve Cryptography: Arithmetic behind
Ayan Sengupta
 
Patterns for Secure Boot and Secure Storage in Computer Systems
Marcel Winandy
 
Zero to ECC in 30 Minutes: A primer on Elliptic Curve Cryptography (ECC)
Entrust Datacard
 
Elliptic curvecryptography Shane Almeida Saqib Awan Dan Palacio
Information Security Awareness Group
 
introduction to cryptography
Priyamvada Singh
 
Oruta privacy preserving public auditing for shared data in the cloud
Adz91 Digital Ads Pvt Ltd
 
Hidden Dangers Lurking in E-Commerce and Reducing Fraud with the Right SSL Ce...
CheapSSLsecurity
 
ECC vs RSA: Battle of the Crypto-Ninjas
James McGivern
 
(Crypto) DES And RSA Algorithms Overview
EL Bachir Nouni
 
JTAG Interface (Intro)
Nitesh Bhatia
 
Mã hóa đường cong Elliptic
LE Ngoc Luyen
 
Privacy preserving public auditing for regenerating-code-based cloud storage
Nagamalleswararao Tadikonda
 
Oruta ppt
Manasa Chowdary
 
Oruta project report
Manasa Chowdary
 
SFO15-503: Secure storage in OP-TEE
Linaro
 
Privacy preserving public auditing for secure cloud storage
Mustaq Syed
 
Privacy Preserving Public Auditing for Data Storage Security in Cloud
Girish Chandra
 
Ad

Similar to Elliptic Curve Cryptography for those who are afraid of maths (20)

DOCX
Assignment 2 (1) (1).docx
pinstechwork
 
PDF
Low Power FPGA Based Elliptical Curve Cryptography
IOSR Journals
 
PDF
Low Power FPGA Based Elliptical Curve Cryptography
IOSR Journals
 
PPTX
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
NIT Sikkim
 
PDF
12 Elliptic Curves
Sam Bowne
 
PDF
An Introduction to Elleptic Curve Cryptography
Derek Callaway
 
PDF
CNIT 141: 9. Elliptic Curve Cryptosystems
Sam Bowne
 
PDF
Report
Conor McMenamin
 
PDF
CNIT 141 12. Elliptic Curves
Sam Bowne
 
PPTX
Demystifying Zero Knowledge Proofs [FINAL].pptx
RedWhite12
 
PDF
CNIT 141 12. Elliptic Curves
Sam Bowne
 
PDF
CNIT 141 12. Elliptic Curves
Sam Bowne
 
PDF
CNIT 141: 12. Elliptic Curves
Sam Bowne
 
PPTX
ellipticcurvecryptography.pptx
AYUSHJAIN152065
 
PDF
Improved authenticated elliptic curve cryptography scheme for resource starve...
CSITiaesprime
 
PDF
Implementation and Secured Authentication Key using Elliptic Curve Cryptography
AM Publications,India
 
PDF
Efficiency of 128-bit Encryption and Decryption Process in Elgamal Method Usi...
TELKOMNIKA JOURNAL
 
PDF
PEC - AN ALTERNATE AND MORE EFFICIENT PUBLIC KEY CRYPTOSYSTEM
ijcisjournal
 
PPTX
ECC.pptx Ecc cryptography for secure encrypted message and decryption using ...
sameenakhan1805
 
PPT
Lect no 13 ECC.ppt
DEEPAK948083
 
Assignment 2 (1) (1).docx
pinstechwork
 
Low Power FPGA Based Elliptical Curve Cryptography
IOSR Journals
 
Low Power FPGA Based Elliptical Curve Cryptography
IOSR Journals
 
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
NIT Sikkim
 
12 Elliptic Curves
Sam Bowne
 
An Introduction to Elleptic Curve Cryptography
Derek Callaway
 
CNIT 141: 9. Elliptic Curve Cryptosystems
Sam Bowne
 
CNIT 141 12. Elliptic Curves
Sam Bowne
 
Demystifying Zero Knowledge Proofs [FINAL].pptx
RedWhite12
 
CNIT 141 12. Elliptic Curves
Sam Bowne
 
CNIT 141 12. Elliptic Curves
Sam Bowne
 
CNIT 141: 12. Elliptic Curves
Sam Bowne
 
ellipticcurvecryptography.pptx
AYUSHJAIN152065
 
Improved authenticated elliptic curve cryptography scheme for resource starve...
CSITiaesprime
 
Implementation and Secured Authentication Key using Elliptic Curve Cryptography
AM Publications,India
 
Efficiency of 128-bit Encryption and Decryption Process in Elgamal Method Usi...
TELKOMNIKA JOURNAL
 
PEC - AN ALTERNATE AND MORE EFFICIENT PUBLIC KEY CRYPTOSYSTEM
ijcisjournal
 
ECC.pptx Ecc cryptography for secure encrypted message and decryption using ...
sameenakhan1805
 
Lect no 13 ECC.ppt
DEEPAK948083
 
Ad

Recently uploaded (20)

PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
The Future of Artificial Intelligence (AI)
Mukul
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 

Elliptic Curve Cryptography for those who are afraid of maths