SlideShare a Scribd company logo
1 of 26
SPB Crypto Devs Meetup
Sigma Protocols and
Efficient Zero-Knowledge Proofs
Alexander Chepurnoy
IOHK Research
Motivating Example
● Alice publishes a commitment of a secret
● Alice passes a secret to Bob
● Bob wants to convince Carol he knows a secret
Motivating Example
● Anonymous voting
● Every vote is whether 0 or 1 encrypted
● To calculate a sum, additively homomorphic encryption
could be used
● But how to be sure only 0 or 1 is encrypted?
● Solution: a proof for each vote it is whether 0 or 1(without
revealing a value!)
ZKPoKs: What For
● Identification schemes
● Signatures
● Building block in many protocols(voting, anonymous
transactions etc)
ZKPoK
● Zero-Knowledge Proof of Knowledge
● Prover P, Verifier V, relation R
● Common input x
● P proves it knows a witness w for which (x,w) R∈
● Without revealing anything about it
● In practice, often inefficient and so avoided
Properties
● Completeness: a correct statement could be proven
● Soundness: it's not possible to prove incorrect statements
(with a non-negligible probability)
Σ-protocol, Generically
● P sends V a message a
● V sends P a random t-bit string e
● P sends a reply z, and V decides to accept or reject based
solely on the data it has seen; i.e., based only on the
values (x, a, e, z).
Theory Behind
● Ivan Damgard „On Sigma Protocols“
● Yehuda Lindell, Carmit Hazay „Efficient Secure Two-Party
Protocols: Techniques and Constructions“ (Book)
● Yehuda Lindell „Sigma Protocols and Zero Knowledge“
http://www.youtube.com/watch?v=nwsmG3S9wIc
Implementation
● ScAPI(Java/JVM) - The Secure Computation API
https://github.com/cryptobiu/scapi
● Protocols pseudocode
http://cryptobiu.github.io/scapi/SDK_Pseudocode.pdf
Example: Schnorr’s protocol
●
Σ-protocol for DLOG
● h = gw
● (p, q ,g, h) is common input
● First msg(P): a = gr
● Second msg(V): challenge c = random({0, 1}, t)
● Third message(P): z = r + ew mod q
● V checks if gz
= a * he
● Completeness: gz
= g(r+ew)
= gr
* (gw
)e
= a * he
Schnorr’s protocol
● Very efficient: just 3 exponentiations
● Proof-of-Knowledge protocol
● Not provably Zero-Knowledge
● but Honest Verifier Zero-Knowledge
● error 2-t
Proof of Membership
● (x;w) ∈ L
● x is set
Example: Diffie-Hellman tuple
● Common input: (G,q,g,h,u,v,t)
● P knows w such as u = gw
, v = hw
● P sends out a = gr
, b = hr
● V sends out a challenge c = random({0, 1}, t)
● P sends out z = r + ew mod q
● V checks if gz
= a*ue
, hz
= b * ve
Run Properties
● Parallel execution: l parallel runs with challenge of size t is
equivalent to run protocols with challenge of size l*t
● Challenge could be of arbitrary size
Compound Statements
● AND
● OR
AND Statement
● Just run two protocols in parallel for (a1, a2) and the same
e
OR Statement
● Prove one of two statements is true without revealing
which
● Based on simulation for a statement witness isn't known
for
Compound Statements
● OR of many statements (k out of n) is possible
● Any monotone formula, so any combination of ANDs and
ORs without a negation, is possible
Commitment Scheme
● Commit phase
● Reveal phase
● hash (secret ++ blinding factor)
● Pedersen commitment: c = gx
* hr
Zero Knowledge From Σ-protocol
● Verifier needs to commit a challenge in prior to a fist
message from a Prover
●
With the commitment being added, a Σ-protocol becomes
provably Zero-Knowledge (details in the book of Lindell /
Hazay)
Zero Knowledge From Σ-protocol
●
Σ-protocol π
● V chooses a random t-bit challenge e and interacts with P via
the commitment protocol in order to commit to e
● P computes the first message a in π, using (x, w) as input, and
sends it to V
● V reveals e to P by decommitting
● P verifies the decommitment, computes the answer z in π, and
sends z to V
● V accepts if and only if transcript (a, e, z) is accepting in π on
input x
Commitment From Σ-protocol
● Verifier = receiver
● Prover = sender
● Set-up: V generates (x; w), sends x to P
● Commit: to commit to a t-bit string e. P runs simulator on
(x, e) to get (a, e, z) and sends a to V
● Open: to reveal the commitment, P sends (e, z) to V, V
checks (a, e, z)
Non-Interactive Σ-protocol
● No interaction, no Verifier
● w. public Random Oracle
● e = R(a)
● not provably secure
Signature From Σ-protocol
● (x; w)
● public key x
● private key w
● message m
● e = R(a++m)
● (a, z) is a signature
● as hard to break as to compute w from x (in ROM)
Conclusion
● One template for many protocols
● Highly efficient
● Composable
● Provably secure
● Makes things easier
● Crypto is HARD anyway...
Questions?
Twitter: @chepurnoy
Mail: kushti@protonmail.ch

