SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados (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
 

Destaque

Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2
AfiqEfendy Zaen
 
wireless sensor network my seminar ppt
wireless sensor network my seminar pptwireless sensor network my seminar ppt
wireless sensor network my seminar ppt
Eisha Madhwal
 

Destaque (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
 

Mais de Alex Chepurnoy

Mais de 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
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Sigma Protocols and Zero Knowledge

  • 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...