SlideShare a Scribd company logo
CNIT 141
Cryptography for Computer Networks
12. Elliptic Curves
Updated 11-30-22
Topics
• What is an Elliptic Curve?
• The ECDLP Problem
• Diffie-Hellman Key Agreement over Elliptic
Curves
• Choosing a Curve
• How Things Can Go Wrong
New & Improved
• ECC was introduced in 1985
• More powerful and efficient than RSA and
classical Diffie-Hellman
• ECC with as 256-bit key is stronger than RSA
with a 4096-bit key
Slow Adoption
• OpenSSL added ECC in 2005
• OpenSSH added it in 2011
• Used in Bitcoin
• Most applications based on DLP can use ECC
instead
• Except Secure Remote Password
• Link Ch 12a
What is an Elliptic Curve?
Elliptic Curve over
Real Numbers
y2 = x3 + ax + b
Elliptic Curves over
Integers
• Mod 191
• From group Z191 = 0, 1, 2, ... 190
The Field Zp
• We'll use both addition and multiplication
• We need 0 as the additive identity element
• x + 0 = x
• There are inverses for addition (-x)
• And for multiplication (denoted 1/x)
• Such a group is called a field
• A finite number of elements: finite field
Adding Points
• P + Q: Draw line connecting P and Q
• Find the point where it intersects with the
elliptic curve
• Reflect around X-axis
P + (-P)
P =(xP, yP)
-P =(xP, -yP)
• Adding these points makes a vertical line
• Goes to the "point at infinity"
• Which acts as zero for elliptic curves
P + P
• Use tangent line
Multiplication
• kP = P + P + P + ... (k times)
• To calculate it faster, calculate:
• P2 = P + P
• P4 = P2 + P2
• P8 = P4 + P4
• etc.
What is a Group?
• A set of elements (denoted x, y, z below)
• An operation (denoted ✕ below)
• With these properties
• Closure
• If x and y are in the group, x ✕ y is too
• Associativity (x ✕ y) ✕ z = x ✕ (y ✕ z)
• Identity element e such that e ✕ x = x
• Inverse For every x, there is a y with x ✕ y = e
Elliptic Curve Groups
• Points P, Q, R and "addition" form a group
• Closure
• If P and Q are in the group, P + Q is too
• Associativity (P + Q) + R = P + (Q + R)
• Identity element O is the point at infinity
• Such that P + O = P
• Inverse
• For every P = (x, y) , -P = (x, -y)
• P + (-P) = O
The ECDLP Problem
ECDLP
• All elliptic curve cryptography is based in this
problem
Given P and Q
Find k such that Q = kP
• Believed to be hard, like Discrete Logratim
Problem
• Has withstood cryptanalysis since its
introduction in 1985
Smaller Numbers
• Using the field Zp
• Where p is n bits long
• The security is n / 2 bits
• A p 256 bits long provides 128 bits of security
• That would take more than 4096 bits with RSA
• ECC is much faster
Diffie-Hellman Key Agreement
over Elliptic Curves
RSA-Based Diffie-Hellman
(DH)
• They can both calculate gab by combining
public and secret information
Keep a secret
Transmit ga
Calculate gab = Ba
Keep b secret
Transmit gb
Calculate gab = Ab
ECDH
• Choose a fixed point G (not secret)
• Shared secret is dAPB = dBPA = dAdBG
Pick a random secret dA
Transmit PA = dAG
Calculate dAdBG = dAPB
Pick a random secret dB
Transmit PB = dBG
Calculate dAdBG = dBPA
Signing with Elliptic Curves
• ECDSA (Elliptic Curve Digital Signature
Algorithm)
• Replaces RSA and classical DSA
• The only signature used in Bitcoin
• Supported by many TLS and SSH
implementations
• Consists of signature generation and
verification algorithms
• Signer holds a private key d
• Verifiers hold the public key P = dG
• Both know:
• What elliptic curve to use
• Its order n (the number of points in the
curve)
• Coordinates of a base point G
Signing with Elliptic Curves
ECDSA Signature
Generation
• Signer hashes the message to form h
• With a function such as SHA-256 or BLAKE2
• Signer picks a random number k
• Calculates kG, with coordinates (x, y)
• Signature is (r, s):
r = x mod n s = (h + rd) / k mod n
Signature Length
• If coordinates are 256-bit numbers
• r and s are both 256 bits long
• Signature is 512 bits long
ECDSA vs. RSA
Signatures
• RSA is used only for encryption and signatures
• ECC is a family of algorithms
• Encryption and signatures
• Key agreement
• Advanced functions such as identity-based
encryption
• RSA's signature and verification algorithms are
simpler than ECDSA
• RSA's verification process is often faster
because of the small public key e
• ECC has two major advantages
• Shorter signatures
• Faster signing speed
ECDSA vs. RSA
Signatures
Speed Comparison
• ECDSA is 150x faster at signing than RSA
• Slightly faster at verifying
Encrypting with Elliptic
Curves
• Rarely used
• Message size can't exceed about 100 bits
• RSA can use 4000 bits at same security level
Integrated Encryption
Scheme (IES)
• Generate a Diffie-Hellman shared secret
• Derive a symmetric key from the shared
secret
• Use symmetric encryption
Elliptic Curve Integrated
Encryption Scheme (ECIES)
Choosing a Curve
Parameters
• Order (number of points), also called
modulus
• a and b in
y2 = x3 + ax + b
• Origin of the chosen a and b
Criteria for Security
• Order (number of points) must not be product
of small numbers
• Curves that treat P+Q and P+P the same way
are safer, to avoid information leaks
• Unified addition law
• Creators of curve should explain how a and b
were chosen, or people will be suspicious
NIST Curves
• Standardized in 2000
• Five prime curves (modulus is prime)
• The most commonly used ones
• Ten others use "binary polynomials"
• Make hardware implementation more
efficient
• Rarely used with elliptic curves
P-256
• The most common NIST curve
• Modulus is p
• b is a 256-bit number
Where Did b Come From?
• NSA never explained it well
• Most experts don't believe there's a backdoor
• b is the SHA-1 hash of this random-looking
value
• https://medium.com/asecuritysite-when-bob-met-alice/ding-ding-its-secp256k1-
and-curve-25519-in-red-corner-and-nist-in-the-blue-corner-f49c4ad1c3a8
Curve 25519
• Published by Daniel J. Bernstein in 2006
• Faster than NIST standard curves
• Uses shorter keys
• No suspicious constants
• Uses same formula for P+Q and P+P
p = 2255 - 19
• Used everywhere
• Chrome, Apple, OpenSSH
• But not a NIST standard
Curve 25519
y2 = x3 + 7
p = 2256 - 232 - 977
• Used in Bitcoin
https://en.bitcoin.it/wiki/Secp256k1
Curve secp256k1
Other Curves
• Old national standards
• France: ANSSI curves
• Germany: Brainpool curves
• Use constants of unknown origin
Other Curves
• Newer curves, rarely used
• Curve41417
• More secure variant of Curve25519
• Ed448-Goldilocks
• 448-bit curve from 2014
How Things Can Go
Wrong
Large Attack Surface
• Elliptic curves have
• More parameters than classic Diffie-Hellman
• More opportunities for mistakes
• Possible vulnerabilities to side-channel
attacks
• Timing of calculations on large numbers
ECDSA with Bad
Randomness
• Signing uses a secret random k
s = (h + rd) / k mod n
• If k is re-used, attacker can calculate k
k = (h1 - h2) / (s1 - s2)
• This happened on the PlayStation 3 in 2010
• Presented at CCC by failOverflow team
Invalid Curve Attack
• Attacker sends PA that is not on the same curve
• From a weak curve instead
• Target fails to verify that PA is on the curve, and uses a
secret dBPA on a weak curve, so ECDLP can be solved
Doesn't know dA
Transmit malicious P
Calculates secret dB
Pick a random secret dB
Transmit PB = dBG
Calculate dBP
Invalid Curve Attack
• Malicious client could trick server into using
the wrong curve
• Exposing the server's secret key
• Some TLS implementations were shown to be
vulnerable in 2015
• https://threatpost.com/json-libraries-patched-against-invalid-
curve-crypto-attack/124336/
12 Elliptic Curves