More Related Content

What's hot (12)

What is c
What is cWhat is c
What is c
 
Presentation on nesting of loops
Presentation on nesting of loopsPresentation on nesting of loops
Presentation on nesting of loops
 
SS UI Lecture 5
SS UI Lecture 5SS UI Lecture 5
SS UI Lecture 5
 
Compiler Design Unit 3
Compiler Design Unit 3Compiler Design Unit 3
Compiler Design Unit 3
 
Csc1100 lecture01 ch01-pt1
Csc1100 lecture01 ch01-pt1Csc1100 lecture01 ch01-pt1
Csc1100 lecture01 ch01-pt1
 
Csc1100 lecture01 ch01-pt1
Csc1100 lecture01 ch01-pt1Csc1100 lecture01 ch01-pt1
Csc1100 lecture01 ch01-pt1
 
C++ quik notes
C++ quik notesC++ quik notes
C++ quik notes
 
C fundamentals
C fundamentalsC fundamentals
C fundamentals
 
Web Application Development using PHP Chapter 2
Web Application Development using PHP Chapter 2Web Application Development using PHP Chapter 2
Web Application Development using PHP Chapter 2
 
Loops in c language
Loops in c languageLoops in c language
Loops in c language
 
Avoiding Hardware Aliasing
Avoiding Hardware AliasingAvoiding Hardware Aliasing
Avoiding Hardware Aliasing
 
T02 a firstcprogram
T02 a firstcprogramT02 a firstcprogram
T02 a firstcprogram
 

Viewers also liked

Zero knowledge proofsii
Zero knowledge proofsiiZero knowledge proofsii
Zero knowledge proofsiisreesaiprakash
 
Elliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge ProofElliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge ProofArunanand Ta
 
Cryptography and Voting
Cryptography and VotingCryptography and Voting
Cryptography and VotingBen Adida
 
Wireless sensor Network using Zero Knowledge Protocol ppt
Wireless sensor Network using Zero Knowledge Protocol pptWireless sensor Network using Zero Knowledge Protocol ppt
Wireless sensor Network using Zero Knowledge Protocol pptsofiakhatoon
 
Public Key Algorithms
Public Key AlgorithmsPublic Key Algorithms
Public Key AlgorithmsBit Hacker
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2AfiqEfendy Zaen
 
wireless sensor network my seminar ppt
wireless sensor network my seminar pptwireless sensor network my seminar ppt
wireless sensor network my seminar pptEisha Madhwal
 

Viewers also liked (11)

Zero knowledge proofsii
Zero knowledge proofsiiZero knowledge proofsii
Zero knowledge proofsii
 
Elliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge ProofElliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge Proof
 
Digital Signatures
Digital SignaturesDigital Signatures
Digital Signatures
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Cryptography and Voting
Cryptography and VotingCryptography and Voting
Cryptography and Voting
 
Wireless sensor Network using Zero Knowledge Protocol ppt
Wireless sensor Network using Zero Knowledge Protocol pptWireless sensor Network using Zero Knowledge Protocol ppt
Wireless sensor Network using Zero Knowledge Protocol ppt
 
Public Key Algorithms
Public Key AlgorithmsPublic Key Algorithms
Public Key Algorithms
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2
 
