SlideShare a Scribd company logo
Enforcing Web security and privacy
with zero-knowledge protocols
Ignat Korchagin
Why?
• You provide your personally identifiable information (PII)
most of the time
Why?
• You provide your personally identifiable information (PII)
most of the time
• Service provider promises to take all “relevant measures”
to store such information “securely”
Why?
• You provide your personally identifiable information (PII)
most of the time
• Service provider promises to take all “relevant measures”
to store such information “securely”
• Service provider aims to make your experience secure
Reality
• Databases leak
• UK medical records
• Turkish citizenship database
Reality
• Databases leak
• UK medical records
• Turkish citizenship database
• PII leaks
• no clear definition of “relevant measures” and “securely”
• mostly organizational measures, no encryption
Reality
• Databases leak
• UK medical records
• Turkish citizenship database
• PII leaks
• no clear definition of “relevant measures” and “securely”
• mostly organizational measures, no encryption
• Service provider (or their partner) takes advantage of PII
• credit reference agencies
Reality
• Databases leak
• UK medical records
• Turkish citizenship database
• PII leaks
• no clear definition of “relevant measures” and “securely”
• mostly organizational measures, no encryption
• Service provider (or their partner) takes advantage of PII
• credit reference agencies
• User passwords get stolen
• using obsolete crypto
• fake login prompts
• no SSL/TLS
ZKP more formally
• Zero-knowledge proof is a method by which one party (the prover) can
prove to another party (the verifier) that a given statement is true, without
conveying any information apart from the fact that the statement is indeed
true.
• Properties:
• Completeness: if the statement is true, the honest verifier (that is, one following the
protocol properly) will be convinced of this fact by an honest prover
• Soundness: if the statement is false, no cheating prover can convince the honest
verifier that it is true, except with some small probability
• Zero-knowledge: if the statement is true, no cheating verifier (or others) learns anything
other than this fact. This is formalized by showing that every cheating verifier has some
simulator that, given only the statement to be proved (and no access to the prover), can
produce a transcript that "looks like" an interaction between the honest prover and the
cheating verifier
A cave with a magic door
A cave with a magic door
1
Peggy randomly
enters A or B
A cave with a magic door
1 2
Peggy randomly
enters A or B
Victor randomly
shouts A or B
A cave with a magic door
1 2
3
Peggy randomly
enters A or B
Victor randomly
shouts A or B
Peggy reliably
appears on
requested side
50% cheat probability. Really?
• One round of protocol has 0.5 cheat probability
• if Peggy chooses to enter the same side which Victor will shout later, she can
convince Victor even without knowing the magic word
50% cheat probability. Really?
• One round of protocol has 0.5 cheat probability
• if Peggy chooses to enter the same side which Victor will shout later, she can
convince Victor even without knowing the magic word
• To address above we just need to repeat the protocol N
times
• each round outcome is independent
• cheat probability: P = 0.5 * 0.5 * 0.5 * … * 0.5 = (0.5)N = 2-N
50% cheat probability. Really?
• One round of protocol has 0.5 cheat probability
• if Peggy chooses to enter the same side which Victor will shout later, she can
convince Victor even without knowing the magic word
• To address above we just need to repeat the protocol N
times
• each round outcome is independent
• cheat probability: P = 0.5 * 0.5 * 0.5 * … * 0.5 = (0.5)N = 2-N
• If we repeat the protocol ~128 times, we can make it as
secure as AES
Socialist millionaires
• Socialist millionaire problem is a way for two
millionaires to check whether their wealth is equal
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*GG2a, G3a, G2b, G3b
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*G
G2 = a2*G2b
G3 = a3*G3b
Pa = s*G3
Qa = s*G + x*G2
G2 = b2*G2a
G3 = b3*G3a
Pb = r*G3
Qb = r*G + y*G2
G2a, G3a, G2b, G3b
Pa, Qa, Pb, Qb
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*G
G2 = a2*G2b
G3 = a3*G3b
Pa = s*G3
Qa = s*G + x*G2
G2 = b2*G2a
G3 = b3*G3a
Pb = r*G3
Qb = r*G + y*G2
Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb)
G2a, G3a, G2b, G3b
Pa, Qa, Pb, Qb
Ra, Rb
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*G
G2 = a2*G2b
G3 = a3*G3b
Pa = s*G3
Qa = s*G + x*G2
G2 = b2*G2a
G3 = b3*G3a
Pb = r*G3
Qb = r*G + y*G2
Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb)
a3*Rb == Pa-Pb b3*Ra == Pa-Pb
G2a, G3a, G2b, G3b
Pa, Qa, Pb, Qb
Ra, Rb
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*G
G2 = a2*G2b
G3 = a3*G3b
Pa = s*G3
Qa = s*G + x*G2
G2 = b2*G2a
G3 = b3*G3a
Pb = r*G3
Qb = r*G + y*G2
Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb)
a3*Rb == Pa-Pb b3*Ra == Pa-Pb
G2a, G3a, G2b, G3b
Pa, Qa, Pb, Qb
Ra, Rb
a3 * Rb = b3 * Ra = (Pa - Pb) + (a3 * b3 * (x - y)) *
G2
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*G
G2 = a2*G2b
G3 = a3*G3b
Pa = s*G3
Qa = s*G + x*G2
G2 = b2*G2a
G3 = b3*G3a
Pb = r*G3
Qb = r*G + y*G2
Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb)
a3*Rb == Pa-Pb b3*Ra == Pa-Pb
G2a, G3a, G2b, G3b
Pa, Qa, Pb, Qb
Ra, Rb
a3 * Rb = b3 * Ra = (Pa - Pb) + (a3 * b3 * (x - y)) *
G2
Socialist millionaires
• Socialist millionaire problem is a way for two
millionaires to check whether their wealth is equal
• can be used to verify whether two parties posses the same secret
• a passive attacker learns nothing about the protocol and its outcome
• MiTM can do no better than passive attacker except disrupting the
communication channel
• even if one of the parties is dishonest, he learns nothing more that the
protocol outcome
• unlike most other zero-knowledge proofs requires O(1) protocol iterations
• is adopted and has good history
OTR SMP
• Uses 1536-bit group calculations
OTR SMP
• Uses 1536-bit group calculations
• BUT: LogJam!
OTR SMP
• Uses 1536-bit group calculations
• BUT: LogJam!
• 512-bit broken
• 1024-bit probably
• 1536-bit is very close!
Themis SMP vs OTR SMP
• Improving SMP
• moved all cryptographic operations in ECC domain
• modern (boring) cryptography (ed25519)
• timing attacks protection
• fast and performant
• reduced memory footprint
• support for many high-level languages
• simple API
• GitHub: https://github.com/cossacklabs/themis
Possible use-cases
Possible use-cases
Possible use-cases
• Credit reference agency knows your PII, even if you were not on file before
PII PII
Possible use-cases
Possible use-cases
Possible use-cases
Hash(UniqueID) = AnotherUniqueID
Possible use-cases
• Credit reference agency knows your are at least client of both banks even if
you were not on file before (able to trace you later)
Hash(UniqueID) = AnotherUniqueID
Possible use-cases
• Credit reference agency does not get anything if your were not on their file
previously
Hash(UniqueID) = AnotherUniqueID
SMP vs PAKE
• PAKE - password-authenticated key agreement
SMP vs PAKE
• PAKE - password-authenticated key agreement
• basic PAKE requires only 1 roundtrip
• simple, requires small number of asymmetric cryptographic operations
• easy to implement
• provides a negotiated secret key as a protocol outcome
SMP vs PAKE
• PAKE - password-authenticated key agreement
• basic PAKE requires only 1 roundtrip
• simple, requires small number of asymmetric cryptographic operations
• easy to implement
• provides a negotiated secret key as a protocol outcome
• Example: SPAKE2 (https://tools.ietf.org/html/draft-irtf-
cfrg-spake2-03)
SPAKE2
• EC curve: G - base point, n - order of G, M,N - known fixed points on the curve
• Alice and Bob know w.
Generate x
X = x*G
T = w*M + X
Generate y
Y = y*G
S = w*N + Y
K = x*(S - w*N) K = y*(T - w*M)
T, S
Myth 1: PAKE is MUCH faster
• PAKE is better because it is simpler
• requires much less computations
• only 1-RTT compared to 3-RTT SMP
SPAKE2
• EC curve: G - base point, n - order of G, M,N - known fixed points on the curve
• Alice and Bob know w.
Generate x
X = x*G
T = w*M + X
Generate y
Y = y*G
S = w*N + Y
K = x*(S - w*N) K = y*(T - w*M)
T, S
SPAKE2
• EC curve: G - base point, n - order of G, M,N - known fixed points on the curve
• Alice and Bob know w.
Generate x
X = x*G
T = w*M + X
Generate y
Y = y*G
S = w*N + Y
K = x*(S - w*N) K = y*(T - w*M)
T, S
Key confirmation?
Myth 1: PAKE is MUCH faster
• SPAKE2 requires additional roundtrip for authentication
scenario
Myth 1: PAKE is MUCH faster
• SPAKE2 requires additional roundtrip for authentication
scenario
• Pure C: SMP is only ~20 times slower
• small price for zero-knowledge guarantee
Myth 1: PAKE is MUCH faster
• SPAKE2 requires additional roundtrip for authentication
scenario
• Pure C: SMP is only ~20 times slower
• small price for zero-knowledge guarantee
• High-level languages: SMP is only ~3 times slower
• more probable real-world use-case
• more time is spent on network communication and language runtime
Myth 2: SMP doesn’t negotiate a key
• PAKE is better because it negotiates a key out-of-the box
and SMP does not
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*G
G2 = a2*G2b
G3 = a3*G3b
Pa = s*G3
Qa = s*G + x*G2
G2 = b2*G2a
G3 = b3*G3a
Pb = r*G3
Qb = r*G + y*G2
Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb)
a3*Rb == Pa-Pb b3*Ra == Pa-Pb
G2a, G3a, G2b, G3b
Pa, Qa, Pb, Qb
Ra, Rb
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*G
G2 = a2*G2b
G3 = a3*G3b
Pa = s*G3
Qa = s*G + x*G2
G2 = b2*G2a
G3 = b3*G3a
Pb = r*G3
Qb = r*G + y*G2
Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb)
a3*Rb == Pa-Pb b3*Ra == Pa-Pb
G2a, G3a, G2b, G3b
Pa, Qa, Pb, Qb
Ra, Rb
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*G
G2 = a2*G2b
G3 = a3*G3b
Pa = s*G3
Qa = s*G + x*G2
G2 = b2*G2a
G3 = b3*G3a
Pb = r*G3
Qb = r*G + y*G2
Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb)
a3*Rb == Pa-Pb b3*Ra == Pa-Pb
G2a, G3a, G2b, G3b
Pa, Qa, Pb, Qb
Ra, Rb
SMP actually negotiates 2 keys!
Possible use-cases
• Automatic key rotation for long-lived encrypted connections
Possible use-cases
Encrypted communication (K1)
• Automatic key rotation for long-lived encrypted connections
Possible use-cases
SMP (or PAKE with confirm)
Encrypted communication (K1)
• Automatic key rotation for long-lived encrypted connections
Possible use-cases
SMP (or PAKE with confirm)
Encrypted communication (K1)
• Automatic key rotation for long-lived encrypted connections
save negotiated key
Possible use-cases
SMP (or PAKE with confirm)
Encrypted communication (K1)
Encrypted communication (K2)
• Automatic key rotation for long-lived encrypted connections
save negotiated key
Myth 3: using PAKE for authentication
• PAKE has many other reasons to be better for
authentication
Myth 3: using PAKE for authentication
• PAKE is a KEY AGREEMENT
Myth 3: using PAKE for authentication
• PAKE is a KEY AGREEMENT
• the goal of the protocol is to negotiate a shared secret, not authenticate a
peer
• PAKE protocol outcome does not provide the proof that your peer knows the
secret
SPAKE2
• EC curve: G - base point, n - order of G, M,N - known fixed points on the curve
• Alice and Bob know w.
Generate x
X = x*G
T = w*M + X
Generate y
Y = y*G
S = w*N + Y
K = x*(S - w*N) K = y*(T - w*M)
T, S
SPAKE2
• EC curve: G - base point, n - order of G, M,N - known fixed points on the curve
• Alice and Bob know w.
Generate x
X = x*G
T = w*M + X
Generate y
Y = y*G
S = w*N + Y
K = x*(S - w*N) K = y*(T - w*M)
T, S
SPAKE2
• EC curve: G - base point, n - order of G, M,N - known fixed points on the curve
• Alice and Bob know w.
Generate x
X = x*G
T = w*M + X
Generate y
Y = y*G
S = w*N + Y
K = x*(S - w*N) K = y*(T - w*M)
T, S
To successfully complete the protocol:
• the peer may not even know w (the real secret
information)
• but only w*M and w*N (its public derivatives)
SPAKE2
SPAKE2 by itself does not provide the basic proof of secret
knowledge
SPAKE2
SPAKE2 by itself does not provide the basic proof of secret
knowledge
• can be enforced on implementation level
• made as a constraint in the target system
• treat public counterparts as secret themselves
• etc
SPAKE2
SPAKE2 by itself does not provide the basic proof of secret
knowledge
• can be enforced on implementation level
• made as a constraint in the target system
• treat public counterparts as secret themselves
• etc
But anyway: it has to be considered somehow and protocol
users have to be aware of this
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*G
G2 = a2*G2b
G3 = a3*G3b
Pa = s*G3
Qa = s*G + x*G2
G2 = b2*G2a
G3 = b3*G3a
Pb = r*G3
Qb = r*G + y*G2
Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb)
a3*Rb == Pa-Pb b3*Ra == Pa-Pb
G2a, G3a, G2b, G3b
Pa, Qa, Pb, Qb
Ra, Rb
Socialist millionaires
• EC curve: G - base point, n - order of G
• Alice and Bob have x and y respectively. Both want to know whether x==y.
Generate a2, a3,
s
G2a = a2*G
G3a = a3*G
Generate b2, b3,
r
G2b = b2*G
G3b = b3*G
G2 = a2*G2b
G3 = a3*G3b
Pa = s*G3
Qa = s*G + x*G2
G2 = b2*G2a
G3 = b3*G3a
Pb = r*G3
Qb = r*G + y*G2
Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb)
a3*Rb == Pa-Pb b3*Ra == Pa-Pb
G2a, G3a, G2b, G3b
Pa, Qa, Pb, Qb
Ra, Rb
Secrets are combined with random shared values
with contributions from both peers
Conclusions
Conclusions
• Zero-knowledge protocols are useful building blocks for
enhanced security and privacy preserving protocols
• They can be useful in a scenario where one of the protocol participants may
be malicious
Conclusions
• Zero-knowledge protocols are useful building blocks for
enhanced security and privacy preserving protocols
• They can be useful in a scenario where one of the protocol participants may
be malicious
• You may use PAKE for many real world tasks, but you
have to be aware of the caveats
Conclusions
• Zero-knowledge protocols are useful building blocks for
enhanced security and privacy preserving protocols
• They can be useful in a scenario where one of the protocol participants may
be malicious
• You may use PAKE for many real world tasks, but you
have to be aware of the caveats
• Socialist millionaire protocol provides more security
guarantees, although with some performance penalty
References
• Paper: https://www.cossacklabs.com/files/secure-
comparator-paper-rev12.pdf
• Code: https://github.com/cossacklabs/themis
Thank you!
Questions?