More Related Content

What's hot

Elliptical curve cryptography
Elliptical curve cryptographyElliptical curve cryptography
Elliptical curve cryptography
Barani Tharan
 
Public Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithmPublic Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithm
Indra97065
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve CryptographyKelly Bresnahan
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
Adri Jovin
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
Rashmi Burugupalli
 
Elliptic Curve Cryptography Message Exchange
Elliptic Curve Cryptography Message ExchangeElliptic Curve Cryptography Message Exchange
Elliptic Curve Cryptography Message Exchange
JacopoMariaValtorta
 
EULER AND FERMAT THEOREM
EULER AND FERMAT THEOREMEULER AND FERMAT THEOREM
EULER AND FERMAT THEOREM
ankita pandey
 
The Diffie-Hellman Algorithm
The Diffie-Hellman AlgorithmThe Diffie-Hellman Algorithm
The Diffie-Hellman Algorithm
Jay Nagar
 
Elliptic curve cryptography
Elliptic curve cryptographyElliptic curve cryptography
Elliptic curve cryptography
Cysinfo Cyber Security Community
 
Cryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie BrownCryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie Brown
Information Security Awareness Group
 
CNIT 141: 5. Stream Ciphers
CNIT 141: 5. Stream CiphersCNIT 141: 5. Stream Ciphers
CNIT 141: 5. Stream Ciphers
Sam Bowne
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
Devakumar Kp
 