Spm unit 3
Spm unit 3Spm unit 3
Spm unit 3
 
cryptography
cryptographycryptography
cryptography
 
wireless sensor network my seminar ppt
wireless sensor network my seminar pptwireless sensor network my seminar ppt
wireless sensor network my seminar ppt
 

More from Alex Chepurnoy

Ergo Presentation - Tokyo
Ergo Presentation - TokyoErgo Presentation - Tokyo
Ergo Presentation - TokyoAlex Chepurnoy
 
Ethereum and Its Challenges
Ethereum and Its ChallengesEthereum and Its Challenges
Ethereum and Its ChallengesAlex Chepurnoy
 
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...Alex Chepurnoy
 
Масштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решенияМасштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решенияAlex Chepurnoy
 
Blockchan For Developers
Blockchan For DevelopersBlockchan For Developers
Blockchan For DevelopersAlex Chepurnoy
 
Blockchain For Developers
Blockchain For DevelopersBlockchain For Developers
Blockchain For DevelopersAlex Chepurnoy
 
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)Alex Chepurnoy
 
Scorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain FrameworkScorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain FrameworkAlex Chepurnoy
 
Some Open Problems in Blockchains
Some Open Problems in BlockchainsSome Open Problems in Blockchains
Some Open Problems in BlockchainsAlex Chepurnoy
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, TechnicallyAlex Chepurnoy
 
Scorex meetup-aug-2015
Scorex meetup-aug-2015Scorex meetup-aug-2015
Scorex meetup-aug-2015Alex Chepurnoy
 
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)Alex Chepurnoy
 
A New Business World Within A Blockchain
A New Business World Within A BlockchainA New Business World Within A Blockchain
A New Business World Within A BlockchainAlex Chepurnoy
 

More from Alex Chepurnoy (15)

Ergo Presentation - Tokyo
Ergo Presentation - TokyoErgo Presentation - Tokyo
Ergo Presentation - Tokyo
 
Berlin sigma-2017
Berlin sigma-2017Berlin sigma-2017
Berlin sigma-2017
 
Ethereum and Its Challenges
Ethereum and Its ChallengesEthereum and Its Challenges
Ethereum and Its Challenges
 
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurr...
 
Масштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решенияМасштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решения
 
Blockchan For Developers
Blockchan For DevelopersBlockchan For Developers
Blockchan For Developers
 
Blockchain For Developers
Blockchain For DevelopersBlockchain For Developers
Blockchain For Developers
 
Blockchain Properties
Blockchain PropertiesBlockchain Properties
Blockchain Properties
 
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
 
Scorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain FrameworkScorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain Framework
 
Some Open Problems in Blockchains
Some Open Problems in BlockchainsSome Open Problems in Blockchains
Some Open Problems in Blockchains
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, Technically
 
Scorex meetup-aug-2015
Scorex meetup-aug-2015Scorex meetup-aug-2015
Scorex meetup-aug-2015
 
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
 
