SlideShare a Scribd company logo
Smart Contracts in
the Σ-State Language
Alexander
Chepurnoy
Ergo Platform
Cash money: no protection!
Cryptocurrencies: Protection!
pubkey_A
Bitcoin Transaction
Bitcoin Script
• Output is an object created by an user
• Protected by a script
• Interpreter is to be run by anyone (against
non-interactive proof to be included into the
blockchain)
Authentication Language
object
program
Context
Interpreter
Proof
+ Public inputs
True/False
Bitcoin Script
• A program is in stack-based language
• Proof is in the same language too
• Context is some meta-info on spending
transaction & blockchain
• Cryptographic statements:
OP_CHECKSIG, OP_CHECKMULTISIG,
OP_HASH256 (and few others)
Bitcoin Script
Output script (proposition):
OP_DUP
OP_HASH160 <pubKeyHash>
OP_EQUALVERIFY
OP_CHECKSIG
Input script (proof):
<sig>
<pubkey>
Output: true if no failure during execution and
top stack element is non-zero, false otherwise
Bitcoin Script Problems
• High-level cryptographic statements are fixed
(to add ring or threshold signatures, hard-fork is
needed)
• Limited support for cryptographic protocols
• The language was designed with no systematic
approach, very limited, but many instructions were
found problematic (DoS attacks / security issues) and
switched off
Smart Contracts
Ethereum
“Decentralized World Computer” => “Replicated Programmable Calculator”
Replicated over thousands of
machines!
Motivation
• More powerful language than the Bitcoin Script
• Still simple
• Efficiency: only parts of the blockchain which can be
queried should be queried
• Safety guarantee: verification time for any script must
be no more than predefined constant C
Related Work
• Simplicity
• More safe “Turing-complete” languages
(Plutus, Michelson, IELE etc)
Zero-Knowledge Proof-of-Knowledge
• “For publicly known value x, I know
secret w, such as R(x, w) holds”
• “For publicly known value x, I know w
such as x = gw
”
• w/out showing w
ERGO Approach (Σ–State)
• Native cryptographic protocols
• Efficient execution (lean state, prover pays if
something above a trivial thing is needed)
• Simple model
• Safety guarantee: if honest prover is able to
redeem an output on his side, no problem on
blockchain also then; strict upper bound for
execution time
Generalized Schnorr Proofs
• subclass of Σ-protocols for dlog statements
• composable (OR, AND, k-out-of-n)
• possible to turn into signatures by using
Fiat-Shamir
• efficient (Schnorr signature scheme in a
simplest case)
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
Compound Statements
/ (AND)
/ (OR)
k-out-of-n
A compound statement is also a Σ-protocol
Generating a signature
object
Context Secrets
(Priv. Key)
program
Prover
Proof (Signature)
Verifying:
object
program
Context
Interpreter
Proof
(Signature)
True/False
Σ–State
• simple predicate logic consists of cryptographic
statements and context predicates as well as / , / , k-
out-of-n connectives
• context description and predicates over it could be
different
• 2-phase interpretation on both prover/verifies sides: first
the composite logic formula to be reduced to one
contains only connectives and cryptographic statements
by evaluating state predicates, then prover generates a
proof for the cryptographic formula, verifier checks it
• In non-interactive setting (e.g. blockchain) the roof is to
be turned into a signature by using Fiat-Shamir
Bitcoin on Steroids: An Easy Way
Bitcoin: state is just about spending transaction bytes,
block height & timestamp (for CLTV) + prover arguments
Enhancing the context: height, outputs the spending
transaction spends and creates, UTXO snapshot root
hash, prover arguments
An output has additional data registers.
Example 1:
• height > 100 / dlog_g x
“if height of a block to which a spending transaction
is included > 100, output is spendable by anyone,
before that output is spendable to a party presenting
(zero-knowledge) proof a knowledge such w that
gw
=x”
• (height > 100 / dlog_g x1) / (dlog_g x1 / dlog x2)
“output could be spent anytime by proof of
knowledge of both x1 and x2, after block#100 it
could be also spent by proof of x1 knowledge”
∧ ∧
∨
h < 5 dlogg
x1
h ≥ 5 dlogg
x2
h=4
dlogg
x1
Example:
(h < 5 / dlog_g x1) / (h >= 5 / dlog x2)
Crowdfunding Example
• outputs
• (height >= 100 / dlog_g x1) /
(height < 100 / exists(outputs,
amount >= 100000 / proposition = dlog_g x2)
“output could be spent by a crowdfunding
transaction if it pays at least 100000 tokens to x2
public key holder raising funds before block #100,
or getting back to x1 after that”
Demurrage Currency Example
self is an output to be spent
regular_script is a user’s script
dem_period is demurrage period
dem_cost is demurrage cost (per period)
regular_script ∨
(height > (out.height + dem_period)
∧ exists(outputs,
value >= (out.value−dem_cost) / script=self.script))
Cryptography
• Ring and threshold signatures for free, but may be not
efficient(sig size is linear to size of the ring/group)
• We can include special efficient Σ-protocols (e.g. Groth-
Kohlweiss ring signatures from EuroCrypt’2015)
• To have ability to update cryptographical statements set,
languages like ZKPDL (Meiklejohn et al. USENIX’2010)
could be used
All Bitcoin Script Applications Are Possible:
• Atomic swaps
• Payment channels
• Zero-Knowledge Contingent Payment protocols
(Pay-to-Sudoku etc)
• Bitcoin mixers
And More Applications:
• Crowdfunding and demurrage examples
• Oracles (w. authenticated UTXO set)
• Better mixers
Safety guarantees:
• Every tree node is associated with a cost
• We calculate initial cost
• If we replace a node with a new node or a subtree, we
add cost of the latter, abort if limit is exceeded
• Cost estimations are the same for the prover and the
verifier, no abort here.
Questions?

More Related Content

What's hot

Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3
Gene Leybzon
 
A survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic EncryptionA survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic Encryption
iosrjce
 
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Stefan Marr
 
Groovy to gradle
Groovy to gradleGroovy to gradle
Groovy to gradle
Geng-Dian Huang
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
Stefan Marr
 
Kleptography
KleptographyKleptography
Kleptography
Erfan Mallick
 

What's hot (6)

Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3
 
A survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic EncryptionA survey on Fully Homomorphic Encryption
A survey on Fully Homomorphic Encryption
 
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
 
Groovy to gradle
Groovy to gradleGroovy to gradle
Groovy to gradle
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
 
Kleptography
KleptographyKleptography
Kleptography
 

Similar to Berlin sigma-2017

Creating OTP with free software
Creating OTP with free softwareCreating OTP with free software
Creating OTP with free software
Giuseppe Paterno'
 
Smart Signatures—Experiments in Authentication (Stanford BPASE 2018 final)
Smart Signatures—Experiments in Authentication (Stanford BPASE 2018 final)Smart Signatures—Experiments in Authentication (Stanford BPASE 2018 final)
Smart Signatures—Experiments in Authentication (Stanford BPASE 2018 final)
Christopher Allen
 
Securing TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography APISecuring TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography API
Kevin Hakanson
 
Vhdl new
Vhdl newVhdl new
zkFold - Zero Knowledge Smart Contracts on Cardano
zkFold - Zero Knowledge Smart Contracts on CardanozkFold - Zero Knowledge Smart Contracts on Cardano
zkFold - Zero Knowledge Smart Contracts on Cardano
Bharat Mallapur
 
CodeChecker Overview Nov 2019
CodeChecker Overview Nov 2019CodeChecker Overview Nov 2019
CodeChecker Overview Nov 2019
Olivera Milenkovic
 
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
Dace Barone
 
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
CanSecWest
 
Breaking Smart Speakers: We are Listening to You.
Breaking Smart Speakers: We are Listening to You.Breaking Smart Speakers: We are Listening to You.
Breaking Smart Speakers: We are Listening to You.
Priyanka Aash
 
Klee and angr
Klee and angrKlee and angr
Klee and angr
Wei-Bo Chen
 
Tendermint in a nutshell
Tendermint in a nutshellTendermint in a nutshell
Tendermint in a nutshell
ArcBlock
 
Attacking and Exploiting Ethereum Smart Contracts: Auditing 101
Attacking and Exploiting Ethereum Smart Contracts: Auditing 101Attacking and Exploiting Ethereum Smart Contracts: Auditing 101
Attacking and Exploiting Ethereum Smart Contracts: Auditing 101
Simone Onofri
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone Civetta
CocoaHeads France
 
Introduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologiesIntroduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologies
Paweł Wacławczyk
 
Final project powerpoint template (fndprg) (1)
Final project powerpoint template (fndprg) (1)Final project powerpoint template (fndprg) (1)
Final project powerpoint template (fndprg) (1)
jewelyngrace
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014
Barney Hanlon
 
Alexey Golub - Dependency absolution (application as a pipeline) | Svitla Sma...
Alexey Golub - Dependency absolution (application as a pipeline) | Svitla Sma...Alexey Golub - Dependency absolution (application as a pipeline) | Svitla Sma...
Alexey Golub - Dependency absolution (application as a pipeline) | Svitla Sma...
Oleksii Holub
 
The Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while PersistingThe Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while Persisting
CTruncer
 
Kubernetes debug like a pro
Kubernetes debug like a proKubernetes debug like a pro
Kubernetes debug like a pro
Gianluca Arbezzano
 
Find the Hacker
Find the HackerFind the Hacker
Find the Hacker
Sysdig
 

Similar to Berlin sigma-2017 (20)

Creating OTP with free software
Creating OTP with free softwareCreating OTP with free software
Creating OTP with free software
 
Smart Signatures—Experiments in Authentication (Stanford BPASE 2018 final)
Smart Signatures—Experiments in Authentication (Stanford BPASE 2018 final)Smart Signatures—Experiments in Authentication (Stanford BPASE 2018 final)
Smart Signatures—Experiments in Authentication (Stanford BPASE 2018 final)
 
Securing TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography APISecuring TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography API
 
Vhdl new
Vhdl newVhdl new
Vhdl new
 
zkFold - Zero Knowledge Smart Contracts on Cardano
zkFold - Zero Knowledge Smart Contracts on CardanozkFold - Zero Knowledge Smart Contracts on Cardano
zkFold - Zero Knowledge Smart Contracts on Cardano
 
CodeChecker Overview Nov 2019
CodeChecker Overview Nov 2019CodeChecker Overview Nov 2019
CodeChecker Overview Nov 2019
 
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
 
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
 
Breaking Smart Speakers: We are Listening to You.
Breaking Smart Speakers: We are Listening to You.Breaking Smart Speakers: We are Listening to You.
Breaking Smart Speakers: We are Listening to You.
 
Klee and angr
Klee and angrKlee and angr
Klee and angr
 
Tendermint in a nutshell
Tendermint in a nutshellTendermint in a nutshell
Tendermint in a nutshell
 
Attacking and Exploiting Ethereum Smart Contracts: Auditing 101
Attacking and Exploiting Ethereum Smart Contracts: Auditing 101Attacking and Exploiting Ethereum Smart Contracts: Auditing 101
Attacking and Exploiting Ethereum Smart Contracts: Auditing 101
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone Civetta
 
Introduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologiesIntroduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologies
 
Final project powerpoint template (fndprg) (1)
Final project powerpoint template (fndprg) (1)Final project powerpoint template (fndprg) (1)
Final project powerpoint template (fndprg) (1)
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014
 
Alexey Golub - Dependency absolution (application as a pipeline) | Svitla Sma...
Alexey Golub - Dependency absolution (application as a pipeline) | Svitla Sma...Alexey Golub - Dependency absolution (application as a pipeline) | Svitla Sma...
Alexey Golub - Dependency absolution (application as a pipeline) | Svitla Sma...
 
The Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while PersistingThe Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while Persisting
 
Kubernetes debug like a pro
Kubernetes debug like a proKubernetes debug like a pro
Kubernetes debug like a pro
 
Find the Hacker
Find the HackerFind the Hacker
Find the Hacker
 

More from Alex Chepurnoy

Ergo Presentation - Tokyo
Ergo Presentation - TokyoErgo Presentation - Tokyo
Ergo Presentation - Tokyo
Alex Chepurnoy
 
Ethereum and Its Challenges
Ethereum and Its ChallengesEthereum and Its Challenges
Ethereum and Its Challenges
Alex 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 Developers
Alex Chepurnoy
 
Blockchain For Developers
Blockchain For DevelopersBlockchain For Developers
Blockchain For Developers
Alex Chepurnoy
 
Blockchain Properties
Blockchain PropertiesBlockchain Properties
Blockchain Properties
Alex 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 Framework
Alex Chepurnoy
 
Some Open Problems in Blockchains
Some Open Problems in BlockchainsSome Open Problems in Blockchains
Some Open Problems in Blockchains
Alex Chepurnoy
 
Sigma Protocols and Zero Knowledge
Sigma Protocols and Zero KnowledgeSigma Protocols and Zero Knowledge
Sigma Protocols and Zero Knowledge
Alex Chepurnoy
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, Technically
Alex Chepurnoy
 
Scorex meetup-aug-2015
Scorex meetup-aug-2015Scorex meetup-aug-2015
Scorex meetup-aug-2015
Alex 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 Blockchain
Alex Chepurnoy
 

More from Alex Chepurnoy (15)

Ergo Presentation - Tokyo
Ergo Presentation - TokyoErgo Presentation - Tokyo
Ergo Presentation - Tokyo
 
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
 
Sigma Protocols and Zero Knowledge
Sigma Protocols and Zero KnowledgeSigma Protocols and Zero Knowledge
Sigma Protocols and Zero Knowledge
 
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

Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
Madhumitha Jayaram
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
PuktoonEngr
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
Ratnakar Mikkili
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 

Recently uploaded (20)

Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 

Berlin sigma-2017

  • 1. Smart Contracts in the Σ-State Language Alexander Chepurnoy Ergo Platform
  • 2. Cash money: no protection!
  • 5. Bitcoin Script • Output is an object created by an user • Protected by a script • Interpreter is to be run by anyone (against non-interactive proof to be included into the blockchain)
  • 7. Bitcoin Script • A program is in stack-based language • Proof is in the same language too • Context is some meta-info on spending transaction & blockchain • Cryptographic statements: OP_CHECKSIG, OP_CHECKMULTISIG, OP_HASH256 (and few others)
  • 8. Bitcoin Script Output script (proposition): OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG Input script (proof): <sig> <pubkey> Output: true if no failure during execution and top stack element is non-zero, false otherwise
  • 9. Bitcoin Script Problems • High-level cryptographic statements are fixed (to add ring or threshold signatures, hard-fork is needed) • Limited support for cryptographic protocols • The language was designed with no systematic approach, very limited, but many instructions were found problematic (DoS attacks / security issues) and switched off
  • 11. Ethereum “Decentralized World Computer” => “Replicated Programmable Calculator” Replicated over thousands of machines!
  • 12. Motivation • More powerful language than the Bitcoin Script • Still simple • Efficiency: only parts of the blockchain which can be queried should be queried • Safety guarantee: verification time for any script must be no more than predefined constant C
  • 13. Related Work • Simplicity • More safe “Turing-complete” languages (Plutus, Michelson, IELE etc)
  • 14. Zero-Knowledge Proof-of-Knowledge • “For publicly known value x, I know secret w, such as R(x, w) holds” • “For publicly known value x, I know w such as x = gw ” • w/out showing w
  • 15. ERGO Approach (Σ–State) • Native cryptographic protocols • Efficient execution (lean state, prover pays if something above a trivial thing is needed) • Simple model • Safety guarantee: if honest prover is able to redeem an output on his side, no problem on blockchain also then; strict upper bound for execution time
  • 16. Generalized Schnorr Proofs • subclass of Σ-protocols for dlog statements • composable (OR, AND, k-out-of-n) • possible to turn into signatures by using Fiat-Shamir • efficient (Schnorr signature scheme in a simplest case)
  • 17. 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
  • 18. Compound Statements / (AND) / (OR) k-out-of-n A compound statement is also a Σ-protocol
  • 19. Generating a signature object Context Secrets (Priv. Key) program Prover Proof (Signature)
  • 21. Σ–State • simple predicate logic consists of cryptographic statements and context predicates as well as / , / , k- out-of-n connectives • context description and predicates over it could be different • 2-phase interpretation on both prover/verifies sides: first the composite logic formula to be reduced to one contains only connectives and cryptographic statements by evaluating state predicates, then prover generates a proof for the cryptographic formula, verifier checks it • In non-interactive setting (e.g. blockchain) the roof is to be turned into a signature by using Fiat-Shamir
  • 22. Bitcoin on Steroids: An Easy Way Bitcoin: state is just about spending transaction bytes, block height & timestamp (for CLTV) + prover arguments Enhancing the context: height, outputs the spending transaction spends and creates, UTXO snapshot root hash, prover arguments An output has additional data registers.
  • 23. Example 1: • height > 100 / dlog_g x “if height of a block to which a spending transaction is included > 100, output is spendable by anyone, before that output is spendable to a party presenting (zero-knowledge) proof a knowledge such w that gw =x” • (height > 100 / dlog_g x1) / (dlog_g x1 / dlog x2) “output could be spent anytime by proof of knowledge of both x1 and x2, after block#100 it could be also spent by proof of x1 knowledge”
  • 24. ∧ ∧ ∨ h < 5 dlogg x1 h ≥ 5 dlogg x2 h=4 dlogg x1 Example: (h < 5 / dlog_g x1) / (h >= 5 / dlog x2)
  • 25. Crowdfunding Example • outputs • (height >= 100 / dlog_g x1) / (height < 100 / exists(outputs, amount >= 100000 / proposition = dlog_g x2) “output could be spent by a crowdfunding transaction if it pays at least 100000 tokens to x2 public key holder raising funds before block #100, or getting back to x1 after that”
  • 26. Demurrage Currency Example self is an output to be spent regular_script is a user’s script dem_period is demurrage period dem_cost is demurrage cost (per period) regular_script ∨ (height > (out.height + dem_period) ∧ exists(outputs, value >= (out.value−dem_cost) / script=self.script))
  • 27. Cryptography • Ring and threshold signatures for free, but may be not efficient(sig size is linear to size of the ring/group) • We can include special efficient Σ-protocols (e.g. Groth- Kohlweiss ring signatures from EuroCrypt’2015) • To have ability to update cryptographical statements set, languages like ZKPDL (Meiklejohn et al. USENIX’2010) could be used
  • 28. All Bitcoin Script Applications Are Possible: • Atomic swaps • Payment channels • Zero-Knowledge Contingent Payment protocols (Pay-to-Sudoku etc) • Bitcoin mixers
  • 29. And More Applications: • Crowdfunding and demurrage examples • Oracles (w. authenticated UTXO set) • Better mixers
  • 30. Safety guarantees: • Every tree node is associated with a cost • We calculate initial cost • If we replace a node with a new node or a subtree, we add cost of the latter, abort if limit is exceeded • Cost estimations are the same for the prover and the verifier, no abort here.