1. Trang chủ
  2. » Công Nghệ Thông Tin

Mastering blockchain distributed lodger technology, decentralization, and smart contracts explained 2nd edition

647 1K 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 647
Dung lượng 26,93 MB

Nội dung

Mastering Blockchain Second Edition Distributed ledger technology, decentralization, and smart contracts explained Imran Bashir BIRMINGHAM - MUMBAI Mastering Blockchain Second Edition Copyright © 2018 Packt Publishing All rights reserved No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews Every effort has been made in the preparation of this book to ensure the accuracy of the information presented However, the information contained in this book is sold without warranty, either express or implied Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals However, Packt Publishing cannot guarantee the accuracy of this information Acquisition Editors: Ben Renow-Clarke, Suresh M Jain Project Editor: Suzanne Coutinho Content Development Editor: Alex Sorrentino Technical Editor: Bhagyashree Rai Indexer: Tejal Daruwale Soni Graphics: Tom Scaria Production Coordinator: Aparna Bhagat First published: March 2017 Second edition: March 2018 Production reference: 1290318 Published by Packt Publishing Ltd Livery Place 35 Livery Street Birmingham B3 2PB, UK ISBN 978-1-78883-904-4 www.packtpub.com mapt.io Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career For more information, please visit our website Why subscribe? Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals Improve your learning with Skill Plans built especially for you Get a free eBook or video every month Mapt is fully searchable Copy and paste, print, and bookmark content PacktPub.com Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy Get in touch with us at service@packtpub.com for more details At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks Contributors About the author Imran Bashir has an M.Sc in Information Security from Royal Holloway, University of London, and has a background in software development, solution architecture, infrastructure management, and IT service management He is also a member of the Institute of Electrical and Electronics Engineers (IEEE) and the British Computer Society (BCS) Imran has sixteen years' of experience in the public and financial sectors He worked on large scale IT projects in the public sector before moving to the financial services industry Since then, he has worked in various technical roles for different financial companies in Europe's financial capital, London He is currently working for an investment bank in London as Vice President in the Technology department I would like to thank the talented team at Packt, including Ben Renow-Clarke, Suzanne Coutinho, Alex Sorrentino, Gary Schwartz, and Bhagyashree Rai, who provided prompt guidance and valuable feedback throughout this project I am also extremely thankful to the reviewer, Pranav Burnwal, who provided constructive and very useful feedback that helped me tremendously to improve the material in this book I thank my wife and children for putting up with my all-night and weekend-long writing sessions Above all, I would like to thank my parents, whose blessings have made everything possible for me About the reviewer Pranav Burnwal has a background in Research and Development, and he has been working with cutting-edge technologies for the past few years The technologies he works on range from blockchain, big data, analytics (log and data), cloud, to message queues, NoSQL, web servers, and so on He has worked across various domains ranging from BFSI, HLS, FMCG, and automobiles to name a few Pranav is an active community member in multiple communities He is the Regional Head for Blockchain Education Network (BEN), a registered NGO and a worldwide network of people of blockchain He has also organized multiple meetups and a start-up weekend in India Pranav has also been an active trainer in the blockchain space for an exciting period of three years now, for an audience ranging from junior developers to senior VPs This has also given him insights into how people understand a new and complex technology, which helped him frame this book in the best interest of the readers Packt is searching for authors like you If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea Table of Contents Preface Chapter 1: Blockchain 101 The growth of blockchain technology Distributed systems The history of blockchain and Bitcoin Electronic cash Blockchain Blockchain defined Peer-to-peer Distributed ledger Cryptographically-secure Append-only Updateable via consensus Generic elements of a blockchain How blockchain works How blockchain accumulates blocks Benefits and limitations of blockchain Tiers of blockchain technology Features of a blockchain Types of blockchain Distributed ledgers Distributed Ledger Technology Public blockchains Private blockchains Semiprivate blockchains Sidechains Permissioned ledger Shared ledger Fully private and proprietary blockchains Tokenized blockchains Tokenless blockchains Consensus Consensus mechanism Types of consensus mechanisms Consensus in blockchain CAP theorem and blockchain Summary Chapter 2: Decentralization Decentralization using blockchain 8 12 14 14 16 16 16 17 17 17 17 20 23 23 24 26 27 30 31 31 32 32 32 33 33 33 34 34 34 35 35 36 36 39 41 42 42 Table of Contents Methods of decentralization Disintermediation Contest-driven decentralization Routes to decentralization How to decentralize The decentralization framework example Blockchain and full ecosystem decentralization Storage Communication Computing power and decentralization Smart contracts Decentralized Organizations Decentralized Autonomous Organizations Decentralized Autonomous Corporations Decentralized Autonomous Societies Decentralized Applications (DApps) Requirements of a Decentralized Application Operations of a DApp DApp examples KYC-Chain OpenBazaar Lazooz Platforms for decentralization Ethereum MaidSafe Lisk Summary Chapter 3: Symmetric Cryptography Working with the OpenSSL command line Introduction Mathematics Set Group Field A finite field Order An abelian group Prime fields Ring A cyclic group Modular arithmetic Cryptography Confidentiality Integrity Authentication [ ii ] 44 45 45 47 48 49 49 50 51 52 53 54 54 55 55 56 56 56 57 57 57 57 57 58 58 58 59 60 60 61 62 62 62 62 63 63 63 63 63 63 64 64 65 65 65 Table of Contents Entity authentication Data origin authentication Non-repudiation Accountability Cryptographic primitives Symmetric cryptography Stream ciphers Block ciphers Block encryption mode Electronic Code Book Cipher Block Chaining Counter mode Keystream generation mode Message authentication mode Cryptographic hash mode Data Encryption Standard Advanced Encryption Standard How AES works Summary Chapter 4: Public Key Cryptography Asymmetric cryptography Integer factorization Discrete logarithm Elliptic curves Public and private keys RSA Encryption and decryption using RSA Elliptic Curve Cryptography Mathematics behind ECC Point addition Point doubling Discrete logarithm problem in ECC RSA using OpenSSL RSA public and private key pair Private key Public key Exploring the public key Encryption and decryption Encryption Decryption ECC using OpenSSL ECC private and public key pair Private key Private key generation Hash functions Compression of arbitrary messages into fixed-length digest Easy to compute Preimage resistance Second preimage resistance [ iii ] 66 66 67 67 68 69 69 70 71 72 72 73 73 73 74 74 74 75 79 80 80 83 83 83 84 84 86 86 86 87 90 93 95 95 95 96 98 98 98 99 99 99 100 100 103 103 103 103 104 Table of Contents Collision resistance Message Digest Secure Hash Algorithms Design of Secure Hash Algorithms Design of SHA-256 Design of SHA-3 (Keccak) OpenSSL example of hash functions Message Authentication Codes MACs using block ciphers Hash-based MACs Merkle trees Patricia trees Distributed Hash Tables Digital signatures RSA digital signature algorithm Sign then encrypt Encrypt then sign Elliptic Curve Digital Signature Algorithm How to generate a digital signature using OpenSSL ECDSA using OpenSSL Homomorphic encryption Signcryption Zero-Knowledge Proofs Blind signatures Encoding schemes Financial markets and trading Trading Exchanges Orders and order properties Order management and routing systems Components of a trade The underlying instrument General attributes Economics Sales Counterparty Trade life cycle Order anticipators Market manipulation Summary Chapter 5: Introducing Bitcoin Bitcoin 104 105 105 106 106 108 109 109 109 110 111 111 112 113 113 114 115 115 117 118 120 121 121 122 122 123 123 124 124 124 125 125 125 125 126 126 126 127 127 128 129 132 134 135 136 143 144 145 Bitcoin definition Bitcoin – a bird's-eye view Sending a payment to someone Digital keys and addresses Private keys in Bitcoin Public keys in Bitcoin [ iv ] blocks, accumulating 23, 24 working 23 blockchain, history about 16 defined 16 electronic cash 14, 15 tokenized blockchains 34 blockchain, types about 30 distributed ledger technology 31 distributed ledgers 31 fully private and proprietary blockchains 34 permissioned ledger 33 private 32 public 32 semi-private 32 shared ledger 33 sidechains 33 token-less blockchains 34 blockchain about 8, 161, 500 and CAP theorem 39, 40 append-only 17 benefits 24, 25 BigchainDB 520 challenges 592 convergence, with other industries 603 cryptographically-secure 17 distributed ledger 17 distributed systems 12, 13 emerging trends 582 features 27, 28, 29 future 604 growth 8, 9, 10, 11 history 14 Kadena 501, 502 layman's definition 16 limitations 25 MaidSafe 520 miscellaneous tools 601 MultiChain 521 notable projects 597 peer-to-peer 16 Quorum 515 Ripple 506 Rootstock 514 Stellar 513 Storj 519 technical definition 16 technology, tiers 26, 27 Tendermint 521 Tezos 517 updateable 17, 18, 20 bloom filter 188 brain wallets 191 brokers 123 BTC Relay reference 230 BTC TOP reference 176 BTC reference 176 Burrow about 463 reference 463 Byzantine node 12 C calldata 399 CAP theorem about 13 and blockchain 39, 40 Capital Gains Tax (CGT) 593 Casper about 324, 600 reference 324, 600 Cello about 464, 598 reference 464 centralized systems 44 certificate authority (CA) 480 CEX reference 200 Chain Core 22 chain of blocks 16 Chain Virtual Machine (CVM) 22 chaincode services about 475 APIs 476 CLIs 476 [ 611 ] events 475 secure container 475 secure registry 475 chained hashing scheme 218 challenges, blockchain technology dark side 594, 595 regulation 592, 593 Chicago Mercantile Exchange (CME) 129 churning 520 Cipher Block Chaining (CBC) 72, 109 ciphers 61 client software about 336 account, funding with bitcoin 342 Eth 336 Eth installing 337 Geth 336, 340 geth console 341 installing 337 light clients 337 Mist browser 338, 339, 340 parity 336 parity installing 343, 344, 345 Pyethapp 336 coinbase transaction 159 CoinJoin 572 Collateralized Coin (CollCo) 597 colored coin wallets reference 228 Colu reference 228 command-line interface 211 compilers about 378 Solidity compiler 378 components, Corda CorDapp 497 network map service 495 nodes 494 notary service 495 Oracle service 495 permissioning service 494 transactions 495 vaults 496 Composer about 465 reference 465 confidential transactions 573 confidentiality 65 connectors 512 consensus mechanism, Kadena 502, 503 consensus protocol 22 consensus about 35 in blockchain 36, 38, 39 mechanism 35 mechanism, types 36 consortia 587 Contract Accounts (CAs) 289 contract code 492 contract deployment, Web3 411 contract development and deployment about 392 testing 394 writing step 392 contracts 159 Corda distributed application (CorDapp) 497 Corda about 491 architecture 492 components 494 development environment 497, 498 Cosmos reference 522 Counterparty about 229 reference 230 CPU mining 173 cryptographic primitive, of blind signatures reference 130 cryptographic primitives about 68 Advanced Encryption Standard 74 Data Encryption Standard 74 symmetric cryptography 69 cryptography about 61, 64 asymmetric cryptography 80 [ 612 ] D DAO hack 485 DAPPLE about 602 reference 602 Dark Gravity Wave (DGW) 224 Data Encryption Standard (DES) 74 decentralization, methods about 44 contest-driven decentralization 45 disintermediation 45 decentralization, platforms about 57 Ethereum 58 Lisk 58 Maidsafe 58 decentralization, routes about 47, 48 framework example 49 decentralization blockchain used 42 Decentralized Anonymous Payment scheme (DAP scheme) 248 Decentralized Applications (DApps) 56, 347 Decentralized Autonomous Corporations (DACs) 55 Decentralized Autonomous Societies 55 decentralized consensus 44 decentralized organizations about 54 autonomous 54 autonomous societies 55 DAPP examples, KYC-Chain 57 DAPP examples, Lazooz 57 DAPP examples, OpenBazaar 57 DAPP, examples 57 DAPP, operations 56 decentralized application, requisites 56 decentralized system 44 Delegated Proof of Stake (DPoS) 38 Denial of Service (DoS) attack 227, 485 deployment transactions 477 deterministic wallets 190 development frameworks, Web3 about 426 distributed ledgers 460 IPFS 456 Oracles 454 Truffle 426 Difficulty Time Bomb 324 DigiShield 224 Digital Rights Management (DRM) 29, 606 digital rights management (DRM) 486 Digital Signature Algorithm (DSA) 115 digital signatures about 82, 113 generating, OpenSSL used 117 Digital Trade Chain (DTC) 587 Directed Acyclic Graph (DAG) 50, 330, 591 discrete logarithm problem in ECC 93 discrete logarithm scheme 83 disintermediation 45 Distributed Artificial Intelligence (DAI) 603 Distributed Denial of Service (DDOS) 349 Distributed Hash Tables (DHTs) 50, 112, 519 Distributed Ledger Technology (DLT) 31 distributed ledger application model 481 applications on blockchain 478 Block Header 474 Block Metadata 474 chaincode implementation 479 chaincode services 475 channels 477 clients 477 components, of fabric 476 crypto service provider 478 ledger storage 475 Membership Service Provider (MSP) 477 onsensus mechanism 481 orderer nodes 476 peer to peer protocol 474 peers 476 smart contracts 478 transaction 474 transaction life cycle 482, 483 transactions 477 world state database 477 [ 613 ] distributed ledgers 460 distributed systems 44 Domain Name System (DNS) 233 Domain-specific languages (DSLs) 270 E ECC, with OpenSSL about 99 private key 100 private key, generating 100 ecosystem decentralization about 49 communication 51 computing power 52 storage 50 electronic cash accountability 14 anonymity 14 blind signatures 14 signatures sharing 14 Electronic Code Book (ECB) 72 Electronic Frontier Foundation (EFF) 74 Electronic Government as a Service (EgaaS) 592 Electrum reference 190 Elements Porject reference 573 elliptic curve 83 Elliptic Curve (EC) pairing 308 Elliptic Curve Cryptography (ECC) about 63, 86, 143 discrete logarithm problem 93 point addition 87, 89 point doubling 90 Elliptic Curve Diffie-Hellman (ECDH) 84, 86 Elliptic Curve Digital Signatures Algorithm (ECDSA) about 84, 86, 115 with OpenSSL 118 elliptic curves algorithm 83 Embark about 602 reference 602 embedded consensus 229 emerging trends, blockchain technology about 582 alternatives, to blockchains 591 application-specific blockchains (ASBCs) 583 Blockchain as a Service 592 consortia 587 convergence 588 cryptoeconomics 589 education of blockchain technology 588 efforts, to reduce electricity consumption 592 employment 589 enhancements 586, 587 enterprise-grade blockchains 583 hardware research and development 590 interoperability efforts 591 new programming languages 590 private blockchains 583 real-world implementations 587 research, in cryptography 589 research, in formal methods and security 591 solution, to technical challenges 588 standardization 585, 586 start-ups 584 strong research interest 584 encoding schemes 122 enrollment certificate authority (E-CA) 472 enrollment certificates (E-Certs) 472 Enterprise Ethereum Alliance (EEA) 11 enterprise-grade blockchains 583 epoch 330 ERC20 tokens 259 Eris 522, 523 Ethash about 330 benchmarking 333 CPU mining 331 GPU mining 332 mining pools 335 mining rigs 334 Ether currency (ETH) 54 Ethereum blockchain languages 378 Ethereum ecosystem, components about 286 account state 297, 298 accounts 287 accounts, types 288, 289 [ 614 ] calls 295 content creation transaction 292 Ether cryptocurrency/tokens (ETC and ETH) 300 Ethereum Virtual Machine (EVM) 301 execution environment 303, 304 iterator function 305, 306 keys and addresses 287 machine state 304, 305 message call transaction 294 messages 294, 295 state storage, in Ethereum blockchain 296 transaction receipts 298 transaction, execution 296 transaction, substate 296 transaction, validation 296 transactions 289, 291 world state 297 Ethereum network about 284 Mainnet 284 private net 285 Testnet 285 Ethereum Request for Comments 259 Ethereum virtual machine (EVM) 485 Ethereum Virtual Machine (EVM) 22, 274, 378 Ethereum birds eye view 280, 282, 283 blockchain 279 mathematical symbols 278 tools 384 yellow paper 277 EthereumJS 385 European Union Agency for Network and Information Security (ENISA) 593 events, Solidity 402 Everledger reference 583 exchanges 124 execution modes, Pact contract definition 504 querying 504 transaction execution 504 Extendable Output Functions (XOFs) 108 extended protocols, on top of Bitcoin colored coins 228 counterparty 229 Externally Owned Accounts (EOAs) 288 F Fabric about 462, 471 reference 462 Falcon 600 Federated Byzantine Agreement (FBA) 38, 513 fee schedule 326 Feistel cipher 70 Field Programmable Gate Array (FPGA) 173, 590 finance industry, IoT about 555 financial crime prevention 557, 558 insurance 556 post-trade settlement 556, 557 Financial Conduct Authority (FCA) 593 financial markets 123 forks 327 Frama-C reference 574 full nodes 179 Fully Homomorphic Encryption (FHE) 121 function types, Solidity external functions 398 internal functions 398 functions, Solidity 404 G Galois fields 63 Ganache about 386 download link 387 Gas 325 general-purpose programming languages (GPLs) 270 genesis block 19, 164 genesis transaction 266 google RPC (gRPC) 474 government, Internet of Things (IoT) about 550 border control 550, 551, 552 citizen identification (ID cards) 553, 554 [ 615 ] miscellaneous 554 voting 553 GPU mining 173 Greedy Heaviest Observed Subtree (GHOST) 328, 564 GreenAddress reference 192 H Hardware Description Languages (HDLs) 173 hardware of security modules (HSMs) 469 hardware wallets 191 hash functions about 103 collision resistance 104 compression of arbitrary messages, into fixedlength digest 103 digital signatures 113 Distributed Hash Tables 112 easy to compute 103 Merkle trees 111 Message Digest (MD) 105 OpenSSL example 109 Patricia trees 111 preimage resistance 103 Hash-based MACs (HMACs) 110 Hawk 599 hiding 573 Hierarchical Deterministic (HD) wallets 190 homomorphic encryption 120, 570 HydraChain 517 Hyperledger Fabric about 471 blockchain services 473 consensus services 473 design goals 468 distributed ledger 473 membership services 472 ordering services 473 requirements 468 Hyperledger about 461 as protocol 465 blockchain projects 461 projects 461 reference architecture 466 I IC3 about 585 reference 585 Ice Age 324 Indistinguishability Obfuscation (IO) 569 Indy about 464 reference 464 Information and Communication Technology (ICT) 43 INFURA 603 inheritance, Solidity 402 Initial Block Download Node (IBD Node) 185 Initial Coin Offerings (ICOs) 134, 257 Initial Public Offering (IPO) 257 Initialization Vector (IV) 72 innovation, in Bitcoin about 196 advanced protocols 196 Bitcoin Cash 198 Bitcoin Gold (BTG) 199 Bitcoin Improvement Proposals (BIPs) 196 Bitcoin Unlimited 198 Segregated Witness (SegWit) 197 integer factorization schemes 83 Integrated Development Environments (IDEs), Solidity about 381 Remix 381, 382 integrity 65 Inter Blockchain Communication (IBC) 522 Inter-Process Communications (IPC) 359 Interledger Control Protocol (ILCP) 512 Interledger Protocol (ILP) 512 Interledger Quoting Protocol (ILQP) 512 Interledger about 511 application layer 511 Interledger layer 512 ledger layer 512 reference 511 transport layer 512 [ 616 ] International Civil Aviation Organization (ICAO) 550 Internet of Things (IoT) about 526 finance industry 555 government 550 health industry 555 media industry 558 Internet Service Providers (ISPs) 51 InterPlanetary File System (IPFS) 50 Invertible Bloom Lookup Tables (IBLTs) 564 investment 351 invocation transactions 477 IoT blockchain experiment about 532, 534, 536, 537 circuit 543, 544, 546, 547, 549, 550 first node setup 537 Node.js, installing 540 Raspberry Pi node setup 538, 539 IoT network about 527 application layer 528, 529, 530, 531, 532 device layer 527 management layer 528 network layer 528 physical object layer 527 IPFS about 456 installing 457, 458, 459 Iroha about 463 reference 463 J Jaxx reference 190 JSONRPC interface 417 JSRE (JavaScript runtime environment) 435 K Kademlia 519 Kadena about 501, 502 consensus mechanism 502, 503 keyed hash functions 109 Kimoto Gravity Well (KGW) 223 Know Your Customer (KYC) 133, 258, 557 L languages, for Ethereum blockchain about 378 Low-level Lisp-like Language (LLL) 378 Mutan 378 Serpent 378 Solidity 378 Vyper 378 Last In, First Out (LIFO) 155, 301 layout, Solidity source code file comments 408 import 407 version pragma 407 Legal Knowledge Interchange Format (LKIF) 264 legal prose 492 libraries, Solidity 403 Linux Solidity compiler (Solc), installing on 378 Litecoin 240, 243 Litecoin wallet download link 244 literals, Solidity hexadecimal literals 397 integer literals 397 string literals 397 Low-Level Lisp-like Language (LLL) 311 Lumens 513 M M-of-N MultiSig 149, 157 Machine Readable Travel Document (MRTD) 550 Machine Readable Zone (MRZ) 551 Machine-to-Machine (M2M) communication 603 macOS Solidity compiler (Solc), installing on 379 MaidSafe 58, 520 market manipulation 127 market order 125 markets capital markets 123 [ 617 ] credit markets 123 money markets 123 mathematics, cryptography abelian group 63 about 62 cyclic group 63 field 62 finite field 63 group 62 modular arithmetic 64 order 63 prime fields 63 ring 63 set 62 memory hard computational puzzles 217 Merkle root 19, 111 Merkle trees 111 Merkle-Damgard construction 105 Merkle-Patricia tree 111 mesh networks 51 Message Authentication Codes (MACs) about 66, 103, 109 Hash-based MACs (HMACs) 110 with block ciphers 109 Message Digest (MD) functions 105 MetaCoin project 427 MetaMask about 387, 388, 389, 601 reference 387, 601 Meteor about 602 reference 602 MimbleWimble 573 miners about 328 tasks 168 mini private key format 144 minikey 144 mining 167 mining algorithm about 169 flowchart 170 hash rate 172 mining guide, Zcash address generation 254 GPU mining 255 mining methods, bitcoin about 172 ASICs 174 CPU 173 FPGA 173 GPU 173 mining pool 175, 177 mining rewards 168 mining rigs 334 miscellaneous tools, blockchain DAPPLE 602 Embark 602 INFURA 603 MetaMask 601 Meteor 602 solidity extension, for Microsoft Visual Studio 601 stratis 601 uPort 603 Mist running, on private net 364, 366 used, for deploying contracts 367, 370 mobile wallets 192 modulus 64 Multi-Interval Difficulty Adjustment System (MIDAS) 225 Multi-Party Non-Repudiation (MPNR) 67 MultiChain about 521 reference 521 multifactor authentication 66 N Namecoin about 233 obtaining 235, 237, 238 records, generating 239 services 234 trading 235 Near Field Communication (NFC) 572 NEM reference 258 Next Generation (NG) protocol 598 nheqminer compiling 255 [ 618 ] downloading 255 NiceHash reference 255 Node.js installing, on Raspberry Pi 540, 541 requisites 541 node about 12, 327 consensus mechanism 329 starting up, in regtest 208 starting up, in testnet 208 nodes, Ripple network user nodes 507 validator nodes 507 non-deterministic wallets 190 non-repudiation 67 nonce 19 notable projects, blockchain Bitcoin-NG 598 Bletchley 600 Casper 600 Cello 598 CollCo 597 Falcon 600 Hawk 599 Qtum 598 SETLCoin 599 Solidus 598 TEEChan 599 Town-Crier 599 Zcash on Ethereum 597 null data script 158 O off-chain solutions 561 offer price 124 ommers 329 on-chain solutions 561 one-way pegged sidechain 33 online wallets 192 OP_RETURN script 158 Open Web Payment Scheme (OWPS) 511 OpenSSL command line working with 60 OpenSSL example of hash functions 109 OpenSSL used, for generating digital signature 117 opportunistic caching 520 Optimistic Transport Protocol (OTP) 512 Oracles about 454, 455 reference 454 Oraclize API reference 456 order anticipators 127 order properties 124 order routing systems 124 orderer 473 ordering services, Hyperledger Fabric Kafka 473 SOLO 473 orders 124 Over-The-Counter (OTC) 123 Oyente about 578, 580 reference 574 P Pact execution modes 504 smart contract 504 paper wallets about 191 reference 191 Partially Homomorphic Encryption (PHE) 120 Password-Based Key Derivation Function (PBKDF) 240 Patricia trees 111 Pay to Pubkey 157 Pay to Public Key Hash (P2PKH) 157 Pay to Script Hash (P2SH) 157 Pay-per-Share (PPS) model 176 Peer-to-Peer (P2P) file sharing 106 peers, distributed ledger committing peers 476 endorsing peers 476 submitters 476 pervasive determinism 506 Plasma [ 619 ] about 569 reference 569 point addition 87 point doubling 87, 90 point of infinity 87 pool hopping 222 pool protocol servers 180 POST requests, Web3 417 Practical Algorithm to Retrieve Information Coded in Alphanumeric (Patricia) 111 Practical Byzantine Fault-Tolerance (PBFT) 12, 524 precompiled contracts 306 Primecoin about 244 mining guide 246, 247 trading 245 privacy about 569 CoinJoin 572 confidential transactions 573 confidentiality 572 homomorphic encryption 570 Indistinguishability Obfuscation 570 MimbleWimble 573 secure multiparty computation 571 security 574 state channels 571 Zero-knowledge Proofs 571 private blockchains 584 private key 84 private keys, Bitcoin 144 private net 354 private net setup data directory 357 flags 357 genesis file 355 network ID 355 static nodes 358 private network about 358, 359, 360, 362, 363 block explorer, for private net/local Ethereum block explorer 372, 373 contracts deploying, Mist used 367, 368, 370, 371 Mist, running 364, 365 programming languages about 311 Low-level Lisp-like Language (LLL) 311 Solidity 311 progress freeness 217 projects, Hyperledger Burrow 463 Cello 464 Composer 465 Explorer 464 Fabric 462 Indy 464 Iroha 463 Quilt 465 Sawtooth Lake 462 Proof of Activity (PoA) 38 Proof of Burn (PoB) 33 Proof of Capacity (PoC) 39, 231 Proof of Deposit (PoD) 38 Proof of Elapsed Time (PoET) 38, 484, 590 Proof of Importance (PoI) 38 Proof of Stake (PoS) 33, 37, 220, 564 Proof of Storage (PoS) 39, 220 Proof of Work (PoW) about 15, 37, 131, 169, 566 alternatives 217, 218, 220 protocols about 348 Swarm 349 Whisper 348 pruning 562 Pseudo-random Numbers Generator (PRNGs) 103 public key 84 public keys, Bitcoin 145 public-key cryptography about 15, 80 discrete logarithm 83 elliptic curves 83 integer factorization 83 security mechanisms 82 publish/subscribe (pub/sub) mechanism 519 [ 620 ] Q Qtum about 598 reference 598 Quasar 519 Quilt about 465 reference 465 quorum voting 487 Quorum about 515 Crypto Enclave 516 download link 517 network manager 516, 517 QuorumChain 516 transaction manager 516 R RACE Integrity Primitives Evaluation Message Digest (RIPEMD) 106 Radix tree 111 Redundant Byzantine Fault Tolerance (RBFT) 464 reference architecture, Hyperledger about 466, 467 APIs 467 communication layer 467 consensus layer 467 data stores 467 policy services 467 SDKs 467 security and crypto layer 467 smart contract layer 467 reference types, Solidity arrays 398 data location 399 mappings 399 structs 399 regulation, Bitcoin reference 134 Remix about 381 reference 381 Remote Procedure Call (RPC) 185, 286 requirements, Hyperledger Fabric auditability 469 confidentiality 468, 469 deterministic transactions 469 identity 469 interoperability 470 modular approach 468 portability 470 privacy 468, 469 rich data queries 470 scalability 469 Reusable Proof of Work (RPoW) 131 Ricardian contracts about 265, 266, 268 DAO 274 Oracles 270, 271, 272 smart contract templates 269, 270 smart contracts, deploying on blockchain 273 smart Oracles 273 Ricardo 265 Ripple Protocol Consensus Algorithm (RPCA) 507 Ripple about 506 collection phase 508 components 508 consensus phase 508 ledger closing phase 508 nodes 507 transactions 509 Rivest–Shamir–Adleman (RSA) about 84 decryption, performing 86 encryption, performing 86 private key 95 public key 96, 98 with OpenSSL 95 Rootstock Virtual Machine (RVM) 515 Rootstock about 514 drivechain 515 reference 515 sidechain 514 RSA digital signature algorithm about 113 encrypt then sign approach 115 sign then encrypt approach 114 [ 621 ] RSA key pair generating 85 RSA, with OpenSSL decryption 99 encryption 98 runtime bytecode about 312 arithmetic operations 312 block information 315 cryptographic operations 314 duplication operations 317 environmental information 314 exchange operations 317 flow operations 316 logging operations 318 logical operations 313 opcodes 312 push operations 316 stack 316 storage 316 system operations 318 S sales 126 Sawtooth Lake about 462, 484 consensus 487 development environment 487, 488, 489, 490, 491 PoET 484 reference 462 transaction families 485 Sawtooth_bond reference 487 scalability about 350, 561 block interval reduction 563 block size increase 563 consensus plane 562 Invertible Bloom Lookup Tables (IBLTs) 564 network plane 561 private blockchain 566 Proof of Work (PoW) 566 sharding 564 sidechains 566 state channels 564 storage plane 562 view plane 562 Scrypt 240, 242 secret key cryptography 69 Secure Hash Algorithms (SHAs) design 106 RACE Integrity Primitives Evaluation Message Digest (RIPEMD) 106 SHA-0 105 SHA-1 105 SHA-2 105 SHA-3 106 Whirlpool 106 Securities and Exchange Commission (SEC) 134, 258 security mechanisms, public-key cryptography decryption 82 digital signatures 82 encryption 82 identification 82 key establishment 82 security about 574 smart contract security 574 Segregated Witness (SegWit) 197, 568 Serpent 311 SETLCoin 599 SHA-0 105 SHA-1 105 SHA-2 105 SHA-256 design 106 SHA-3 about 106 design 108 shared key cryptography 69 sidechains about 566 Bitcoin-NG 568, 569 block propagation 568 Plasma 569 subchains 566 tree chains (trees) 567 signcryption 121 [ 622 ] Simple Payment Setup Protocol (SPSP) 511 Simple Payment Verification (SPV) 179, 336 Single Board Computer (SBC) 532 single-factor authentication 66 smart contract security about 574, 575 formal verification and analysis 576, 577 Oyente tool 578 smart contracts, Pact keysets 504 modules 504 tables 504 smart contracts about 53, 261, 306 defining 262, 263, 264, 265 native contracts 307, 308 SNARK 571 Software Guard Extension (SGX) 572, 590 Solidity compiler (Solc) about 378 installing, on Linux 378 installing, on macOS 379 solidity extension, for Microsoft Visual Studio about 601 reference 601 Solidity about 311, 394 events 402 functions 404 inheritance 402 libraries 403 reference 311 source code file, layout 407 types 395 Solidus about 598 reference 598 sponge and squeeze construction 108 sponge construction 106 stack types nonoutsourceable puzzles 221 proof of activity 221 proof of burn 221 proof of coinage 220 proof of deposit 221 Stellar Consensus Protocol (SCP) 513 Stellar about 513 reference 258 Storj 519 Storjcoin X (SJCX) 519 Stratis about 601 reference 601 stream ciphers 69 Substitution-Permutation Network (SPN) 70 Sumeragi 463 Swarm about 459 reference 349 symmetric cryptography block ciphers 70 stream ciphers 69 T TEEChan 599 Tendermint Core 521 Tendermint Socket Protocol (TMSP) 521, 522 Tendermint about 521 reference 522 test networks 353 Tezos about 517 reference 517 Time-Memory Trade-Off (TMTO) 241 TLSNotary about 455 reference 456 tools and libraries, Ethereum about 384 EthereumJS 385 Node version 385 topics 519 Town-Crier 599 trade life cycle 126 trade ticket 125 trade counterparty 126 economics 125 [ 623 ] general attributes 125 underlying instrument 125 trading 123, 350 transaction 19 transaction data structure about 152 inputs 154 metadata 153 outputs 154 script language 155 verification 155 transaction families 462 transaction malleability 161 transaction pool 150, 152 transactions, Corda attachments 496 commands 496 input references 496 output states 496 signatures 496 summaries 496 timestamp 496 type 496 transactions, Ripple about 509 account and security-related 510 order related 510 payment related 510 transactions about 150 coinbase transactions 159 contracts 159 fee 151 life cycle 150 MultiSig (Pay to MultiSig) 157 null data/OP_RETURN 158 Pay to Pubkey 157 Pay to Public Key Hash (P2PKH) 157 Pay to Script Hash (P2SH) 157 verification process 160 Transport Layer Security (TLS) 233, 494, 547 Trezor reference 190 Truffle about 390, 426 example 438, 439, 440, 441 initializing 426, 427, 428, 429, 430, 432, 433, 434, 435 installing 391 interaction, with contract 435, 436, 437, 438 Proof of Idea, example project 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454 reference 390 Trusted Execution Environment (TEE) 572 two-way pegging 514 types, Solidity control structures 400, 401 enums 397 function types 398 global variables 400 literals 397 reference types 398 value types 395 U Uniform Resource Identifier (URI) 193 Unique Node List (UNL) 507 Universal Transport Protocol (UTP) 512 Unspent Transaction Output (UTXO) 154, 198 uPort about 603 reference 603 V Value Added Tax (VAT) 593 value types, Solidity address 396 Boolean 395 integers 395 virtual read-only memory (virtual ROM) 301 Vitalik Buterin reference 276 Vyper about 311 reference 311 [ 624 ] W Wallet Import Format (WIF) 144 wallets about 189 brain wallets 191 deterministic wallets 190 hardware wallets 191 Hierarchical Deterministic (HD) wallets 190 mobile wallets 192 non-deterministic wallets 190 online wallets 192 paper wallets 191 Web3 JavaScript API 347 web3.js installation availability, checking 422 contract functions 423, 425 example 420, 422 performing 419 web3 object, creating 422 Web3 about 409, 410 contract deployment 410, 412, 413, 414, 415, 416, 417 development frameworks 426 HTML 418 JavaScript frontend 418 POST requests 417, 418 WebAssembly (WASM) 302 Weierstrass equation 86 Whirlpool 106 Whisper about 348, 460 reference 348 Why3 reference 574, 577 Wireshark reference 187 X XBTerminal 193 Z Zcash on Ethereum 597 Zcash about 248 mining guide 250, 252 reference 253 trading 250 Zcoin reference 174 Zero-Knowledge Proofs (ZKP) 121, 131, 228, 553, 571 Zero-knowledge Succinct Non-Interactive Argument of Knowledge (ZK-SNARK) 122, 248 Zero-knowledge Succinct Transparent Argument of Knowledge (ZK-STARKs) 571 .. .Mastering Blockchain Second Edition Distributed ledger technology, decentralization, and smart contracts explained Imran Bashir BIRMINGHAM - MUMBAI Mastering Blockchain Second Edition. .. of a blockchain How blockchain works How blockchain accumulates blocks Benefits and limitations of blockchain Tiers of blockchain technology Features of a blockchain Types of blockchain Distributed. .. Chapter 1: Blockchain 101 The growth of blockchain technology Distributed systems The history of blockchain and Bitcoin Electronic cash Blockchain Blockchain defined Peer-to-peer Distributed

Ngày đăng: 02/03/2019, 10:34

TỪ KHÓA LIÊN QUAN