Cs8792 cns - unit i
Cs8792   cns - unit iCs8792   cns - unit i
Cs8792 cns - unit i
ArthyR3
 
encryption and decryption
encryption and decryptionencryption and decryption
Cryptography
CryptographyCryptography
Cryptography
KARNAN L S
 
block ciphers
block ciphersblock ciphers
block ciphers
Asad Ali
 
Introduction of cryptography and network security
Introduction of cryptography and network securityIntroduction of cryptography and network security
Introduction of cryptography and network security
NEHA PATEL
 
Lec # 7 Symmetric and asymmetric cryptography.pptx
Lec # 7 Symmetric and asymmetric cryptography.pptxLec # 7 Symmetric and asymmetric cryptography.pptx
Lec # 7 Symmetric and asymmetric cryptography.pptx
skknowledge
 
Information Security & Cryptography
Information Security & CryptographyInformation Security & Cryptography
Information Security & Cryptography
Arun ACE
 

What's hot (20)

Elliptical curve cryptography
Elliptical curve cryptographyElliptical curve cryptography
Elliptical curve cryptography
 
Public Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithmPublic Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithm
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
 
Elliptic Curve Cryptography Message Exchange
Elliptic Curve Cryptography Message ExchangeElliptic Curve Cryptography Message Exchange
Elliptic Curve Cryptography Message Exchange
 
EULER AND FERMAT THEOREM
EULER AND FERMAT THEOREMEULER AND FERMAT THEOREM
EULER AND FERMAT THEOREM
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
The Diffie-Hellman Algorithm
The Diffie-Hellman AlgorithmThe Diffie-Hellman Algorithm
The Diffie-Hellman Algorithm
 
Elliptic curve cryptography
Elliptic curve cryptographyElliptic curve cryptography
Elliptic curve cryptography
 
Cryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie BrownCryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie Brown
 
CNIT 141: 5. Stream Ciphers
CNIT 141: 5. Stream CiphersCNIT 141: 5. Stream Ciphers
CNIT 141: 5. Stream Ciphers
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
 
