Index
Symbols
- % (modulo) operator, Modulo Arithmetic
- * (multiplication) operator, Coding Multiplication in Python
- ** operator, Coding Exponentiation in Python
- + (addition) operator, Coding Addition and Subtraction in Python
- == operator, Constructing a Finite Field in Python
- >> (right bit-shift) operator, Version
- __add__ method, Coding Addition and Subtraction in Python
- __eq__ method, Constructing a Finite Field in Python
- __floordiv__ method, Finite Field Division
- __init__ method, Constructing a Finite Field in Python
- __mul__ method, Coding Multiplication in Python
- __ne__ method, Constructing a Finite Field in Python
- __pow__ method, Coding Exponentiation in Python, Redefining Exponentiation
- __rmul__ method, Coding Scalar Multiplication
- __sub__ method, Coding Addition and Subtraction in Python
- __truediv__ method, Finite Field Division
- ∈ (element of) symbol, Finite Field Addition and Subtraction
A
- acknowledgments, Acknowledgments-Acknowledgments
- addition (+) operator, Coding Addition and Subtraction in Python
- additive inverse, Finite Field Definition
- address format, Address Format
- addresses, reusing, Constructing the Transaction, Hierarchical Deterministic Wallets
- amount field (outputs), Outputs
- AntMiner S9, How a Miner Generates New Hashes
- Armory, Hierarchical Deterministic Wallets
- associativity, Math of Point Addition, Associativity
- asymmetric problems, Scalar Multiplication Redux
- attributions, Using Code Examples
B
- backup and restoration, Mnemonic Seeds
- bare multisig, Bare Multisig-Problems with Bare Multisig
- Base58, Base58-Transmitting Your Public Key
- Base64, Transmitting Your Public Key
- Bech32 standard, Transmitting Your Public Key
- big-endian encoding, Uncompressed SEC Format, Big- and Little-Endian Redux
- binary expansion, Coding Scalar Multiplication
- binary trees, Merkle Block
- BIP (Bitcoin Improvement Proposals)
- BIP0009, Version
- BIP0012, Pay-to-Script-Hash (p2sh)
- BIP0016, Pay-to-Script-Hash (p2sh), Pay-to-Script-Hash (p2sh), p2sh-p2wpkh, p2sh-p2wsh
- BIP0032, Hierarchical Deterministic Wallets
- BIP0034, BIP0034
- BIP0037, BIP0037 Bloom Filters
- BIP0039, Mnemonic Seeds
- BIP0044, Hierarchical Deterministic Wallets
- BIP0065, Locktime, Version
- BIP0066, Version
- BIP0068, Version
- BIP0091, Version
- BIP0112, Version, Version
- BIP0113, Version, Timestamp
- BIP0141, Version, Pay-to-Witness-Pubkey-Hash (p2wpkh), Pay-to-Witness-Script-Hash (p2wsh)
- BIP0143, Step 3: Append the hash type, Pay-to-Witness-Pubkey-Hash (p2wpkh), Coding p2wpkh and p2sh-p2wpkh, Other Improvements, Utility Library
- BIP0173, Transmitting Your Public Key, p2sh-p2wpkh
- Bitcoin
- approach to learning, Preface
- developer of, Acknowledgments
- downloading and installation, Setting Up-Setting Up
- open source projects, Contributing
- opportunities for developers, Finding a Job
- overview of components, Finite Fields
- prerequisites to learning, What Do I Need to Know?
- suggested next projects, Suggested Next Projects
- target audience, Who Is This Book For?
- topics covered, How Is the Book Arranged?
- Bitcoin wallets, Motivation, Wallets, Testnet Wallet
- Bitcoin-based shops, Web Shop
- block explorers, Transaction Components, Constructing the Transaction, Block Explorer
- block rewards, Coinbase Transactions
- blockchain data structure, Previous Block
- blocks
- Bits field, Bits
- blockchain data structure, Previous Block
- coinbase transactions, Coinbase Transactions
- difficulty adjustment period, Difficulty Adjustment
- getting block headers, Getting Block Headers
- headers versus full blocks, Block Headers
- looking for proof-of-work, Proof-of-Work
- Merkle blocks, Merkle Block-Using Flag Bits and Hashes
- Merkle root, Merkle Root
- nonce field, Nonce
- purpose of, Blocks
- timestamps, Timestamp
- versions, Version
- Bloom filters
- BOLT standard, Payment Channels and Lightning Network
- breadth-first ordering, Merkle Block
- broadcast networks, Networking
C
- checksum algorithm, Network Messages
- closure, Closure
- code examples, obtaining and using, Using Code Examples
- coinbase transactions, Coinbase Transactions
- Coinomi, Hierarchical Deterministic Wallets
- comments and questions, How to Contact Us
- commutativity, Math of Point Addition, Commutativity
- contact information, How to Contact Us
D
- Denial of Service attack (DoS) attacks, Mechanics of Script, Merkle Tree
- depth-first ordering, Merkle Block
- DER (Distinguished Encoding Rules) Signature format, DER Signatures
- deterministic wallets, Hierarchical Deterministic Wallets
- developers, opportunities for, Finding a Job
- difficulty adjustment period, Difficulty Adjustment
- discrete log problem, Scalar Multiplication for Elliptic Curves, Constructing the Transaction
- Distinguished Encoding Rules (DER), DER Signatures
- double-spending, preventing, Checking the Spentness of Inputs, Blocks
E
- ECDSA (Elliptic Curve Digital Signature Algorithm), Inscribing the Target
- Edge, Hierarchical Deterministic Wallets
- Electrum, Hierarchical Deterministic Wallets
- element of (∈) symbol, Finite Field Addition and Subtraction
- elements, Defining Finite Sets
- elliptic curve cryptography
- elliptic curves over finite fields, Elliptic Curves over Finite Fields-Coding Elliptic Curves over Finite Fields
- elliptic curves over real numbers, Elliptic Curves over Reals
- mathematical groups, Mathematical Groups-Associativity
- point addition over finite fields, Point Addition over Finite Fields-Coding Point Addition over Finite Fields
- public key cryptography, Public Key Cryptography
- role in Bitcoin, Finite Fields
- scalar multiplication coding, Coding Scalar Multiplication
- scalar multiplication for elliptic curves, Scalar Multiplication for Elliptic Curves-Scalar Multiplication Redux
- secp256k1 curve, Defining the Curve for Bitcoin-Working with secp256k1
- signing and verification, Signing and Verification-Programming Message Signing
- Elliptic Curve Digital Signature Algorithm (ECDSA), Inscribing the Target
- elliptic curves
- environment setup, Setting Up-Setting Up
- Ethereum, Mechanics of Script
- example code
- exercises
- answers to, Answers
- Chapter 1: Finite Fields, Chapter 1: Finite Fields
- Chapter 2: Elliptic Curves, Chapter 2: Elliptic Curves
- Chapter 3: Elliptic Curve Cryptography, Chapter 3: Elliptic Curve Cryptography
- Chapter 4: Serialization, Chapter 4: Serialization
- Chapter 5: Transactions, Chapter 5: Transactions
- Chapter 6: Script, Chapter 6: Script
- Chapter 7: Transaction Creation and Validation, Chapter 7: Transaction Creation and Validation
- Chapter 8: Pay to Script Hash, Chapter 8: Pay to Script Hash
- Chapter 9: Blocks, Chapter 9: Blocks
- Chapter 10: Networking, Chapter 10: Networking
- Chapter 11: Simplified Payment Verification, Chapter 11: Simplified Payment Verification
- Chapter 12: Bloom Filters, Chapter 12: Bloom Filters
- environment setup, Setting Up-Setting Up
- unit tests, Setting Up
M
- magic bytes, Network Messages
- malleability, Transaction Malleability
- mathematical tools
- median-time-past (MTP), Timestamp
- mempool transactions, Transaction Fee
- Merkle blocks
- Merkle parent level, Merkle Parent Level
- Merkle root, Merkle Root, Merkle Root-Merkle Root in Blocks
- Merkle trees
- mining, Proof-of-Work
- mnemonic seeds, Mnemonic Seeds
- modulo arithmetic, Modulo Arithmetic-Modulo Arithmetic in Python
- multiplication (*) operator, Coding Multiplication in Python
- multiplicative inverse, Finite Field Definition
- multisig (multiple signatures)
- murmur3 hash function, BIP0037 Bloom Filters
N
- networking
- nonce field, Nonce
O
- open source projects, Contributing
- OpenSSL library, Problems with p2pk
- OP_0 operation, Bare Multisig
- OP_16 operation, Bare Multisig
- OP_2 operation, Pay-to-Script-Hash (p2sh)
- OP_9 operation, Scripts Can Be Arbitrarily Constructed
- OP_ADD operation, Scripts Can Be Arbitrarily Constructed
- OP_CHECKLOCKTIMEVERIFY operation, Locktime, Version
- OP_CHECKMULTISIG operation, Bare Multisig-Coding OP_CHECKMULTISIG
- OP_CHECKSEQUENCEVERIFY operation, Version
- OP_CHECKSIG operation, Example Operations, p2pk, Checking the Signature, Making the Transaction
- OP_DUP operation, How Script Works, Making the Transaction
- OP_EQUAL operation, Scripts Can Be Arbitrarily Constructed, Pay-to-Script-Hash (p2sh)
- OP_EQUALVERIFY operation, p2pkh, Making the Transaction
- OP_EVAL operation, Pay-to-Script-Hash (p2sh)
- OP_HASH160 operation, Example Operations, Making the Transaction, Coding p2sh
- OP_HASH256 operation, Coding Opcodes
- OP_MUL operation, Utility of Scripts
- OP_PUSHDATA1 operation, Parsing the Script Fields
- OP_PUSHDATA2 operation, Parsing the Script Fields, More Complicated Scripts
- OP_PUSHDATA4 operation, Parsing the Script Fields
- order (size), Defining Finite Sets
- outputs, Outputs, Checking the Sum of the Inputs Versus the Sum of the Outputs
P
- p2pk (pay-to-pubkey)
- p2pkh (pay-to-pubkey-hash), Solving the Problems with p2pkh-p2pkh
- p2sh (pay-to-script-hash)
- p2sh-p2wpkh nested transactions, p2sh-p2wpkh-Coding p2wpkh and p2sh-p2wpkh
- p2sh-p2wsh nested transactions, p2sh-p2wsh-Coding p2wsh and p2sh-p2wsh
- p2wpkh (pay-to-witness-pubkey-hash)
- p2wsh (pay-to witness-script-hash), Pay-to-Witness-Script-Hash (p2wsh)-Coding p2wsh and p2sh-p2wsh
- payment channels, Transaction Malleability, Payment Channels and Lightning Network
- peer-to-peer network, Networking
- point addition
- point at infinity, Math of Point Addition
- Point class, Coding Elliptic Curves in Python
- pow function, Finite Field Division
- privacy issues, reusing addresses, Constructing the Transaction, Hierarchical Deterministic Wallets
- PrivateKey class
- proof-of-work
- proofs of inclusion, Using a Merkle Tree
- public key cryptography
S
- S256Point class
- scalar multiplication
- Schnorr signatures, Pay-to-Script Hash, p2wpkh Transactions
- Script
- combining script fields, Combining the Script Fields
- construction of scripts, Scripts Can Be Arbitrarily Constructed-Scripts Can Be Arbitrarily Constructed
- creating Script objects, Parsing Script
- example operations, Example Operations
- mechanics of, Mechanics of Script
- operation of, How Script Works
- parsing script fields, Parsing the Script Fields-Coding a Script Parser and Serializer
- SHA-1 piñata, SHA-1 Piñata
- standard scripts, Standard Scripts
- utility of, Utility of Scripts
- ScriptPubKey field (outputs), Outputs
- ScriptPubKeys
- ScriptSig field (inputs), Inputs, Transaction Malleability
- SEC serialization format
- secp256k1 curve, Definition, Defining the Curve for Bitcoin-Working with secp256k1
- Segwit (segregated witness)
- self.__class__ method, Coding Addition and Subtraction in Python
- sequence field (inputs), Inputs
- serialization
- address format, Address Format
- Base58, Base58
- big- and little-endian encodings, Uncompressed SEC Format, Big- and Little-Endian Redux
- compressed SEC format, Compressed SEC Format
- DER Signature format, DER Signatures
- transmitting public keys, Transmitting Your Public Key
- uncompressed SEC format, Uncompressed SEC Format, Problems with p2pk
- WIF format, WIF Format
- SHA-1 piñata, SHA-1 Piñata
- sha256 operation, Address Format
- SIGHASH_ALL, Step 3: Append the hash type
- signature algorithm, Inscribing the Target
- Signature class
- signature hash, Inscribing the Target, Step 3: Append the hash type
- signing and verification
- purpose of, Finite Fields, Signing and Verification
- serializing signatures, DER Signatures
- signature algorithm, Inscribing the Target
- signature creation, Creating a Signature-Programming Message Signing
- signature hash, Inscribing the Target, Step 3: Append the hash type
- signature verification, Verifying a Signature-Programming Signature Verification, Checking the Signature-Step 3: Append the hash type
- signing process, Signing in Depth, Signing the Transaction-Creating Your Own Transactions on testnet
- verification process, Verification in Depth
- Simplicity, p2wpkh Transactions
- Simplified Payment Verification (SPV)
- slope, Point Addition for When x1≠x2
- smart contract language, Script
- SPV (Simplified Payment Verification)
- Standard for Efficient Cryptography (see SEC format)
T
- targets, The Target
- testnet, Address Format, Creating Your Own Transactions on testnet, Testnet Wallet
- third parties, minimizing risk of, Transaction Fee
- timestamps, Timestamp
- time_differential number, Difficulty Adjustment
- transaction malleability, Transaction Malleability
- transactions
- coding transactions, Coding Transactions
- combining to make, Making the Transaction
- creating, Creating Transactions-Constructing the Transaction
- creating transaction class (Tx), Transaction Components
- input component, Inputs-Parsing Script
- locktime component, Locktime
- output component, Outputs
- overview of, Transactions-Transaction Components
- role in Bitcoin, Finite Fields
- signing, Signing the Transaction-Creating Your Own Transactions on testnet
- transaction fees, Transaction Fee, Constructing the Transaction
- validating, Validating Transactions-Step 3: Append the hash type
- verifying entire transaction, Verifying the Entire Transaction
- version component, Version
- transactions of interest, collecting, Getting Transactions of Interest
- Trezor, Hierarchical Deterministic Wallets
- trusted third parties, Transaction Fee
- Turing completeness, Mechanics of Script, Pay-to-Script-Hash (p2sh)
- TxFetcher class, Transaction Fee
- typographical conventions, Conventions Used in This Book