More Related Content

What's hot

Implementation of quantum gates using verilog
Implementation of quantum gates using verilogImplementation of quantum gates using verilog
Implementation of quantum gates using verilog
Shashank Kumar
 
Logic gate
Logic gateLogic gate
Logic gate
Nazim Naeem
 
Uart
UartUart
Uart
sean chen
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
raju reddy
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
Jamnas Mundakkutty A
 
How to configure port security in cisco switch
How to configure port security in cisco switchHow to configure port security in cisco switch
How to configure port security in cisco switch
IT Tech
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
kavitha muneeshwaran
 
Taller de intervlan
Taller de intervlanTaller de intervlan
Taller de intervlan
Alumic S.A
 
The I2C Interface
The I2C InterfaceThe I2C Interface
The I2C Interface
Corrado Santoro
 
VLSI Design Final Project - 32 bit ALU
VLSI Design Final Project - 32 bit ALUVLSI Design Final Project - 32 bit ALU
VLSI Design Final Project - 32 bit ALU
Sachin Kumar Asokan
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with Examples
E2MATRIX
 
Basics of digital verilog design(alok singh kanpur)
Basics of digital verilog design(alok singh kanpur)Basics of digital verilog design(alok singh kanpur)
Basics of digital verilog design(alok singh kanpur)
Alok Singh
 