A New Business World Within A Blockchain
A New Business World Within A BlockchainA New Business World Within A Blockchain
A New Business World Within A Blockchain
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Efficient Zero-Knowledge Proofs and Sigma Protocols

  • 1. SPB Crypto Devs Meetup Sigma Protocols and Efficient Zero-Knowledge Proofs Alexander Chepurnoy IOHK Research
  • 2. Motivating Example ● Alice publishes a commitment of a secret ● Alice passes a secret to Bob ● Bob wants to convince Carol he knows a secret
  • 3. Motivating Example ● Anonymous voting ● Every vote is whether 0 or 1 encrypted ● To calculate a sum, additively homomorphic encryption could be used ● But how to be sure only 0 or 1 is encrypted? ● Solution: a proof for each vote it is whether 0 or 1(without revealing a value!)
  • 4. ZKPoKs: What For ● Identification schemes ● Signatures ● Building block in many protocols(voting, anonymous transactions etc)
  • 5. ZKPoK ● Zero-Knowledge Proof of Knowledge ● Prover P, Verifier V, relation R ● Common input x ● P proves it knows a witness w for which (x,w) R∈ ● Without revealing anything about it ● In practice, often inefficient and so avoided
  • 6. Properties ● Completeness: a correct statement could be proven ● Soundness: it's not possible to prove incorrect statements (with a non-negligible probability)
  • 7. Σ-protocol, Generically ● P sends V a message a ● V sends P a random t-bit string e ● P sends a reply z, and V decides to accept or reject based solely on the data it has seen; i.e., based only on the values (x, a, e, z).
  • 8. Theory Behind ● Ivan Damgard „On Sigma Protocols“ ● Yehuda Lindell, Carmit Hazay „Efficient Secure Two-Party Protocols: Techniques and Constructions“ (Book) ● Yehuda Lindell „Sigma Protocols and Zero Knowledge“ http://www.youtube.com/watch?v=nwsmG3S9wIc
  • 9. Implementation ● ScAPI(Java/JVM) - The Secure Computation API https://github.com/cryptobiu/scapi ● Protocols pseudocode http://cryptobiu.github.io/scapi/SDK_Pseudocode.pdf
  • 10. Example: Schnorr’s protocol ● Σ-protocol for DLOG ● h = gw ● (p, q ,g, h) is common input ● First msg(P): a = gr ● Second msg(V): challenge c = random({0, 1}, t) ● Third message(P): z = r + ew mod q ● V checks if gz = a * he ● Completeness: gz = g(r+ew) = gr * (gw )e = a * he
  • 11. Schnorr’s protocol ● Very efficient: just 3 exponentiations ● Proof-of-Knowledge protocol ● Not provably Zero-Knowledge ● but Honest Verifier Zero-Knowledge ● error 2-t
  • 12. Proof of Membership ● (x;w) ∈ L ● x is set
  • 13. Example: Diffie-Hellman tuple ● Common input: (G,q,g,h,u,v,t) ● P knows w such as u = gw , v = hw ● P sends out a = gr , b = hr ● V sends out a challenge c = random({0, 1}, t) ● P sends out z = r + ew mod q ● V checks if gz = a*ue , hz = b * ve
  • 14. Run Properties ● Parallel execution: l parallel runs with challenge of size t is equivalent to run protocols with challenge of size l*t ● Challenge could be of arbitrary size
  • 16. AND Statement ● Just run two protocols in parallel for (a1, a2) and the same e
  • 17. OR Statement ● Prove one of two statements is true without revealing which ● Based on simulation for a statement witness isn't known for
  • 18. Compound Statements ● OR of many statements (k out of n) is possible ● Any monotone formula, so any combination of ANDs and ORs without a negation, is possible
  • 19. Commitment Scheme ● Commit phase ● Reveal phase ● hash (secret ++ blinding factor) ● Pedersen commitment: c = gx * hr
  • 20. Zero Knowledge From Σ-protocol ● Verifier needs to commit a challenge in prior to a fist message from a Prover ● With the commitment being added, a Σ-protocol becomes provably Zero-Knowledge (details in the book of Lindell / Hazay)
  • 21. Zero Knowledge From Σ-protocol ● Σ-protocol π ● V chooses a random t-bit challenge e and interacts with P via the commitment protocol in order to commit to e ● P computes the first message a in π, using (x, w) as input, and sends it to V ● V reveals e to P by decommitting ● P verifies the decommitment, computes the answer z in π, and sends z to V ● V accepts if and only if transcript (a, e, z) is accepting in π on input x
  • 22. Commitment From Σ-protocol ● Verifier = receiver ● Prover = sender ● Set-up: V generates (x; w), sends x to P ● Commit: to commit to a t-bit string e. P runs simulator on (x, e) to get (a, e, z) and sends a to V ● Open: to reveal the commitment, P sends (e, z) to V, V checks (a, e, z)
  • 23. Non-Interactive Σ-protocol ● No interaction, no Verifier ● w. public Random Oracle ● e = R(a) ● not provably secure
  • 24. Signature From Σ-protocol ● (x; w) ● public key x ● private key w ● message m ● e = R(a++m) ● (a, z) is a signature ● as hard to break as to compute w from x (in ROM)
  • 25. Conclusion ● One template for many protocols ● Highly efficient ● Composable ● Provably secure ● Makes things easier ● Crypto is HARD anyway...