Cs8792 cns - unit i
Cs8792   cns - unit iCs8792   cns - unit i
Cs8792 cns - unit i
 
encryption and decryption
encryption and decryptionencryption and decryption
encryption and decryption
 
Cryptography
CryptographyCryptography
Cryptography
 
block ciphers
block ciphersblock ciphers
block ciphers
 
Introduction of cryptography and network security
Introduction of cryptography and network securityIntroduction of cryptography and network security
Introduction of cryptography and network security
 
Lec # 7 Symmetric and asymmetric cryptography.pptx
Lec # 7 Symmetric and asymmetric cryptography.pptxLec # 7 Symmetric and asymmetric cryptography.pptx
Lec # 7 Symmetric and asymmetric cryptography.pptx
 
Information Security & Cryptography
Information Security & CryptographyInformation Security & Cryptography
Information Security & Cryptography
 

Similar to 12 Elliptic Curves

CNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic CurvesCNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic Curves
Sam Bowne
 
CNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic CurvesCNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic Curves
Sam Bowne
 
CNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic CurvesCNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic Curves
Sam Bowne
 
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
Discrete Logarithmic Problem- Basis of Elliptic Curve CryptosystemsDiscrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
NIT Sikkim
 
ellipticcurvecryptography.pptx
ellipticcurvecryptography.pptxellipticcurvecryptography.pptx
ellipticcurvecryptography.pptx
AYUSHJAIN152065
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
Kathirvel Ayyaswamy
 
Chapter 8 cryptography lanjutan
Chapter 8 cryptography lanjutanChapter 8 cryptography lanjutan
Chapter 8 cryptography lanjutan
newbie2019
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated Encryption
Sam Bowne
 
Emily Stamm - Post-Quantum Cryptography
Emily Stamm - Post-Quantum CryptographyEmily Stamm - Post-Quantum Cryptography
Emily Stamm - Post-Quantum Cryptography
CSNP
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
Kathirvel Ayyaswamy
 
ch10_Key_Management.ppt ch10_Key_Management.ppt ch10_Key_Management.ppt
ch10_Key_Management.ppt ch10_Key_Management.ppt ch10_Key_Management.pptch10_Key_Management.ppt ch10_Key_Management.ppt ch10_Key_Management.ppt
ch10_Key_Management.ppt ch10_Key_Management.ppt ch10_Key_Management.ppt
tahirnaquash2
 
CNIT 125 Ch 4. Security Engineering (Part 2)
CNIT 125 Ch 4. Security Engineering (Part 2)CNIT 125 Ch 4. Security Engineering (Part 2)
CNIT 125 Ch 4. Security Engineering (Part 2)
Sam Bowne
 
RSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key CryptographyRSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key Cryptography
Md. Shafiul Alam Sagor
 
Symmetric encryption
Symmetric encryptionSymmetric encryption
Symmetric encryption
DR RICHMOND ADEBIAYE
 
Applied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphersApplied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphers
Vlad Garbuz
 
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz «Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
0xdec0de
 

Similar to 12 Elliptic Curves (20)

CNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic CurvesCNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic Curves
 
CNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic CurvesCNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic Curves
 
CNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic CurvesCNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic Curves
 
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
Discrete Logarithmic Problem- Basis of Elliptic Curve CryptosystemsDiscrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
Discrete Logarithmic Problem- Basis of Elliptic Curve Cryptosystems
 
Class3
Class3Class3
Class3
 
ellipticcurvecryptography.pptx
ellipticcurvecryptography.pptxellipticcurvecryptography.pptx
ellipticcurvecryptography.pptx
 
Cryptography-101
Cryptography-101Cryptography-101
Cryptography-101
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
 
Rsa
RsaRsa
Rsa
 
Chapter 8 cryptography lanjutan
Chapter 8 cryptography lanjutanChapter 8 cryptography lanjutan
Chapter 8 cryptography lanjutan
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated Encryption
 