Arduino presentation
Arduino presentationArduino presentation
Arduino presentation
Michael Senkow
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Richard Rixham
 
UVM: Basic Sequences
UVM: Basic SequencesUVM: Basic Sequences
UVM: Basic Sequences
Arrow Devices
 
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 TutorialSystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
Amiq Consulting
 
Chapter 17 : static routing
Chapter 17 : static routingChapter 17 : static routing
Chapter 17 : static routing
teknetir
 
Presentation On Logic Gate
Presentation On Logic Gate Presentation On Logic Gate
Presentation On Logic Gate
Nazrul Islam
 
Logic gates presentation
Logic gates presentationLogic gates presentation
Logic gates presentation
priyanka bisarya
 
4-bit camparator
4-bit camparator4-bit camparator
4-bit camparator
Bilal Amjad
 

What's hot (20)

Implementation of quantum gates using verilog
Implementation of quantum gates using verilogImplementation of quantum gates using verilog
Implementation of quantum gates using verilog
 
Logic gate
Logic gateLogic gate
Logic gate
 
Uart
UartUart
Uart
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
How to configure port security in cisco switch
How to configure port security in cisco switchHow to configure port security in cisco switch
How to configure port security in cisco switch
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
Taller de intervlan
Taller de intervlanTaller de intervlan
Taller de intervlan
 
