An introduction to Blockchain and Distributed Ledger Technology - Orange Labs Pluridisciplinary Analysis of Collective Decision

Page created by Frederick Ryan
 
CONTINUE READING
An introduction to Blockchain and
Distributed Ledger Technology

Orange Labs
Jacques Traoré
August 27-30th 2019

              Pluridisciplinary Analysis of Collective Decision
                                   Making
Outline

   What is a Blockchain?

   Bitcoin as an example

   An introduction to cryptography (short and non-technical)

   Proof of Work in Practice

   Other consensus protocols

   Other types of Blockchain

   Pros and Cons of the Blockchain Technology

   Conclusion
Blockchain and DLT: some definitions (1)
Blockchain and DLT: some definitions (2)
Blockchain in a Nutshell

A blockchain is…

- A database,
- That records transactions carried out in Bitcoin or another
  cryptocurrency
- Managed in a distributed manner on top of a P2P network,
- Secured by a consensus protocol,
- In which management costs are balanced by incentives
1   Cryptography
Definitions
• crypto = κρυπτός = “hidden, secret”

• cryptography = cryptology = « science of secret » or
  « science of trust »

• Crossroads between art, science, research and
  industry, mathematics and computer science
Attacks

                       Alice

eavesdrop         modify

              impersonate
Main goals of cryptography

• data confidentiality (privacy)

• data/entity authentication (it came from where it
  claims)

• data integrity (it has not been modified on the way)
Cryptography

Confidentiality                  Authentication
                         data                  entity

Encryption           Signature         Authentication

  06&'è_§                                     Alice
  jf63G4%
                                        1 rue Lewis Carroll
  É"'-$çz5               Alice
                                        Pays des Merveilles

                         À!&#
Cryptography is everywhere…
         CARTE BANCAIRE
         LE 20/10/94 12:01
         MONETEL
         DUPONT
         19987 19701 7
         490010000000397116
         901     12/95
         05 004 81 1 00
         08D0 A095912097
         AUTORISATION : 1377
         MONTANT : 255,00FF

         MERCI

                                   Monétel

                 1      2      3   F

                 4      5      6
                 7      8      9
                        0
2 Public-Key Cryptography
Principle
• asymmetric cryptography = public-key cryptography
  (discovered – officially – in 1976)

• In Bitcoin the ECDSA signature scheme is used
How does it works?
• Asymmetric cryptography exists because
  “asymmetric” problems exist
• Example (integer factorization) :
   – it is easy to compute the product of two large (prime) integers,
     however…

   – … it is hard, given only the product, to find its factorization
     (retrieve the two prime integers )

       100 895 598 169 = ………….. × ……………… ?
Integer factorization

100 895 598 169 = 898 423 × 112 303

    Number of digits   Time with 100 million of PC
          200                   5,6 days
          300                  228 years
          450              17 million of years
          600           610 000 million of years
Cryptographic Hash Function (I)

   Hash Function: Mathematical function with following 3         x (arbitrary size)

    properties:
        The input can be any string of any size

        It produces a fixed-size output (say 256-bit long)

        Is efficiently computable (say, O(n) for n-bit string)            y (fixed-
                                                                             size)

   Such general hash functions can be used to build hash tables, but they
    are not of much use in cryptocurrencies like Bitcoin.

   What we really need are cryptographic hash functions!
Cryptographic Hash Function (II)

   Basic Fact: a collision-resistant hash function is practically infeasible to
    invert (a.k.a. a one-way function).

                                        easy

                                      difficult

   The Standard Hash Algorithm (SHA-256) is used in the Bitcoin system
Collision Resistance ?!
But a cryptographic hash function is clearly not injective so
collisions do exist…

Right but we do not know how to find them efficiently…
Cryptographic Puzzles (I)
   A cryptographic puzzle is a “moderately” hard problem for which we
    can estimate the time required to solve it.
Cryptographic Puzzles (II)


   Bitcoin mining consists in solving such a cryptographic puzzle
Context

•   September 15th, 2008: Bankruptcy of Lehman Brothers

•   Distrust of the financial world

•   Satoshi Nakamoto proposes to get rid of central authoritiespasser d’autorité centrale

                            •   lancement du Bitcoin le 01/01/09

                           Launch of Bitcoin on January 01, 2009
Transaction Life Cycle
Alice’s Bank
Account
Balance: +530€

                 Alice’s Bank   Merchant’s Bank

                                          Transaction
                    Alice
                                  Merchant
Bitcoin Blockchain in a Nutshell

 Users
       form a P2P network communicating over the Internet
       own a cryptographic key pair (private SK /public PK) to sign their transactions in BTC

 Transaction
       similar to an electronic check
       « I undersigned X (PKX) pay to Y (PKY) the two BTC I’ve obtained from transaction Tz : Signed by X »

 Blockchain
       a ledger, managed in a decentralized way by specific users (called miners), recording all the
        transactions carried out in BTC throughout the world since the creation of the Bitcoin system
       anyone can access or download the current version of this ledger
       updated nearly every 10’ using a consensus protocol between the majority of the participants in
        the system

 Miners
       verify the validity of transactions and are responsible for the integrity of the blockchain
       the updating of the ledger is assigned every 10’ to a randomly chosen miner (the first one who
        succeed in solving a random cryptographic puzzle)
       the winnig miner is rewarded in BTC for its contribution