Emily Stamm - Post-Quantum Cryptography
Emily Stamm - Post-Quantum CryptographyEmily Stamm - Post-Quantum Cryptography
Emily Stamm - Post-Quantum Cryptography
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
 
ch10_Key_Management.ppt ch10_Key_Management.ppt ch10_Key_Management.ppt
ch10_Key_Management.ppt ch10_Key_Management.ppt ch10_Key_Management.pptch10_Key_Management.ppt ch10_Key_Management.ppt ch10_Key_Management.ppt
ch10_Key_Management.ppt ch10_Key_Management.ppt ch10_Key_Management.ppt
 
RSA
RSARSA
RSA
 
CNIT 125 Ch 4. Security Engineering (Part 2)
CNIT 125 Ch 4. Security Engineering (Part 2)CNIT 125 Ch 4. Security Engineering (Part 2)
CNIT 125 Ch 4. Security Engineering (Part 2)
 
RSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key CryptographyRSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key Cryptography
 
Symmetric encryption
Symmetric encryptionSymmetric encryption
Symmetric encryption
 
Applied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphersApplied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphers
 
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz «Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
 

More from Sam Bowne

Cyberwar
CyberwarCyberwar
Cyberwar
Sam Bowne
 
3: DNS vulnerabilities
3: DNS vulnerabilities 3: DNS vulnerabilities
3: DNS vulnerabilities
Sam Bowne
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
Sam Bowne
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
Sam Bowne
 
3. Attacking iOS Applications (Part 2)
 3. Attacking iOS Applications (Part 2) 3. Attacking iOS Applications (Part 2)
3. Attacking iOS Applications (Part 2)
Sam Bowne
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-Hellman
Sam Bowne
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1
Sam Bowne
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
Sam Bowne
 
12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)
Sam Bowne
 
10 RSA
10 RSA10 RSA
10 RSA
Sam Bowne
 
12 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 312 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 3
Sam Bowne
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard Problems
Sam Bowne
 
8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)
Sam Bowne
 
11 Analysis Methodology
11 Analysis Methodology11 Analysis Methodology
11 Analysis Methodology
Sam Bowne
 
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)
Sam Bowne
 
7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)
Sam Bowne
 
5. Stream Ciphers
5. Stream Ciphers5. Stream Ciphers
5. Stream Ciphers
Sam Bowne
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection
Sam Bowne
 
4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers
Sam Bowne
 
6 Analyzing Android Applications (Part 2)
6 Analyzing Android Applications (Part 2)6 Analyzing Android Applications (Part 2)
6 Analyzing Android Applications (Part 2)
Sam Bowne
 

More from Sam Bowne (20)

Cyberwar
CyberwarCyberwar
Cyberwar
 
3: DNS vulnerabilities
3: DNS vulnerabilities 3: DNS vulnerabilities
3: DNS vulnerabilities
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
 
3. Attacking iOS Applications (Part 2)
 3. Attacking iOS Applications (Part 2) 3. Attacking iOS Applications (Part 2)
3. Attacking iOS Applications (Part 2)
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-Hellman
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
 
12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)
 
10 RSA
10 RSA10 RSA
10 RSA
 
12 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 312 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 3
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard Problems
 
8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)
 
11 Analysis Methodology
11 Analysis Methodology11 Analysis Methodology
11 Analysis Methodology
 
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)
 
7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)
 
5. Stream Ciphers
5. Stream Ciphers5. Stream Ciphers
5. Stream Ciphers
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection
 
4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers
 
6 Analyzing Android Applications (Part 2)
6 Analyzing Android Applications (Part 2)6 Analyzing Android Applications (Part 2)
6 Analyzing Android Applications (Part 2)
 

Recently uploaded

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 

Recently uploaded (20)

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 