The I2C Interface
The I2C InterfaceThe I2C Interface
The I2C Interface
 
VLSI Design Final Project - 32 bit ALU
VLSI Design Final Project - 32 bit ALUVLSI Design Final Project - 32 bit ALU
VLSI Design Final Project - 32 bit ALU
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with Examples
 
Basics of digital verilog design(alok singh kanpur)
Basics of digital verilog design(alok singh kanpur)Basics of digital verilog design(alok singh kanpur)
Basics of digital verilog design(alok singh kanpur)
 
Arduino presentation
Arduino presentationArduino presentation
Arduino presentation
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
UVM: Basic Sequences
UVM: Basic SequencesUVM: Basic Sequences
UVM: Basic Sequences
 
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 TutorialSystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
 
Chapter 17 : static routing
Chapter 17 : static routingChapter 17 : static routing
Chapter 17 : static routing
 
Presentation On Logic Gate
Presentation On Logic Gate Presentation On Logic Gate
Presentation On Logic Gate
 
Logic gates presentation
Logic gates presentationLogic gates presentation
Logic gates presentation
 
4-bit camparator
4-bit camparator4-bit camparator
4-bit camparator
 

Viewers also liked

Paper battery
Paper battery Paper battery
Paper battery
tahseen shaikh
 
Thunderbolt
ThunderboltThunderbolt
Thunderbolt
raghav aggarwal
 
thunderbolt interface
thunderbolt interfacethunderbolt interface
thunderbolt interface
Binumon Joseph
 
Skinput Technology
Skinput TechnologySkinput Technology
Skinput Technology
vivek sagar
 
Paper battery The Future of Batteries
Paper battery The Future of BatteriesPaper battery The Future of Batteries
Paper battery The Future of Batteries
Shri Savitribai Phule Polytechnic Pune
 
Thunderbolt Technology : The Transformational PC I/O
Thunderbolt Technology: The Transformational PC I/OThunderbolt Technology: The Transformational PC I/O
Thunderbolt Technology : The Transformational PC I/O
Tanbin Islam Siyam
 
Thunderbolt
ThunderboltThunderbolt
Thunderbolt
patrick g
 
Zero knowledge proofsii
Zero knowledge proofsiiZero knowledge proofsii
Zero knowledge proofsii
sreesaiprakash
 
Sky bus
Sky busSky bus
Sky bus
Sathya Roli
 
Peer-to-Peer Systems
Peer-to-Peer SystemsPeer-to-Peer Systems
Peer-to-Peer Systems
Uwe Schmidt
 
Skinput technology
Skinput technologySkinput technology
Skinput technology
Fenil Wakawala
 
Paper battery
Paper batteryPaper battery
Paper battery
adhipsebingeorge
 
Skinput technology
Skinput technologySkinput technology
Skinput technology
neha pevekar
 
Circuit breaker
Circuit breakerCircuit breaker
Circuit breaker
Biswajit Pratihari
 

Viewers also liked (14)

Paper battery
Paper battery Paper battery
Paper battery
 
Thunderbolt
ThunderboltThunderbolt
Thunderbolt
 
thunderbolt interface
thunderbolt interfacethunderbolt interface
thunderbolt interface
 
Skinput Technology
Skinput TechnologySkinput Technology
Skinput Technology
 
Paper battery The Future of Batteries
Paper battery The Future of BatteriesPaper battery The Future of Batteries
Paper battery The Future of Batteries
 
Thunderbolt Technology : The Transformational PC I/O
Thunderbolt Technology: The Transformational PC I/OThunderbolt Technology: The Transformational PC I/O
Thunderbolt Technology : The Transformational PC I/O
 
Thunderbolt
ThunderboltThunderbolt
Thunderbolt
 
Zero knowledge proofsii
Zero knowledge proofsiiZero knowledge proofsii
Zero knowledge proofsii
 
Sky bus
Sky busSky bus
Sky bus
 
Peer-to-Peer Systems
Peer-to-Peer SystemsPeer-to-Peer Systems
Peer-to-Peer Systems
 
Skinput technology
Skinput technologySkinput technology
Skinput technology
 
Paper battery
Paper batteryPaper battery
Paper battery
 
Skinput technology
Skinput technologySkinput technology
Skinput technology
 
Circuit breaker
Circuit breakerCircuit breaker
Circuit breaker
 

