Off-Chain Protocols: (Virtual) State Channels

Total Page:16

File Type:pdf, Size:1020Kb

Off-Chain Protocols: (Virtual) State Channels BDLT 2019, Vienna, Austria Off-chain Protocols: (Virtual) State Channels Sebastian Faust Credits: Stefan Dziembowski, Lisa Eckey, Julia Hesse, Kristina Hostakova, Sebastian Stammler 1 Hot topic in cryptocurrencies and academia “Channels” is our payment main focus in this talk. channels Plasma MVP Initiated by [Decker & state Wattenhofer] [Poon channels & Dryja] (plus many informal online Plasma channel Cash publications). networks “Plasma”initiated by [Poon & Buterin] (plus countless informal online publications). 2 Many interesting state channel projects We follow the terminology of Perun (L4 Counterfactual, Connext und Magmo are very similar) 3 Main goal: off-chain contracts On-chain contract: deployment and execution on-chain Chess contract Alice Bob Off-chain contract: deployment and execution off-chain Chess contract Bob Alice 4 State Channel Variants Goal: Off-chain execution of contracts Alice Ingrid Bob Ledger state channel: channel built „over ledger“ This talk Virtual state channel: channel built „over ledger channels“ Multiparty state channels: channels for multiparty contracts 5 Outline 1. Introduction 2. Ledger Channels a. Recap: Ledger Payment Channels b. Ledger State Channels 3. Virtual State Channels 4. Security analysis 5. Summary 6 Main ingredient of off-chain protocols Smart contract ≈ „programmable money“ 풙푨 + 풙푩 coins Examples: Ethereum Contract rules (in Ethereum written in Solidity) 푥 + 푥 Function퐴 call 퐵f 푥퐴coins Updating the 푥퐵 on input m coins state coins Alice Bob 1. Parties deploy contract and deposit coins to the contract 2. Execute the contract 3. Coins can be assigned back to the users 7 Ledger Payment Channels Goal: Execute payments off-chain directly over ledger Examples: Raiden Network in Ethereum, Lightning Network in Bitcoin ퟐ coins 1 coin 12 coincoins Payment channel contract 0.912 1.101 Alice BobBob 1. Create 2. Update 3. Close Dispute On-chain Off-chain! On-chain On-chain 8 Updating the ledger payment channel Goal: Update to new balance 0.99 for Alice and 1.01 for Bob Idea: exchange signatures on message containing new balance m := (0.99, 1.01, 1) An index called New balance of version number the parties 0.199 1.101 Alice Bob 흈퐀퐥퐢퐜퐞 ≔ 퐒퐢퐠퐧퐀퐥퐢퐜퐞(0.99, 1.01, 1) 흈퐁퐨퐛 ≔ 퐒퐢퐠퐧퐁퐨퐛(0.99, 1.01, 1) 흈퐀퐥퐢퐜퐞 흈퐁퐨퐛 9 Further updates For each update increase version number: version = version + 1 0.98 1.02 Alice Bob 흈퐀퐥퐢퐜퐞 ≔ 퐒퐢퐠퐧퐀퐥퐢퐜퐞(0.98, 1.02, 2) 흈퐁퐨퐛 ≔ 퐒퐢퐠퐧퐁퐨퐛(0.98, 1.02, 2) 흈퐀퐥퐢퐜퐞 흈퐁퐨퐛 10 Closing the payment channel Suppose Bob wants to close the channel 0.98 1.02 Alice Bob Payment channel Alice gets notified that contract Close(0.98, 1.02, 2, 흈퐀퐥퐢퐜퐞) close was sent Close(0.98, 1.02, 2, 흈퐀퐥퐢퐜퐞) Ping() Alice has 1 hour Verify 흈퐀퐥퐢퐜퐞 and pay time to react out balance 1.02 coins 0.98 coins 1 hour = maximal time needed to post on the ledger 11 Handling disuptes Suppose malicious Alice closes channel with earlier balance 0.98 1.02 Alice Bob Payment channel contract Close(0.99, 1.01, 1, 흈퐁퐨퐛) Close(0.99, 1.01, 1, 흈 ) 퐁퐨퐛 Close(0.98, 1.02, 2, 흈퐀퐥퐢퐜퐞) Close(0.98, 1.02, 2, 흈퐀퐥퐢퐜퐞) Verify 흈퐀퐥퐢퐜퐞 and 흈퐁퐨퐛 Pay out balance according to highest 0.98 coins 1.02 coins version number 12 Outline 1. Introduction 2. Ledger Channels a. Recap: Ledger Payment Channels b. Ledger State Channels 3. Virtual State Channels 4. Security analysis 5. Summary 13 State channels – motivation One way to look at the payment channels: Alice and Bob maintain a simulated ledger between themselves. The contents of the “simulated ledger” is registered on the “real ledger” only if: • the channel is closed, or • the parties run into a dispute. A natural question: can we also have contracts “inside of the simulated ledger”? 14 Ledger State Channels Goal: Execute contracts off-chain directly over ledger ퟐ coins 21 coinscoin 1 coin State channel contract 12 01 Alice BobBob 1. Create 2. Add 3. Execute 4. Close On-chain Off-chain! Off-chain! On-chain 15 Add a contract Recall: Contracts own coins and maintain state Idea: Extend signed tuple by coins and state of contract m := (풙푨, 풙푩, 풚, 풔풕풂풕풆, version) Alice’s Bob’s Contract’s Contract’s off- coins coins coins chain state 푦=푦퐴 + 푦퐵 풙풙푨-푨풚푨 풙풙푩푩-풚푩 Alice Initial state BobBob 흈푨풍풊풄풆= 푺풊품풏푨풍풊풄풆(풎) 흈푩풐풃= 푺풊품풏푩풐풃(풎) 16 Executing a contract Suppose Alice wants to execute contract on function Move with input a 풚 Function Input 풚 Move(a) Alice Current state New state’ How can a contract execution be done in a state channel? 1. Peaceful execution: optimistic (off-chain) 2. Forceful execution: in case of dispute (on-chain) 17 Peaceful execution Idea: Executing the contract in the state channel Suppose latest state was: (풙푨, 풙푩, 풚, 풔풕풂풕풆, version) Execute Move(a) Alice BobBob Both parties locally compute: 풚 풚 Move(a) Current state New state’ Parties exchange signatures on: (풙푨, 풙푩, 풚, 풔풕풂풕풆′, version+1) 18 Forceful execution Idea: If dispute during execution occurs, parties move on-chain Bob does Suppose latest state was: (풙푨, 풙푩, 풚, 풔tate, version) not reply Execute Move(x) Alice BobBob register Move(x,a) Register latest state (풙푨, 풙푩, 풚, 풔풕풂풕풆, version) in channel contract From then on: continue execution on-chain 19 Security and efficiency guarantees Consensus on create & add: Agreement required from Alice & Bob 1. Create: Contract requires confirmation from both parties 2. Add: Protocol requires signature from both parties Alice BobBob Guaranteed execution: Once contract is added, its execution cannot be halted achieved via forceful execution Optimistic execution in O(1) rounds: When both parties honest contract execution is in real time achieved via peaceful execution 20 Summary – ledger channels Main features compared to on-chain transactions • Low costs • Instantaneous updates/execution Payment channels State channels Purpose 2-party payments 2-party contracts Create channel On-chain On-chain Update/Execute Off-chain balance changes Off-chain contract execution Close On-chain On-chain 21 Outline 1. Introduction 2. Ledger Channels a. Recap: Ledger Payment Channels b. Ledger State Channels 3. Virtual State Channels 4. Security analysis 5. Summary 22 Channel networks Problem: every pair of parties requires a separate channel Can we do better? Yes! Alice Ingrid Bob Option 1: Routing each payment via Ingrid • Hashed Timelock Contract (HTLC): used for payments in e.g., Lightning Option 2: Creating virtual state channels • Used for state channel networks 23 Virtual state channel – overview virtual channel contract Bob, let’s play! Alice Ingrid Bob Off-chain! Off-chain! Off-chain! Off-chain! Virtual channel 1. Create 2. Add 3. Execute 4. Close Ledger channel 1. Create 2. Add 3. Execute 4. Close On-chain Off-chain! Off-chain! On-chain 24 Virtual state channel: create Add contract 푪푨 Add contract 푪푩 ퟏ ퟏ ퟏ ퟏ Alice Ingrid Bob ퟎ. ퟏ ퟎ. ퟐ Our goal 푪 푨 푪푩 ퟎ. ퟐ ퟎ. ퟏ ퟎ. ퟏ ퟎ. ퟐ Ingrid puts collateral ퟎ. ퟐ Ingrid puts collateral ퟎ. ퟏ to take role of Bob Virtual Channel Contract (VCC) to take role of Alice 25 Virtual state channel: create 푪 : OK! 푨 푪푩: OK! ퟏ ퟏ ퟏ ퟏ Alice Ingrid Bob Ingrid agreed Ingrid agreed 푪 푨 푪푩 ퟎ. ퟐ ퟎ. ퟏ ퟎ. ퟏ ퟎ. ퟐ Ingrid puts collateral ퟎ. ퟐ Ingrid puts collateral ퟎ. ퟏ to take role of Bob Virtual Channel Contract (VCC) to take role of Alice 26 Virtual state channel: create 푪 푪푨 푩 ퟎ. ퟗ ퟎ. ퟗ ퟎ. ퟏ ퟎ. ퟐ ퟎ. ퟖ ퟎ. ퟏ ퟎ. ퟐ ퟎ. ퟖ Alice Ingrid Bob ퟎ. ퟏ ퟎ. ퟐ Summary: Use sub-protocol „add“ of underlying state channel to add contract representing virtual state channel 27 Virtual state channel: contract lifecycle Alice Bob ퟎ. ퟏ ퟎ. ퟐ ퟎ. ퟐퟏ ퟎ..ퟐퟏ 1. Adding contract 2. Peacful execution of contract Exchanging signatures on new version tuples between parties 3. Closing contract 28 Virtual state channel: close Before close: Alice gained 0.1 coins and Bob lost 0.1 coins ퟎ. ퟗ ퟎ. ퟖ ퟎ. ퟗ ퟎ. ퟖ Alice Ingrid Bob ퟎ. ퟐ ퟎ. ퟏ After close: ퟏ. ퟏ ퟎ. ퟗ ퟏ. ퟏ ퟎ. ퟗ Alice Ingrid Bob ퟎ. ퟐ ퟎ. ퟏ Gained 0.1 coins Financially neutral Lost 0.1 coins 29 So far: All parties behave honestly How to handle malicious parties? Forceful execute protocol in virtual channels (Two methods: indirect vs. direct disputes) 30 Virtual state channel: forceful execute Forceful execute via indirect dispute: dispute resolution via intermediary Start registration Bob is not Start registration responding Bob is not responding Alice Ingrid Bob Move registration on-chain 31 Virtual state channel: forceful execute Forceful execute via indirect dispute: dispute resolution via intermediary Continue to Finalize registration execute off-chain Alice Ingrid Bob Move registration on-chain • Advantage: Alice does not need to go on-chain • Disadvantage: Longer time for dispute resolution 32 Virtual state channel: forceful execute Forceful execute via direct dispute: dispute resolution directly on blockchain dispute board ContinueBob is not to contract respondingexecute on-chain State registration Alice Bob • Advantage: Conflicts can be resolved faster • Disadvantage: Honest Alice needs to go to ledger 33 Extension: longer channels I want to I want to play play … Party 1 Party 2 Party 3 Party n-1 Party n … Idea: Underlying (ledger/virtual) state channels are used as building block 34 Two additional security and efficiency guarantees Balance neutrality: Ingrid never looses money ퟎ. ퟗ ퟎ. ퟏ ퟎ. ퟐ ퟎ. ퟖ ퟎ. ퟗ ퟎ. ퟏ ퟎ. ퟐ ퟎ. ퟖ Alice Ingrid Bob ퟎ. ퟏ ퟎ. ퟐ Whatever malicious Alice and Bob do, Ingrid will always receive back her 2 coins Pessimistic execution for virtual channels built over n ledger state channels: • Direct dispute: O(n) rounds • Indirect dispute: O(1) rounds 35 Summary – ledger vs.
Recommended publications
  • Poster: Proofs of Space
    Poster: Proofs of Space Stefan Dziembowski∗, Sebastian Fausty, Vladimir Kolmogorovz, Krzysztof Pietrzakz ∗University of Warsaw and Sapienza University of Rome, faculty yEPFL Lausanne, post-doc zIST Austria, faculty Abstract—Proofs of work (PoW) have been suggested by is secure even against an adversary equipped with special- Dwork and Naor (Crypto’92) as protection to a shared resource. purpose hardware. This may, in some cases, mean that the The basic idea is to ask the service requestor to dedicate some computing effort spent by the honest (software-based) users non-trivial amount of computational work to every request. The becomes high. original applications included prevention of spam and protection against denial of service attacks. More recently, PoWs have been used to prevent double spending in the Bitcoin digital currency II. PROOFS OF SPACE (POS). system. From a more abstract point of view, a proof of work is In this work, we put forward an alternative concept for simply a means of showing that one invested a non-trivial PoWs – so-called proofs of space (PoS), where a service requestor amount of effort related to some statement. This general must dedicate a significant amount of disk space as opposed to principle also works with resources other than computation computation. We construct secure PoS schemes in the random like real money in micropayment systems or human attention oracle model, using graphs with high ”pebbling complexity” and in CAPTCHAs. In this paper we put forward the concept Merkle hash-trees. of proofs of space where the resource in question is the disk space. Some computational work is needed only in the I.
    [Show full text]
  • Krzysztof Pietrzak Last Updated November 22, 2018 Professor [email protected] IST Austria
    Krzysztof Pietrzak last updated November 22, 2018 Professor [email protected] IST Austria http://pub.ist.ac.at/crypto/ Personal Details Full Name: Krzysztof Pietrzak Citizenship: Swiss & Polish. Languages: German & Swiss-German, English, Polish (fluent), French, Dutch (speak/read), Norwegian (read) Research Interests I have a broad interest in foundational and practical aspects of cryptography. Current Employment Institute of Science and Technology (IST) Austria Vienna, Austria • Professor (Assistant Professor before Aug 2016) Aug 2011-current Previous Employment CWI (Centrum Wiskunde & Informatica) Amsterdam, Netherlands • Scientific staff member in the Crypto Group (Head Ronald Cramer) Jan 2007-Jul 2011 Ecole´ Normale Sup´erieure Paris, France • Postdoc in the Crypto Group (Head David Pointcheval) Jan-Dec 2006 Selected Distinctions ERC Starting Grant (1.12mio e) • Provable Security for Physical Cryptography (PSPC) 2010-2015 ERC Consolidator Grant (1.8mio e) • Teaching Old Crypto New Tricks (TOCNeT) 2016-2021 Best Paper Awards at • Eurocrypt 2011, 2017 and 2018 Education ETH Z¨urich,Switzerland • PhD in Cryptography 2001 - 2005 { Adviser: Prof. Ueli Maurer. { Title: Indistinguishability and Composition of Random Systems. ETH Z¨urich,Switzerland • Dipl.Inf.Ing.ETH (Master Degree in Computer Science) 1996 - 2001 { Minor subject: Quantum Physics. { Diploma thesis done at McGill (see below.) McGill University Montr´eal,Canada • Diploma Thesis autumn 2001 { Advisers: Prof. Michael Hallett (McGill) and Prof. Gaston Gonnet (ETH). { Title: On the
    [Show full text]
  • Parallel Implementations of Masking Schemes and the Bounded Moment
    Parallel Implementations of Masking Schemes and the Bounded Moment Leakage Model Gilles Barthe, François Dupressoir, Sebastian Faust, Benjamin Grégoire, François-Xavier Standaert, Pierre-Yves Strub To cite this version: Gilles Barthe, François Dupressoir, Sebastian Faust, Benjamin Grégoire, François-Xavier Standaert, et al.. Parallel Implementations of Masking Schemes and the Bounded Moment Leakage Model. Advances in Cryptology - 2017 - 36th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Apr 2017, Paris, France. pp.535–566. hal-01414009 HAL Id: hal-01414009 https://hal.inria.fr/hal-01414009 Submitted on 12 Dec 2016 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Parallel Implementations of Masking Schemes and the Bounded Moment Leakage Model Gilles Barthe1, Fran¸cois Dupressoir2, Sebastian Faust3, Benjamin Gr´egoire4, Fran¸cois-Xavier Standaert5, and Pierre-Yves Strub6. 1 IMDEA Software Institute, Spain. 2 University of Surrey, UK. 3 Ruhr Universit¨atBochum, Germany. 4 Inria Sophia-Antipolis { M´editerran´ee,France. 5 Universit´eCatholique de Louvain, Belgium. 6 Ecole Polytechnique, France. Abstract. In this paper, we provide a necessary clarification of the good security properties that can be obtained from parallel implementations of masking schemes.
    [Show full text]
  • COMMITEE : an Efficient and Secure Commit-Chain Protocol Using Tees
    COMMITEE : An Efficient and Secure Commit-Chain Protocol using TEEs Andreas Erwig Sebastian Faust TU Darmstadt TU Darmstadt [email protected] [email protected] Siavash Riahi Tobias Stöckert TU Darmstadt TU Darmstadt [email protected] [email protected] Abstract 1 Introduction Over the past decade cryptocurrencies such as Bitcoin [31] and Ethereum [38] have gained increasing popularity by intro- ducing a new financial paradigm. Unlike traditional financial Permissionless blockchain systems such as Bitcoin or systems these cryptocurrencies do not rely on a central author- Ethereum are slow and expensive, since transactions are pro- ity for transaction validation and accounting, but instead build cessed in a distributed network by a large set of parties. To upon a decentralized consensus protocol which maintains a improve on these shortcomings, a prominent approach is given distributed ledger that tracks each single transaction. How- by so-called 2nd-layer protocols. In these protocols parties ever, maintaining such a ledger in a distributed fashion comes process transactions off-chain directly between each other, at the cost of poor transaction throughput and confirmation thereby drastically reducing the costly and slow interaction time. For example, in Ethereum the transaction throughput with the blockchain. In particular, in the optimistic case, when is limited to a few dozen transactions per second and final parties behave honestly, no interaction with the blockchain confirmation of a transaction can take up to 6 minutes. On is needed. One of the most popular off-chain solutions are the contrary, traditional centralized payment providers offer Plasma protocols (often also called commit-chains).
    [Show full text]
  • Komplettes Werk
    https://doi.org/10.5771/9783968216850, am 29.09.2021, 03:03:45 Open Access - http://www.nomos-elibrary.de/agb Hof manns thal Jahrbuch · Zur europäischen Moderne 25/2017 https://doi.org/10.5771/9783968216850, am 29.09.2021, 03:03:45 Open Access - http://www.nomos-elibrary.de/agb https://doi.org/10.5771/9783968216850, am 29.09.2021, 03:03:45 Open Access - http://www.nomos-elibrary.de/agb HOf MANNSTHAL JAHRBUCH · ZUR EUROPÄISCHEN MODERNE 25/2017 Im Auftrag der Hugo von Hof manns thal-Gesellschaft herausgegeben von Maximilian Bergengruen · Alexander Honold · Gerhard Neumann Ursula Renner · Günter Schnitzler · Gotthart Wunberg Rombach Verlag Freiburg https://doi.org/10.5771/9783968216850, am 29.09.2021, 03:03:45 Open Access - http://www.nomos-elibrary.de/agb © 2017, Rombach Verlag KG, Freiburg im Breisgau 1. Auflage. Alle Rechte vorbehalten Typographie: Friedrich Pfäfflin, Marbach Satz: TIESLED Satz & Service, Köln Herstellung: Rombach Druck- und Verlagshaus GmbH & Co. KG, Freiburg i. Br. Printed in Germany ISBN 978–3–7930–9902–4 https://doi.org/10.5771/9783968216850, am 29.09.2021, 03:03:45 Open Access - http://www.nomos-elibrary.de/agb Inhalt Klaus E. Bohnenkamp »Wir haben diesen Dichter geliebt …« Hugo von Hofmannsthal und Eduard Korrodi Briefe und Dokumente 7 Heinz Rölleke »Und immer weht der Wind« Hofmannsthal und das alttestamentarische Buch »Kohelet« 121 Daniel Hilpert »Mein Fleisch heißt Lulu« Eugenik und Sexualpathologie in Frank Wedekinds »Die Büchse der Pandora. Eine Monstretragödie« (1894) 137 Johannes Ungelenk Rainer Maria Rilkes
    [Show full text]
  • South Florida Gay News Getsocial
    local name CHECK OUT THE NEW WMG global coverage BEGINS ON PAGE 33 July 19, 2017 vol. 8 // issue 29 south florida gay news GETSOCIAL From local advocacy to international groups, fi nd your niche in an ever-growing community UNDERWEAR PRODUCES BIG COWBOY REMINISCES ABOUT BUCKS FOR LOCAL CHARITY VILLAGE PEOPLE CAREER PAGE 8 PAGE 47 SOUTHFLORIDAGAYNEWS SOFLAGAYNEWS SFGN.COM 7.19.2017 • 1 NEWS international southFloridaGaynews.com Chechnya. July 19, 2017 • volume 8 • issue 29 2520 n. Dixie highway • wilton Manors, Fl 33305 Phone: 954-530-4970 Fax: 954-530-7943 Publisher • norm Kent [email protected] chief executive offi cer • Pier Angelo Guidugli associate Publisher / executive editor • Jason Parsley [email protected] editorial art Director • Brendon Lies [email protected] Designer • Max Kagno Digital content Director • Brittany Ferrendi [email protected] associate editor • Jillian Melero [email protected] copyeditor • Kerri Covington arts/entertainment editor • JW Arnold [email protected] social Media Manager • Tucker Berardi [email protected] NEWSPAPER RELEASES NAMES OF Food/travel editor • Rick Karlin Gazette news editor • Michael d'Oliveira hiv editor • Sean McShee MURDERED GAY CHECHENS senior Photographer • J.R. Davis [email protected] Brittany Ferrendi senior Features correspondents Jesse Monteagudo • Tony Adams correspondents Dori Zinn • Andrea Richard • Donald Cavanaugh • Christiana Lilly • Denise Royal • ed up with a reportedly insincere shot in the night between January 25 and 26. Russian LGBT Network told International
    [Show full text]
  • Proposal: Sigma-Protocols
    Proposal: Σ-protocols Stephan Krenn1 and Michele Orr`u2 1 AIT Austrian Institute of Technology, Vienna, Austria 2 University of California, Berkeley, United States Abstract. Over the last years, zero-knowledge proofs of knowledge based on Σ-protocols have found numerous applications. However, up to date there is still a lack of standardization of such protocols, potentially hin- dering even broader deployment, and increasing the risk of insecure im- plementations. This document proposes a standardization effort for non- interactive Σ-protocols in prime order groups, allowing for AND and OR composition, either in compact (challenge, response) or batchable form (commitment, response). The document provides the necessary formal background, specifies the protocols in full details, provides examples, suggests concrete instantiations (e.g., regarding the selection of elliptic curves or hash functions), and provides guidelines to ease the secure and compatible implementation of Σ-protocols. Keywords: Zero-knowledge proofs of knowledge · Σ-protocols. 1 Introduction Zero-knowledge [GMR89] proofs of knowledge [BG93] allow a prover to convince a verifier that he knows a secret piece of information, without revealing anything else that what is already revealed by the claim it- self. Many practically relevant proof goals can be realized using so-called Σ-protocols, or their non-interactive counterparts, which can be proven secure in the random oracle model without the need for a common ref- erence string. Introduced by Schnorr [Sch91] over 30 years ago, they are now widely used in practice because of their simplicity, maturity, and versatility. Σ-protocols played an essential component in the building of a number of cryptographic constructions, such as anonymous credentials [CMZ14], password-authenticated key exchange [HR11], signatures [Sch90], ring signatures [MP15], blind signatures [PS97], multi signatures [NRSW20], threshold signatures [KG20] and more.
    [Show full text]
  • Security of Cryptosystems Against Power-Analysis Attacks
    Thales Communications & Security École Normale Supérieure Laboratoire Chiffre Équipe Crypto École doctorale Sciences Mathématiques de Paris Centre – ED 386 Spécialité : Informatique Thèse de doctorat Security of Cryptosystems Against Power-Analysis Attacks Spécialité : Informatique présentée et soutenue publiquement le 22 octobre 2015 par Sonia Belaïd pour obtenir le grade de Docteur de l’École normale supérieure devant le jury composé de Directeurs de thèse : Michel Abdalla (CNRS et École normale supérieure) Pierre-Alain Fouque (Université de Rennes 1 et Institut universitaire de France) Rapporteurs : Louis Goubin (Université de Versailles Saint-Quentin en Yvelines) Elisabeth Oswald (University of Bristol, Royaume-Uni) Examinateurs : Gilles Barthe (IMDEA Software, Espagne) Pascal Paillier (CryptoExperts) Emmanuel Prouff (ANSSI) François-Xavier Standaert (Université catholique de Louvain-la-Neuve, Belgique) Invités : Éric Garrido (Thales Communications & Security) Mehdi Tibouchi (NTT Secure Platform Lab, Japon) Remerciements Je présente en premier lieu mes sincères remerciements à mes deux directeurs de thèse Michel Abdalla et Pierre-Alain Fouque. Je les remercie sincèrement de m’avoir donné l’opportunité de réaliser cette thèse à l’ENS en parallèle de mon travail chez Thales et de m’avoir guidée tout au long de ces trois ans. Je les remercie pour leurs idées précieuses, leurs enseignements, leurs encouragements, et la liberté qu’ils m’ont octroyée dans mon travail de recherche. Je tiens ensuite à remercier Éric Garrido qui m’a accueillie au sein du laboratoire Crypto de Thales Communications & Security. Il m’a accordé sa confiance en me confiant un poste d’ingénieur mais a également fait tout son possible pour m’accorder le temps nécessaire à mon projet de thèse.
    [Show full text]
  • Exploring Crypto-Physical Dark Matter and Learning with Physical Rounding Towards Secure and Efficient Fresh Re-Keying
    IACR Transactions on Cryptographic Hardware and Embedded Systems ISSN 2569-2925, Vol. 2021, No. 1, pp. 373–401. DOI:10.46586/tches.v2021.i1.373-401 Exploring Crypto-Physical Dark Matter and Learning with Physical Rounding Towards Secure and Efficient Fresh Re-Keying Sébastien Duval, Pierrick Méaux, Charles Momin, and François-Xavier Standaert UCLouvain, ICTEAM, Crypto Group, Louvain-la-Neuve, Belgium [email protected] Abstract. State-of-the-art re-keying schemes can be viewed as a tradeoff between efficient but heuristic solutions based on binary field multiplications, that are only secure if implemented with a sufficient amount of noise, and formal but more expensive solutions based on weak pseudorandom functions, that remain secure if the adversary accesses their output in full. Recent results on “crypto dark matter” (TCC 2018) suggest that low-complexity pseudorandom functions can be obtained by mixing linear functions over different small moduli. In this paper, we conjecture that by mixing some matrix multiplications in a prime field with a physical mapping similar to the leakage functions exploited in side-channel analysis, we can build efficient re-keying schemes based on “crypto-physical dark matter”, that remain secure against an adversary who can access noise-free measurements. We provide first analyzes of the security and implementation properties that such schemes provide. Precisely, we first show that they are more secure than the initial (heuristic) proposal by Medwed et al. (AFRICACRYPT 2010). For example, they can resist attacks put forward by Belaid et al. (ASIACRYPT 2014), satisfy some relevant cryptographic properties and can be connected to a “Learning with Physical Rounding” problem that shares some similarities with standard learning problems.
    [Show full text]
  • Extracting Smart Contracts Tested and Verified in Coq
    Extracting Smart Contracts Tested and Verified in Coq Danil Annenkov Mikkel Milo [email protected] [email protected] Concordium Blockchain Research Center, Aarhus Concordium Blockchain Research Center, Aarhus University, Denmark University, Denmark Jakob Botsch Nielsen Bas Spitters [email protected] [email protected] Concordium Blockchain Research Center, Aarhus Concordium Blockchain Research Center, Aarhus University, Denmark University, Denmark Abstract 1 Introduction We implement extraction of Coq programs to functional Smart contracts are programs running on top of a blockchain. languages based on MetaCoq’s certified erasure. As part of They often control large amounts of cryptocurrency and can- this, we implement an optimisation pass to remove unused not be changed after deployment. Unfortunately, many vul- arguments of functions and constructors, making integration nerabilities have been discovered in smart contracts and this with the (often polymorphic) extracted code easier. This has led to huge financial losses (e.g. TheDAO, Parity’s multi- pass is proven correct over a weak call-by-value operational signature wallet). Therefore, smart contract verification is semantics that fits well with many functional languages. crucially important. Functional smart contract languages are We argue that our extraction pipeline applies generally to becoming increasingly popular: e.g. Simplicity [35], Liquid- these functional languages with a small trusted computing ity [8], Plutus [10], Scilla [39] and Midlang1. A contract in base of only MetaCoq and the pretty-printers into these such a language is just a function from a message type and languages. We apply this to two functional smart contract a current state to a new state and a list of actions (trans- languages, Liquidity and Midlang, which are respectively fers, calls to other contracts), making smart contracts more similar to Ocaml and Elm.
    [Show full text]
  • Maximizing the Success Rate in Deep Learning Side-Channel Analysis
    Ranking Loss: Maximizing the Success Rate in Deep Learning Side-Channel Analysis Gabriel Zaid1,2, Lilian Bossuet1, François Dassance2, Amaury Habrard1 and Alexandre Venelli2 1 Univ Lyon, UJM-Saint-Etienne, CNRS Laboratoire Hubert Curien UMR 5516 F-42023, Saint-Etienne, France, [email protected] 2 Thales ITSEF, Toulouse, France, [email protected] Abstract. The side-channel community recently investigated a new approach, based on deep learning, to significantly improve profiled attacks against embedded systems. Compared to template attacks, deep learning techniques can deal with protected implementations, such as masking or desynchronization, without substantial pre- processing. However, important issues are still open. One challenging problem is to adapt the methods classically used in the machine learning field (e.g. loss function, performance metrics) to the specific side-channel context in order to obtain optimal results. We propose a new loss function derived from the learning to rank approach that helps preventing approximation and estimation errors, induced by the classical cross-entropy loss. We theoretically demonstrate that this new function, called Ranking Loss (RkL), maximizes the success rate by minimizing the ranking error of the secret key in comparison with all other hypotheses. The resulting model converges towards the optimal distinguisher when considering the mutual information between the secret and the leakage. Consequently, the approximation error is prevented. Furthermore, the estimation error, induced by the cross-entropy, is reduced by up to 23%. When the ranking loss is used, the convergence towards the best solution is up to 23% faster than a model using the cross-entropy loss function.
    [Show full text]
  • Extracting Smart Contracts Tested and Verified in Coq
    Extracting Smart Contracts Tested and Verified in Coq Danil Annenkov Mikkel Milo [email protected] [email protected] Concordium Blockchain Research Center, Aarhus Department of Computer Science, Aarhus University, University, Denmark Denmark Jakob Botsch Nielsen Bas Spitters [email protected] [email protected] Concordium Blockchain Research Center, Aarhus Concordium Blockchain Research Center, Aarhus University, Denmark University, Denmark Abstract Keywords: smart contracts, blockchain, Coq, proof assis- We implement extraction of Coq programs to functional tants, code extraction, formal verification, property-based languages based on MetaCoq’s certified erasure. As part of testing, certified programming, software correctness this, we implement an optimisation pass removing unused ACM Reference Format: arguments. We prove the pass correct wrt. a conventional Danil Annenkov, Mikkel Milo, Jakob Botsch Nielsen, and Bas Spit- call-by-value operational semantics of functional languages. ters. 2021. Extracting Smart Contracts Tested and Verified in Coq. We apply this to two functional smart contract languages, In Proceedings of the 10th ACM SIGPLAN International Conference Liquidity and Midlang, and to the functional language Elm. on Certified Programs and Proofs (CPP ’21), January 18ś19, 2021, Our development is done in the context of the ConCert frame- Virtual, Denmark. ACM, New York, NY, USA, 17 pages. https://doi. work that enables smart contract verification. We contribute org/10.1145/3437992.3439934 a verified boardroom voting smart contract featuring max- 1 Introduction imum voter privacy such that each vote is kept private ex- cept under collusion of all other parties. We also integrate Smart contracts are programs running on top of a blockchain.
    [Show full text]