Structure of a transaction

o       A transaction represents an interaction between parties. With cryptocurrencies, for example, a
        transaction represents a transfer of the cryptocurrency between blockchain network users.

        A transaction between a user X and a user Y is usually made of:

         •   Transaction IDs of previous transactions where X is the recipient
         •   Transaction amount (in BTC)
         •   Transaction fee
         •   Sender’s address (Account number)
         •   Recipient’s address
         •   Signature of sender
         •   Transaction ID of the current transaction (Hash of the information above)

    o    Transactions are broadcasted to the P2P network to be validated by all nodes (miners).
The Bitcoin Transaction Life Cycle
   Alice wants to send 2 BTC to her friend Laura (with 0,01 BTC fees for the winning miner)

   Bob wants to send 1 BTC to his friend Lucie (with 0 BTC fee for the winning miner)

                            Tr100

         Alice                                 Miner C

                           Tr101

          Bob                                  Miner D

   Both transactions are broadcasted to the P2P network by Miners C and D
Mining
   Each miner should check the validity of all the transactions it received and discard the
    invalid ones.
   Valid transactions are then bundled together to form a Block

   A block contains a header, a reference to the previous Block’s hash and a group of valid
    transaction.

                                  Hash (Block t)        Nb

                                Tr100        Tr110      …

                                            Block t+1
Mining – Solving a Cryptographic Puzzle

   Suppose that Miner D would like to update the ledger with his Block

   For that he will have to solve a specific cryptographic puzzle related to his specific Block

          Hash (Block t-1)      Nb                               Hash (block t)       Nb’

          Tr1          Tr2      …                              Tr100        Tr102     …

                     Block t                                             Block t+1
Proof of Stake
An alternative to the Proof of Work is the Proof of Stake:
     • In a PoS system, the creator of a new block is chosen in a
        deterministic way, depending on its wealth also defined as
        stake
     • In a PoS system, there is no block reward, so the miners only
        take the transaction fees
     • PoS systems can be several thousand times more cost effective

•   A controversial consensus protocol
     • only the richest get richer
     • PoS consensus protocols tend to be more prone to network
         centralization

•   Marginal Adoption
     • Peercoin: Market Capitalization = $30 millions (Bitcoin Market
        Cap: $ 174 billions)

•   Proposals of hybrid systems (PoW/PoS) for Ethereum but unlikely
    to be deployed
Proof of Work vs Proof of Stake

   Hash (Block t-1)    Nb         Hash (bloc t)     Nb’

   Tr1          Tr2    …      Tr100         Tr102   …

              Bloc t                     Bloc t+1
Private Blockchain
   A private blockchain is a blockchain which is only accessible to specific members (those
    who are authorized by administrators).

      Advantages:
       more privacy
       level of trust between the members of the network
       mining process is not competitive (no reward)
       consensus is much faster

      Drawbacks:
       Not fully decentralized
Applications
 Internet Voting

 Notarization / Time-Stamping

 Electronic Lotteries

 International Transfers

 Smart contracts

 …and many other applications
Intrinsic Limitations of a Public Blockchain
 Cost :
       Bitcoin’s energy consumption for mining equals that of Switzerland
       Structurally more expensive than a centralized system

 Decentralization:
       Miners tends to pool their computing resources together
       Two mining pools control close to 50% of the bitcoin network’s computing power
 Security
       a dishonest entity that would like to create a new version of the blockchain must have a
        computational power greater that the one of other miners  the system is secure unless
        more than 50% of miners are honest
       recent result  the control of 33% of the bitcoin network’s computing power is enough
       an entity (a state) having enough money may take the control of the blockchain

 Privacy
       Bitcoin is anonymous!
       a key per user, used at each transaction  protection equivalent to a pseudonym
       all transactions are published in the blockchain  can be a problem for some
        applications where the data are sensitive (health, private individual data, confidential
        data in companies…)

 Time required to validate a transaction:
       At least 10’ for a transaction to be confirmed
       Not suitable for proximity payments!
Blockchain and DLT: some definitions (1)
Blockchain and DLT: some definitions (2)
Conclusion

•   Blockchain provides an innovative solution to a complex problem:

                           How to build trust without a (central) authority?

•   Decentralization has a cost (mining) which may have stong impacts for the systems using
    this technology

•   There are very few promising use cases where this technology would make sense (except
    for cryptocurrencies)

•   Their status regarding current regulations (GDPR) is not fully clear
3   Appendix
Fork

                           Tr 1

                           Tr 2

                         Block N+2   Block N+3

   Block N   Block N+1
Fork

                           Tr 1

                           Tr 2

                         Block N+2    Block N+3

                            Tr 1

   Block N   Block N+1      Tr 3

                          Bloc N’+2
You can also read