Similar to Enforcing Web security and privacy with zero-knowledge protocols

Overview and evolution of password-based authentication schemes
Overview and evolution of password-based authentication schemesOverview and evolution of password-based authentication schemes
Overview and evolution of password-based authentication schemes
Ignat Korchagin
 
Demystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptxDemystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptx
RedWhite12
 
COMBINATIONAL CIRCUITS
COMBINATIONAL CIRCUITSCOMBINATIONAL CIRCUITS
COMBINATIONAL CIRCUITS
GopinathD17
 
2 Combinational Logic Circuit 01
2 Combinational Logic Circuit 012 Combinational Logic Circuit 01
2 Combinational Logic Circuit 01
guestde204e
 
Ethereum 101
Ethereum 101Ethereum 101
Ethereum 101
Chang-Wu Chen
 
Class3
Class3Class3
Data Mining Lecture_4.pptx
Data Mining Lecture_4.pptxData Mining Lecture_4.pptx
Data Mining Lecture_4.pptx
Subrata Kumer Paul
 
[ETHCon Korea 2019] Bae kyungil 배경일
[ETHCon Korea 2019] Bae kyungil 배경일[ETHCon Korea 2019] Bae kyungil 배경일
[ETHCon Korea 2019] Bae kyungil 배경일
ethconkr
 
Ibe weil pairing
Ibe weil pairingIbe weil pairing
Ibe weil pairing
sravanbabu
 
Thwarting The Surveillance in Online Communication by Adhokshaj Mishra
Thwarting The Surveillance in Online Communication by Adhokshaj MishraThwarting The Surveillance in Online Communication by Adhokshaj Mishra
Thwarting The Surveillance in Online Communication by Adhokshaj Mishra
OWASP Delhi
 
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
 
Elliptic Curve Cryptography for those who are afraid of maths
Elliptic Curve Cryptography for those who are afraid of mathsElliptic Curve Cryptography for those who are afraid of maths
Elliptic Curve Cryptography for those who are afraid of maths
Martijn Grooten
 
Digital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdfDigital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdf
022BELEHemant
 
Blockchain Technology - Week 6 - Role of Cryptography in Blockchain
Blockchain Technology - Week 6 - Role of Cryptography in BlockchainBlockchain Technology - Week 6 - Role of Cryptography in Blockchain
Blockchain Technology - Week 6 - Role of Cryptography in Blockchain
Ferdin Joe John Joseph PhD
 
Lecture 3 - Decision Making
Lecture 3 - Decision MakingLecture 3 - Decision Making
Lecture 3 - Decision Making
Luke Dicken
 
Cs166 mynote
Cs166 mynoteCs166 mynote
Cs166 mynote
Kaya Ota
 
Introduction to Cryptography & PGP
Introduction to Cryptography & PGPIntroduction to Cryptography & PGP
Introduction to Cryptography & PGP
Rayed Alrashed
 
Encrypting with entanglement matthias christandl
Encrypting with entanglement matthias christandlEncrypting with entanglement matthias christandl
Encrypting with entanglement matthias christandl
wtyru1989
 
apidays LIVE Australia 2020 - WT* is JWT? by Maciej Treder
apidays LIVE Australia 2020 -  WT* is JWT? by Maciej Trederapidays LIVE Australia 2020 -  WT* is JWT? by Maciej Treder
apidays LIVE Australia 2020 - WT* is JWT? by Maciej Treder
apidays
 
apidays LIVE Paris - WT* is JWT? by Maciej Treder
apidays LIVE Paris - WT* is JWT? by Maciej Trederapidays LIVE Paris - WT* is JWT? by Maciej Treder
apidays LIVE Paris - WT* is JWT? by Maciej Treder
apidays
 

Similar to Enforcing Web security and privacy with zero-knowledge protocols (20)

Overview and evolution of password-based authentication schemes
Overview and evolution of password-based authentication schemesOverview and evolution of password-based authentication schemes
Overview and evolution of password-based authentication schemes
 
Demystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptxDemystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptx
 
COMBINATIONAL CIRCUITS
COMBINATIONAL CIRCUITSCOMBINATIONAL CIRCUITS
COMBINATIONAL CIRCUITS
 
2 Combinational Logic Circuit 01
2 Combinational Logic Circuit 012 Combinational Logic Circuit 01
2 Combinational Logic Circuit 01
 
Ethereum 101
Ethereum 101Ethereum 101
Ethereum 101
 
Class3
Class3Class3
Class3
 
Data Mining Lecture_4.pptx
Data Mining Lecture_4.pptxData Mining Lecture_4.pptx
Data Mining Lecture_4.pptx
 
[ETHCon Korea 2019] Bae kyungil 배경일
[ETHCon Korea 2019] Bae kyungil 배경일[ETHCon Korea 2019] Bae kyungil 배경일
[ETHCon Korea 2019] Bae kyungil 배경일
 
Ibe weil pairing
Ibe weil pairingIbe weil pairing
Ibe weil pairing
 
Thwarting The Surveillance in Online Communication by Adhokshaj Mishra
Thwarting The Surveillance in Online Communication by Adhokshaj MishraThwarting The Surveillance in Online Communication by Adhokshaj Mishra
Thwarting The Surveillance in Online Communication by Adhokshaj Mishra
 
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...
 
Elliptic Curve Cryptography for those who are afraid of maths
Elliptic Curve Cryptography for those who are afraid of mathsElliptic Curve Cryptography for those who are afraid of maths
Elliptic Curve Cryptography for those who are afraid of maths
 
Digital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdfDigital electronics logic design complete notes.pdf
Digital electronics logic design complete notes.pdf
 
