Welcome to the CYP201 course, where we will explore in depth the workings of HD Bitcoin wallets. This course is designed for anyone who wants to understand the technical basics of using Bitcoin, whether they are casual users, enlightened enthusiasts, or future experts.
The goal of this training is to give you the keys to master the tools you use daily. HD Bitcoin wallets, which are at the heart of your user experience, are based on sometimes complex concepts, which we will try to make accessible. Together, we will demystify them!
Before diving into the details of the construction and operation of Bitcoin wallets, we will start with a few chapters on the cryptographic primitives to know for what follows.
We will start with cryptographic hash functions, fundamental for both wallets and the Bitcoin protocol itself. You will discover their main characteristics, the specific functions used in Bitcoin, and in a more technical chapter, you will learn in detail about the workings of the queen of hash functions: SHA256.
Next, we will discuss the operation of digital signature algorithms that you use every day to secure your UTXOs. Bitcoin uses two: ECDSA and the Schnorr protocol. You will learn which mathematical primitives underlie these algorithms and how they ensure the security of transactions.
Once we have a good understanding of these elements of cryptography, we will finally move on to the heart of the training: deterministic and hierarchical wallets! First, there is a section dedicated to mnemonic phrases, these sequences of 12 or 24 words that allow you to create and restore your wallets. You will discover how these words are generated from a source of entropy and how they facilitate the use of Bitcoin.
The training will continue with the study of the BIP39 passphrase, the seed (not to be confused with the mnemonic phrase), the master chain code, and the master key. We will see in detail what these elements are, their respective roles, and how they are calculated.
Finally, from the master key, we will discover how cryptographic key pairs are derived in a deterministic and hierarchical manner up to the receiving addresses.
This training will enable you to use your wallet software with confidence, while enhancing your skills to identify and mitigate risks. Prepare to become a true expert in Bitcoin wallets!
This table provides you with a translation of the main English terms used, to help you better understand the diagrams and technical documents used in the CYP 201 course.
| English | Translation / Explanation |
| pubkey hash | Public key hash (used to generate a Bitcoin address). |
| public key | Public key (used to receive funds, derived from the private key). |
| signature | Digital signature (cryptographic proof that a message comes from the holder of a private key). |
| scriptPubKey | Locking script (defines the conditions to spend an output). |
| scriptSig | Unlocking script (provides the data to satisfy the scriptPubKey). |
| Stack | Execution stack (data structure used by Bitcoin Script). |
| input | Transaction input (reference to a previous output used as source). |
| output | Transaction output (defines the recipient and the amount). |
| transaction | Bitcoin transaction (set of inputs and outputs validating a transfer). |
| XOR | Logical operator "exclusive OR", used in some cryptographic schemes. |
| HMAC | Message authentication code based on a hash and a secret key. |
| ECDSA | Elliptic Curve Digital Signature Algorithm. |
| hash | Hash (unique and fixed fingerprint of data). |
| SigHash | Signature hash type (defines which parts of a transaction are signed). |
| HD Wallet | Hierarchical deterministic wallet (generates multiple keys from a single seed). |
| Random Number | Random number (used to generate secure private keys). |
| State | State (intermediate value in a cryptographic process). |
| Entropy | Entropy (measure of randomness, used to generate wallet seeds). |
| Mnemonic | Mnemonic (sequence of words making it easier to back up and restore a seed). |
| Wordlist | Wordlist (predefined set used to generate BIP39 mnemonics). |
| Seed | Seed (initial value allowing derivation of all keys in an HD Wallet). |
| Address | Bitcoin address (human-readable identifier for receiving funds, derived from the public key). |
| Leaf | Leaf (terminal node in a derivation tree). |