12 Elliptic Curves

  • 1. CNIT 141 Cryptography for Computer Networks 12. Elliptic Curves Updated 11-30-22
  • 2. Topics • What is an Elliptic Curve? • The ECDLP Problem • Diffie-Hellman Key Agreement over Elliptic Curves • Choosing a Curve • How Things Can Go Wrong
  • 3. New & Improved • ECC was introduced in 1985 • More powerful and efficient than RSA and classical Diffie-Hellman • ECC with as 256-bit key is stronger than RSA with a 4096-bit key
  • 4. Slow Adoption • OpenSSL added ECC in 2005 • OpenSSH added it in 2011 • Used in Bitcoin • Most applications based on DLP can use ECC instead • Except Secure Remote Password • Link Ch 12a
  • 5. What is an Elliptic Curve?
  • 6. Elliptic Curve over Real Numbers y2 = x3 + ax + b
  • 7. Elliptic Curves over Integers • Mod 191 • From group Z191 = 0, 1, 2, ... 190
  • 8. The Field Zp • We'll use both addition and multiplication • We need 0 as the additive identity element • x + 0 = x • There are inverses for addition (-x) • And for multiplication (denoted 1/x) • Such a group is called a field • A finite number of elements: finite field
  • 9. Adding Points • P + Q: Draw line connecting P and Q • Find the point where it intersects with the elliptic curve • Reflect around X-axis
  • 10.
  • 11. P + (-P) P =(xP, yP) -P =(xP, -yP) • Adding these points makes a vertical line • Goes to the "point at infinity" • Which acts as zero for elliptic curves
  • 12.
  • 13. P + P • Use tangent line
  • 14. Multiplication • kP = P + P + P + ... (k times) • To calculate it faster, calculate: • P2 = P + P • P4 = P2 + P2 • P8 = P4 + P4 • etc.
  • 15. What is a Group? • A set of elements (denoted x, y, z below) • An operation (denoted ✕ below) • With these properties • Closure • If x and y are in the group, x ✕ y is too • Associativity (x ✕ y) ✕ z = x ✕ (y ✕ z) • Identity element e such that e ✕ x = x • Inverse For every x, there is a y with x ✕ y = e
  • 16. Elliptic Curve Groups • Points P, Q, R and "addition" form a group • Closure • If P and Q are in the group, P + Q is too • Associativity (P + Q) + R = P + (Q + R) • Identity element O is the point at infinity • Such that P + O = P • Inverse • For every P = (x, y) , -P = (x, -y) • P + (-P) = O
  • 18. ECDLP • All elliptic curve cryptography is based in this problem Given P and Q Find k such that Q = kP • Believed to be hard, like Discrete Logratim Problem • Has withstood cryptanalysis since its introduction in 1985
  • 19. Smaller Numbers • Using the field Zp • Where p is n bits long • The security is n / 2 bits • A p 256 bits long provides 128 bits of security • That would take more than 4096 bits with RSA • ECC is much faster
  • 21. RSA-Based Diffie-Hellman (DH) • They can both calculate gab by combining public and secret information Keep a secret Transmit ga Calculate gab = Ba Keep b secret Transmit gb Calculate gab = Ab
  • 22. ECDH • Choose a fixed point G (not secret) • Shared secret is dAPB = dBPA = dAdBG Pick a random secret dA Transmit PA = dAG Calculate dAdBG = dAPB Pick a random secret dB Transmit PB = dBG Calculate dAdBG = dBPA
  • 23. Signing with Elliptic Curves • ECDSA (Elliptic Curve Digital Signature Algorithm) • Replaces RSA and classical DSA • The only signature used in Bitcoin • Supported by many TLS and SSH implementations • Consists of signature generation and verification algorithms
  • 24. • Signer holds a private key d • Verifiers hold the public key P = dG • Both know: • What elliptic curve to use • Its order n (the number of points in the curve) • Coordinates of a base point G Signing with Elliptic Curves
  • 25. ECDSA Signature Generation • Signer hashes the message to form h • With a function such as SHA-256 or BLAKE2 • Signer picks a random number k • Calculates kG, with coordinates (x, y) • Signature is (r, s): r = x mod n s = (h + rd) / k mod n
  • 26. Signature Length • If coordinates are 256-bit numbers • r and s are both 256 bits long • Signature is 512 bits long
  • 27. ECDSA vs. RSA Signatures • RSA is used only for encryption and signatures • ECC is a family of algorithms • Encryption and signatures • Key agreement • Advanced functions such as identity-based encryption
  • 28. • RSA's signature and verification algorithms are simpler than ECDSA • RSA's verification process is often faster because of the small public key e • ECC has two major advantages • Shorter signatures • Faster signing speed ECDSA vs. RSA Signatures
  • 29. Speed Comparison • ECDSA is 150x faster at signing than RSA • Slightly faster at verifying
  • 30. Encrypting with Elliptic Curves • Rarely used • Message size can't exceed about 100 bits • RSA can use 4000 bits at same security level
  • 31. Integrated Encryption Scheme (IES) • Generate a Diffie-Hellman shared secret • Derive a symmetric key from the shared secret • Use symmetric encryption
  • 34. Parameters • Order (number of points), also called modulus • a and b in y2 = x3 + ax + b • Origin of the chosen a and b
  • 35. Criteria for Security • Order (number of points) must not be product of small numbers • Curves that treat P+Q and P+P the same way are safer, to avoid information leaks • Unified addition law • Creators of curve should explain how a and b were chosen, or people will be suspicious
  • 36. NIST Curves • Standardized in 2000 • Five prime curves (modulus is prime) • The most commonly used ones • Ten others use "binary polynomials" • Make hardware implementation more efficient • Rarely used with elliptic curves
  • 37. P-256 • The most common NIST curve • Modulus is p • b is a 256-bit number
  • 38. Where Did b Come From? • NSA never explained it well • Most experts don't believe there's a backdoor • b is the SHA-1 hash of this random-looking value
  • 40. Curve 25519 • Published by Daniel J. Bernstein in 2006 • Faster than NIST standard curves • Uses shorter keys • No suspicious constants • Uses same formula for P+Q and P+P
  • 41. p = 2255 - 19 • Used everywhere • Chrome, Apple, OpenSSH • But not a NIST standard Curve 25519
  • 42. y2 = x3 + 7 p = 2256 - 232 - 977 • Used in Bitcoin https://en.bitcoin.it/wiki/Secp256k1 Curve secp256k1
  • 43. Other Curves • Old national standards • France: ANSSI curves • Germany: Brainpool curves • Use constants of unknown origin
  • 44. Other Curves • Newer curves, rarely used • Curve41417 • More secure variant of Curve25519 • Ed448-Goldilocks • 448-bit curve from 2014
  • 45. How Things Can Go Wrong
  • 46. Large Attack Surface • Elliptic curves have • More parameters than classic Diffie-Hellman • More opportunities for mistakes • Possible vulnerabilities to side-channel attacks • Timing of calculations on large numbers
  • 47. ECDSA with Bad Randomness • Signing uses a secret random k s = (h + rd) / k mod n • If k is re-used, attacker can calculate k k = (h1 - h2) / (s1 - s2) • This happened on the PlayStation 3 in 2010 • Presented at CCC by failOverflow team
  • 48. Invalid Curve Attack • Attacker sends PA that is not on the same curve • From a weak curve instead • Target fails to verify that PA is on the curve, and uses a secret dBPA on a weak curve, so ECDLP can be solved Doesn't know dA Transmit malicious P Calculates secret dB Pick a random secret dB Transmit PB = dBG Calculate dBP
  • 49. Invalid Curve Attack • Malicious client could trick server into using the wrong curve • Exposing the server's secret key • Some TLS implementations were shown to be vulnerable in 2015 • https://threatpost.com/json-libraries-patched-against-invalid- curve-crypto-attack/124336/