Blockchain Technology - Week 6 - Role of Cryptography in Blockchain
Blockchain Technology - Week 6 - Role of Cryptography in BlockchainBlockchain Technology - Week 6 - Role of Cryptography in Blockchain
Blockchain Technology - Week 6 - Role of Cryptography in Blockchain
 
Lecture 3 - Decision Making
Lecture 3 - Decision MakingLecture 3 - Decision Making
Lecture 3 - Decision Making
 
Cs166 mynote
Cs166 mynoteCs166 mynote
Cs166 mynote
 
Introduction to Cryptography & PGP
Introduction to Cryptography & PGPIntroduction to Cryptography & PGP
Introduction to Cryptography & PGP
 
Encrypting with entanglement matthias christandl
Encrypting with entanglement matthias christandlEncrypting with entanglement matthias christandl
Encrypting with entanglement matthias christandl
 
apidays LIVE Australia 2020 - WT* is JWT? by Maciej Treder
apidays LIVE Australia 2020 -  WT* is JWT? by Maciej Trederapidays LIVE Australia 2020 -  WT* is JWT? by Maciej Treder
apidays LIVE Australia 2020 - WT* is JWT? by Maciej Treder
 
apidays LIVE Paris - WT* is JWT? by Maciej Treder
apidays LIVE Paris - WT* is JWT? by Maciej Trederapidays LIVE Paris - WT* is JWT? by Maciej Treder
apidays LIVE Paris - WT* is JWT? by Maciej Treder
 

Recently uploaded

快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
k4ncd0z
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 

Recently uploaded (12)

快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 

Enforcing Web security and privacy with zero-knowledge protocols

  • 1. Enforcing Web security and privacy with zero-knowledge protocols Ignat Korchagin
  • 2. Why? • You provide your personally identifiable information (PII) most of the time
  • 3. Why? • You provide your personally identifiable information (PII) most of the time • Service provider promises to take all “relevant measures” to store such information “securely”
  • 4. Why? • You provide your personally identifiable information (PII) most of the time • Service provider promises to take all “relevant measures” to store such information “securely” • Service provider aims to make your experience secure
  • 5. Reality • Databases leak • UK medical records • Turkish citizenship database
  • 6. Reality • Databases leak • UK medical records • Turkish citizenship database • PII leaks • no clear definition of “relevant measures” and “securely” • mostly organizational measures, no encryption
  • 7. Reality • Databases leak • UK medical records • Turkish citizenship database • PII leaks • no clear definition of “relevant measures” and “securely” • mostly organizational measures, no encryption • Service provider (or their partner) takes advantage of PII • credit reference agencies
  • 8. Reality • Databases leak • UK medical records • Turkish citizenship database • PII leaks • no clear definition of “relevant measures” and “securely” • mostly organizational measures, no encryption • Service provider (or their partner) takes advantage of PII • credit reference agencies • User passwords get stolen • using obsolete crypto • fake login prompts • no SSL/TLS
  • 9. ZKP more formally • Zero-knowledge proof is a method by which one party (the prover) can prove to another party (the verifier) that a given statement is true, without conveying any information apart from the fact that the statement is indeed true. • Properties: • Completeness: if the statement is true, the honest verifier (that is, one following the protocol properly) will be convinced of this fact by an honest prover • Soundness: if the statement is false, no cheating prover can convince the honest verifier that it is true, except with some small probability • Zero-knowledge: if the statement is true, no cheating verifier (or others) learns anything other than this fact. This is formalized by showing that every cheating verifier has some simulator that, given only the statement to be proved (and no access to the prover), can produce a transcript that "looks like" an interaction between the honest prover and the cheating verifier
  • 10. A cave with a magic door
  • 11. A cave with a magic door 1 Peggy randomly enters A or B
  • 12. A cave with a magic door 1 2 Peggy randomly enters A or B Victor randomly shouts A or B
  • 13. A cave with a magic door 1 2 3 Peggy randomly enters A or B Victor randomly shouts A or B Peggy reliably appears on requested side
  • 14. 50% cheat probability. Really? • One round of protocol has 0.5 cheat probability • if Peggy chooses to enter the same side which Victor will shout later, she can convince Victor even without knowing the magic word
  • 15. 50% cheat probability. Really? • One round of protocol has 0.5 cheat probability • if Peggy chooses to enter the same side which Victor will shout later, she can convince Victor even without knowing the magic word • To address above we just need to repeat the protocol N times • each round outcome is independent • cheat probability: P = 0.5 * 0.5 * 0.5 * … * 0.5 = (0.5)N = 2-N
  • 16. 50% cheat probability. Really? • One round of protocol has 0.5 cheat probability • if Peggy chooses to enter the same side which Victor will shout later, she can convince Victor even without knowing the magic word • To address above we just need to repeat the protocol N times • each round outcome is independent • cheat probability: P = 0.5 * 0.5 * 0.5 * … * 0.5 = (0.5)N = 2-N • If we repeat the protocol ~128 times, we can make it as secure as AES
  • 17. Socialist millionaires • Socialist millionaire problem is a way for two millionaires to check whether their wealth is equal
  • 18. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y.
  • 19. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*GG2a, G3a, G2b, G3b
  • 20. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*G G2 = a2*G2b G3 = a3*G3b Pa = s*G3 Qa = s*G + x*G2 G2 = b2*G2a G3 = b3*G3a Pb = r*G3 Qb = r*G + y*G2 G2a, G3a, G2b, G3b Pa, Qa, Pb, Qb
  • 21. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*G G2 = a2*G2b G3 = a3*G3b Pa = s*G3 Qa = s*G + x*G2 G2 = b2*G2a G3 = b3*G3a Pb = r*G3 Qb = r*G + y*G2 Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb) G2a, G3a, G2b, G3b Pa, Qa, Pb, Qb Ra, Rb
  • 22. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*G G2 = a2*G2b G3 = a3*G3b Pa = s*G3 Qa = s*G + x*G2 G2 = b2*G2a G3 = b3*G3a Pb = r*G3 Qb = r*G + y*G2 Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb) a3*Rb == Pa-Pb b3*Ra == Pa-Pb G2a, G3a, G2b, G3b Pa, Qa, Pb, Qb Ra, Rb
  • 23. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*G G2 = a2*G2b G3 = a3*G3b Pa = s*G3 Qa = s*G + x*G2 G2 = b2*G2a G3 = b3*G3a Pb = r*G3 Qb = r*G + y*G2 Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb) a3*Rb == Pa-Pb b3*Ra == Pa-Pb G2a, G3a, G2b, G3b Pa, Qa, Pb, Qb Ra, Rb a3 * Rb = b3 * Ra = (Pa - Pb) + (a3 * b3 * (x - y)) * G2
  • 24. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*G G2 = a2*G2b G3 = a3*G3b Pa = s*G3 Qa = s*G + x*G2 G2 = b2*G2a G3 = b3*G3a Pb = r*G3 Qb = r*G + y*G2 Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb) a3*Rb == Pa-Pb b3*Ra == Pa-Pb G2a, G3a, G2b, G3b Pa, Qa, Pb, Qb Ra, Rb a3 * Rb = b3 * Ra = (Pa - Pb) + (a3 * b3 * (x - y)) * G2
  • 25. Socialist millionaires • Socialist millionaire problem is a way for two millionaires to check whether their wealth is equal • can be used to verify whether two parties posses the same secret • a passive attacker learns nothing about the protocol and its outcome • MiTM can do no better than passive attacker except disrupting the communication channel • even if one of the parties is dishonest, he learns nothing more that the protocol outcome • unlike most other zero-knowledge proofs requires O(1) protocol iterations • is adopted and has good history
  • 26. OTR SMP • Uses 1536-bit group calculations
  • 27. OTR SMP • Uses 1536-bit group calculations • BUT: LogJam!
  • 28. OTR SMP • Uses 1536-bit group calculations • BUT: LogJam! • 512-bit broken • 1024-bit probably • 1536-bit is very close!
  • 29. Themis SMP vs OTR SMP • Improving SMP • moved all cryptographic operations in ECC domain • modern (boring) cryptography (ed25519) • timing attacks protection • fast and performant • reduced memory footprint • support for many high-level languages • simple API • GitHub: https://github.com/cossacklabs/themis
  • 32. Possible use-cases • Credit reference agency knows your PII, even if you were not on file before PII PII
  • 36. Possible use-cases • Credit reference agency knows your are at least client of both banks even if you were not on file before (able to trace you later) Hash(UniqueID) = AnotherUniqueID
  • 37. Possible use-cases • Credit reference agency does not get anything if your were not on their file previously Hash(UniqueID) = AnotherUniqueID
  • 38. SMP vs PAKE • PAKE - password-authenticated key agreement
  • 39. SMP vs PAKE • PAKE - password-authenticated key agreement • basic PAKE requires only 1 roundtrip • simple, requires small number of asymmetric cryptographic operations • easy to implement • provides a negotiated secret key as a protocol outcome
  • 40. SMP vs PAKE • PAKE - password-authenticated key agreement • basic PAKE requires only 1 roundtrip • simple, requires small number of asymmetric cryptographic operations • easy to implement • provides a negotiated secret key as a protocol outcome • Example: SPAKE2 (https://tools.ietf.org/html/draft-irtf- cfrg-spake2-03)
  • 41. SPAKE2 • EC curve: G - base point, n - order of G, M,N - known fixed points on the curve • Alice and Bob know w. Generate x X = x*G T = w*M + X Generate y Y = y*G S = w*N + Y K = x*(S - w*N) K = y*(T - w*M) T, S
  • 42. Myth 1: PAKE is MUCH faster • PAKE is better because it is simpler • requires much less computations • only 1-RTT compared to 3-RTT SMP
  • 43. SPAKE2 • EC curve: G - base point, n - order of G, M,N - known fixed points on the curve • Alice and Bob know w. Generate x X = x*G T = w*M + X Generate y Y = y*G S = w*N + Y K = x*(S - w*N) K = y*(T - w*M) T, S
  • 44. SPAKE2 • EC curve: G - base point, n - order of G, M,N - known fixed points on the curve • Alice and Bob know w. Generate x X = x*G T = w*M + X Generate y Y = y*G S = w*N + Y K = x*(S - w*N) K = y*(T - w*M) T, S Key confirmation?
  • 45. Myth 1: PAKE is MUCH faster • SPAKE2 requires additional roundtrip for authentication scenario
  • 46. Myth 1: PAKE is MUCH faster • SPAKE2 requires additional roundtrip for authentication scenario • Pure C: SMP is only ~20 times slower • small price for zero-knowledge guarantee
  • 47. Myth 1: PAKE is MUCH faster • SPAKE2 requires additional roundtrip for authentication scenario • Pure C: SMP is only ~20 times slower • small price for zero-knowledge guarantee • High-level languages: SMP is only ~3 times slower • more probable real-world use-case • more time is spent on network communication and language runtime
  • 48. Myth 2: SMP doesn’t negotiate a key • PAKE is better because it negotiates a key out-of-the box and SMP does not
  • 49. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*G G2 = a2*G2b G3 = a3*G3b Pa = s*G3 Qa = s*G + x*G2 G2 = b2*G2a G3 = b3*G3a Pb = r*G3 Qb = r*G + y*G2 Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb) a3*Rb == Pa-Pb b3*Ra == Pa-Pb G2a, G3a, G2b, G3b Pa, Qa, Pb, Qb Ra, Rb
  • 50. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*G G2 = a2*G2b G3 = a3*G3b Pa = s*G3 Qa = s*G + x*G2 G2 = b2*G2a G3 = b3*G3a Pb = r*G3 Qb = r*G + y*G2 Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb) a3*Rb == Pa-Pb b3*Ra == Pa-Pb G2a, G3a, G2b, G3b Pa, Qa, Pb, Qb Ra, Rb
  • 51. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*G G2 = a2*G2b G3 = a3*G3b Pa = s*G3 Qa = s*G + x*G2 G2 = b2*G2a G3 = b3*G3a Pb = r*G3 Qb = r*G + y*G2 Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb) a3*Rb == Pa-Pb b3*Ra == Pa-Pb G2a, G3a, G2b, G3b Pa, Qa, Pb, Qb Ra, Rb SMP actually negotiates 2 keys!
  • 52. Possible use-cases • Automatic key rotation for long-lived encrypted connections
  • 53. Possible use-cases Encrypted communication (K1) • Automatic key rotation for long-lived encrypted connections
  • 54. Possible use-cases SMP (or PAKE with confirm) Encrypted communication (K1) • Automatic key rotation for long-lived encrypted connections
  • 55. Possible use-cases SMP (or PAKE with confirm) Encrypted communication (K1) • Automatic key rotation for long-lived encrypted connections save negotiated key
  • 56. Possible use-cases SMP (or PAKE with confirm) Encrypted communication (K1) Encrypted communication (K2) • Automatic key rotation for long-lived encrypted connections save negotiated key
  • 57. Myth 3: using PAKE for authentication • PAKE has many other reasons to be better for authentication
  • 58. Myth 3: using PAKE for authentication • PAKE is a KEY AGREEMENT
  • 59. Myth 3: using PAKE for authentication • PAKE is a KEY AGREEMENT • the goal of the protocol is to negotiate a shared secret, not authenticate a peer • PAKE protocol outcome does not provide the proof that your peer knows the secret
  • 60. SPAKE2 • EC curve: G - base point, n - order of G, M,N - known fixed points on the curve • Alice and Bob know w. Generate x X = x*G T = w*M + X Generate y Y = y*G S = w*N + Y K = x*(S - w*N) K = y*(T - w*M) T, S
  • 61. SPAKE2 • EC curve: G - base point, n - order of G, M,N - known fixed points on the curve • Alice and Bob know w. Generate x X = x*G T = w*M + X Generate y Y = y*G S = w*N + Y K = x*(S - w*N) K = y*(T - w*M) T, S
  • 62. SPAKE2 • EC curve: G - base point, n - order of G, M,N - known fixed points on the curve • Alice and Bob know w. Generate x X = x*G T = w*M + X Generate y Y = y*G S = w*N + Y K = x*(S - w*N) K = y*(T - w*M) T, S To successfully complete the protocol: • the peer may not even know w (the real secret information) • but only w*M and w*N (its public derivatives)
  • 63. SPAKE2 SPAKE2 by itself does not provide the basic proof of secret knowledge
  • 64. SPAKE2 SPAKE2 by itself does not provide the basic proof of secret knowledge • can be enforced on implementation level • made as a constraint in the target system • treat public counterparts as secret themselves • etc
  • 65. SPAKE2 SPAKE2 by itself does not provide the basic proof of secret knowledge • can be enforced on implementation level • made as a constraint in the target system • treat public counterparts as secret themselves • etc But anyway: it has to be considered somehow and protocol users have to be aware of this
  • 66. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*G G2 = a2*G2b G3 = a3*G3b Pa = s*G3 Qa = s*G + x*G2 G2 = b2*G2a G3 = b3*G3a Pb = r*G3 Qb = r*G + y*G2 Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb) a3*Rb == Pa-Pb b3*Ra == Pa-Pb G2a, G3a, G2b, G3b Pa, Qa, Pb, Qb Ra, Rb
  • 67. Socialist millionaires • EC curve: G - base point, n - order of G • Alice and Bob have x and y respectively. Both want to know whether x==y. Generate a2, a3, s G2a = a2*G G3a = a3*G Generate b2, b3, r G2b = b2*G G3b = b3*G G2 = a2*G2b G3 = a3*G3b Pa = s*G3 Qa = s*G + x*G2 G2 = b2*G2a G3 = b3*G3a Pb = r*G3 Qb = r*G + y*G2 Ra = a3*(Qa-Qb) Rb = b3*(Qa-Qb) a3*Rb == Pa-Pb b3*Ra == Pa-Pb G2a, G3a, G2b, G3b Pa, Qa, Pb, Qb Ra, Rb Secrets are combined with random shared values with contributions from both peers
  • 69. Conclusions • Zero-knowledge protocols are useful building blocks for enhanced security and privacy preserving protocols • They can be useful in a scenario where one of the protocol participants may be malicious
  • 70. Conclusions • Zero-knowledge protocols are useful building blocks for enhanced security and privacy preserving protocols • They can be useful in a scenario where one of the protocol participants may be malicious • You may use PAKE for many real world tasks, but you have to be aware of the caveats
  • 71. Conclusions • Zero-knowledge protocols are useful building blocks for enhanced security and privacy preserving protocols • They can be useful in a scenario where one of the protocol participants may be malicious • You may use PAKE for many real world tasks, but you have to be aware of the caveats • Socialist millionaire protocol provides more security guarantees, although with some performance penalty