[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AKNGS0NGQQBBCANMRVM0AT":3,"skill-same:01M7AKNGS0NGQQBBCANMRVM0AT":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7AKNGS0NGQQBBCANMRVM0AT","coin-cryptographic-primitives",null,"Use when choosing a hash function, signature scheme, address format or key-derivation path for a chain, when building Merkle proofs or SPV inclusion checks, or when reviewing a nonce, seed-phrase or multisig design for hazards. Covers hash properties and current status, ECDSA against Schnorr, EdDSA and ring signatures, Merkle trees and the Merkle-Patricia trie, and BIP-32\u002F39\u002F44\u002F380 key derivation. Part 2 of the Building a Cryptocurrency reference.","the-vibey-project\u002Fvibey","the-vibey-project","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F329298758?v=4","01M7AJHGZ9722CTJ4JNQZVRH0Q","the vibey project","01M7AJHGZVMG2K7TGXQ6XFHVG3",5,"MIT","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fbuilding-a-cryptocurrency\u002Fskills\u002Fcoin-cryptographic-primitives\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: coin-cryptographic-primitives\ndescription: \"Use when choosing a hash function, signature scheme, address format or key-derivation path for a chain, when building Merkle proofs or SPV inclusion checks, or when reviewing a nonce, seed-phrase or multisig design for hazards. Covers hash properties and current status, ECDSA against Schnorr, EdDSA and ring signatures, Merkle trees and the Merkle-Patricia trie, and BIP-32\u002F39\u002F44\u002F380 key derivation. Part 2 of the Building a Cryptocurrency reference.\"\n---\n\n# Cryptographic Primitives\n\n> **Part 2 of 8** of the *Building a Cryptocurrency* reference (plugin\n> `building-a-cryptocurrency`), covering §2 — the hashes, signatures, key derivation and commitment schemes a chain is built from. Sibling skills:\n> `coin-what-it-is-and-the-three-architectures` (§1 — the replicated-state-machine definition and the Bitcoin \u002F Ethereum \u002F Monero reference architectures),\n> `coin-consensus-and-finality` (§3 — proof of work, proof of stake, Sybil resistance, fork choice and what finality actually means),\n> `coin-building-a-utxo-chain` (§4 — the UTXO ledger model, script, transaction validation and what a fork of Bitcoin actually involves),\n> `coin-building-an-account-chain` (§5 — the account\u002Fworld-state model, the EVM, gas, and building a chain with smart contracts),\n> `coin-privacy-features` (§6 — ring signatures, stealth addresses, confidential amounts and zero-knowledge approaches),\n> `coin-networking-and-tokenomics` (§7–§8 — peer-to-peer gossip and propagation, then issuance, fees, supply schedules and incentive design),\n> `coin-security-and-the-build-guide` (§9–§10 — what actually loses money, and the ordered guide to building and launching a chain),\n>\n> Section numbers are **shared across the whole set**: a reference written as §N → `skill` points\n> into that sibling skill. This is an engineering reference, **not investment, legal or tax advice** —\n> deploying a chain that handles real value carries securities, AML\u002FKYC and consumer-protection\n> obligations that are a question for counsel in your jurisdiction.\n\n## §2 Cryptographic Primitives: The Building Blocks\n\n**Scope and disclaimer, carried forward from the source document.** This is an engineering\nreference, not investment advice. Creating a cryptocurrency is a legitimate software engineering\nexercise with well-documented open-source reference implementations. However: deploying a\ncryptocurrency that handles real value carries serious legal, financial, and security\nresponsibilities. Consult counsel regarding securities law, AML\u002FKYC requirements, and consumer\nprotection regulations in your jurisdiction before launching anything that distributes tokens to\nthe public. §2 is where key material, addresses and seed phrases are defined, so it is directly\nupstream of every custody and consumer-protection question.\n\nEvery cryptocurrency is built from the same cryptographic primitives. Understanding them deeply\nis essential — not because you will implement them from scratch (you absolutely should not), but\nbecause **every design decision in a cryptocurrency is ultimately a cryptographic decision**.\n\n> **The golden rule of cryptography:** use vetted, well-maintained libraries at the highest level\n> of abstraction that solves your problem. **Never implement primitives yourself.**\n\n### 2.1 Hash functions\n\nA hash function takes arbitrary input and produces a fixed-size output. The required properties:\n\n| Property | What it means |\n|---|---|\n| Deterministic | The same input always gives the same output |\n| Quick to compute | Cheap enough to run on every block, transaction and address |\n| Preimage resistance | Infeasible to reverse — given the output, you cannot recover the input |\n| Second preimage resistance | Infeasible to find a second input with the same output |\n| Collision resistance | Infeasible to find *any* two inputs with the same output |\n\n**Collision resistance is the weakest of these properties and the first to fall.** Design on the\nassumption that it is the property you lose first.\n\nIn cryptocurrencies, hash functions serve three critical roles:\n\n| Role | What it does | Reference practice |\n|---|---|---|\n| Block hashing | The proof-of-work puzzle and the chain linkage (§3 → `coin-consensus-and-finality`) | Bitcoin: SHA-256d (double SHA-256). Ethereum: Keccak-256 (the pre-standardization Keccak variant, distinct from SHA3-256) |\n| Merkle trees | Compact commitment to transaction sets (see 2.3) | Bitcoin: transaction sets per block. Ethereum: Merkle-Patricia trie over full state |\n| Address derivation | Turning public keys into addresses | Bitcoin: RIPEMD-160(SHA-256(pubkey)). Ethereum: Keccak-256 |\n\n#### Hash function status\n\n| Function | Status | Verdict for a new chain |\n|---|---|---|\n| SHA-256 | Secure and well-studied | Natural choice |\n| SHA3-256 (FIPS 202) | Secure and well-studied | Natural choice |\n| Keccak-256 (the pre-standardization variant, Ethereum's) | Secure and well-studied, but **not** SHA3-256 — the padding and domain-separation rules differ, so the two return different digests for the same input | Natural choice, but pick it deliberately. Name which of the two your spec means and check which one your library's `sha3`\u002F`keccak` entry point actually computes; getting this wrong silently breaks Ethereum compatibility |\n| BLAKE2 \u002F BLAKE3 | Faster alternatives with strong security properties | Viable |\n| SHA-1 | **Broken for collisions**; deprecated everywhere that matters | Do not use for any security purpose |\n| MD5 | **Completely broken** — collisions are trivial | Do not use for any security purpose |\n\n#### Length extension attack\n\nSHA-2 uses the Merkle-Damgård construction and is vulnerable to **length extension**: knowing\n`H(m)` lets you compute `H(m + padding + extra)` without knowing `m`. This is why\n`H(key + message)` is **not** a valid MAC construction. SHA-3 and BLAKE are not vulnerable to\nthis. For HMAC, the construction is specifically designed to resist length extension regardless of\nthe underlying hash.\n\n### 2.2 Digital signatures\n\nDigital signatures are the identity system of a cryptocurrency. You sign with your private key;\nanyone can verify with your public key. The signature proves the holder of the private key\nauthorized **the exact bytes that were signed** — and that is the whole of what it proves. It does\nnot make a transaction globally unique: the same signature over the same bytes verifies again,\nlater, and on any other chain that encodes transactions the same way.\n\n**Replay resistance is a property of the ledger, not of the signature.** A UTXO chain gets it\nbecause a transaction names the outputs it consumes and each output can only be consumed once\n(§4 → `coin-building-a-utxo-chain`); an account chain gets it because the signed bytes include the\nsender's nonce, which the state machine increments (§5 → `coin-building-an-account-chain`). Across\nchains and contracts it takes explicit domain separation — a chain ID inside the signed bytes\n(**EIP-155**), an **EIP-712** domain separator, or an equivalent tag. The rule for a new design:\nwhatever must not be replayable has to be inside the bytes you sign.\n\n| Algorithm | Used By | Key Size | Notes |\n|---|---|---|---|\n| ECDSA (secp256k1) | Bitcoin (pre-Taproot), Ethereum | 256-bit | Widely deployed. Requires a per-signature random nonce `k` — reusing `k` across two signatures reveals the private key. This has broken real systems. |\n| Schnorr (secp256k1) | Bitcoin (Taproot, Nov 2021) | 256-bit | Linear and aggregatable (enabling MuSig2 multisig); BIP340 specifies deterministic nonce derivation, but nonce handling remains security-critical. The modern default for new designs. |\n| EdDSA (Ed25519) | Many modern systems | 256-bit | Fast, and hard to misuse: **RFC 8032** derives the per-signature nonce by hashing the private key's prefix together with the message, so no per-signature RNG sits in the path to fail. That is the *derivation* doing the work — a repeated nonce still reveals the key. Ed25519 signs over **edwards25519**, a twisted Edwards curve; **Curve25519** is the birationally equivalent Montgomery curve used by **X25519 key exchange**, which is a different primitive and does not sign. Do not substitute one for the other. Verification strictness (cofactor handling, signature malleability) differs between libraries, so a consensus system must pin one rule and test against it. An excellent default for new cryptocurrencies. |\n| Ring Signatures | Monero | 256-bit | A group of possible signers, but the actual signer is hidden among them. The key privacy primitive for anonymous transactions. |\n\nRing signatures are developed in full — ring size, decoy selection and the FCMP++ upgrade path —\nin §6 → `coin-privacy-features`. Taproot address encoding and the script consequences of Schnorr\nare in §4 → `coin-building-a-utxo-chain`.\n\n> **THE NONCE HAZARD, AND WHY IT IS NOT ONLY ECDSA'S**\n>\n> ECDSA requires a secret per-signature value `k`. If `k` is reused across two signatures with the\n> same key, **simple algebra reveals the private key**. This has broken real systems, including a\n> well-known game console. Even *biased* `k` (not perfectly random) leaks the key over many\n> signatures.\n>\n> The fix is a **specified deterministic derivation**: **RFC 6979** for ECDSA, **BIP340** for\n> Schnorr, **RFC 8032** for Ed25519. Be precise about what that buys. Determinism is a property of\n> the derivation a specification chose, **not of the signature scheme**: Schnorr and Ed25519 are\n> nonce-based too, and a repeated or biased nonce reveals the key there by the same algebra. They\n> are safer because their standard derivation takes the random-number generator out of the path,\n> not because the hazard is absent.\n>\n> **Whichever scheme you use, use its specified derivation and never a homegrown one.** One\n> exception to keep in view: interactive multi-party signing (**MuSig2**, **FROST**) needs a fresh\n> nonce per signing session that is never reused across sessions or retries — single-signer\n> deterministic derivation does not carry over, and reusing a session nonce leaks the key share.\n\n### 2.3 Merkle trees\n\nA Merkle tree is a binary tree of hashes where leaf nodes are hashes of data (transactions) and\neach internal node is the hash of its children. The root hash is a compact cryptographic\ncommitment to the entire dataset. To prove a specific transaction is included in a block you\nprovide a **Merkle proof** — the sibling hashes along the path from the leaf to the root — which is\n**O(log n)** in size. This enables lightweight clients (**SPV**) to verify transaction inclusion\nwithout downloading the entire blockchain.\n\n```\n\u002F\u002F Merkle tree construction (simplified)\nleaves = [hash(tx1), hash(tx2), hash(tx3), hash(tx4)]\nlevel1 = [hash(leaves[0] + leaves[1]), hash(leaves[2] + leaves[3])]\nroot   = hash(level1[0] + level1[1])\n\n\u002F\u002F To prove tx3 is included, provide:\n\u002F\u002F leaf = hash(tx3)\n\u002F\u002F sibling at level 0 = hash(tx4)\n\u002F\u002F sibling at level 1 = hash(leaves[0] + leaves[1])\n\u002F\u002F Verifier hashes up the tree and checks against the known root\n```\n\n| Chain | Structure | What the header commits to |\n|---|---|---|\n| Bitcoin | Merkle tree | Transaction sets within blocks |\n| Ethereum | Merkle-Patricia trie | The entire state — accounts, balances, code, storage — not just the transactions |\n\nEthereum's trie commits the block header to the **full state**, which is what enables **state\nproofs**; those are essential for light clients and bridges. The account\u002Fworld-state model that\ntrie encodes is §5 → `coin-building-an-account-chain`.\n\n### 2.4 Key generation, HD wallets, and seed phrases\n\nEvery user in a cryptocurrency has key pairs. **The private key is the identity**; the public key is\nthe address others send to. Key management is the hardest part of cryptocurrency — not the\ncryptography, but the operational security around storing and using keys (the losses this causes\nare §9–§10 → `coin-security-and-the-build-guide`).\n\n| Standard | What it defines | What to watch |\n|---|---|---|\n| **BIP-39** seed phrases | A human-readable encoding of a master seed — 12–24 words from a defined wordlist | The seed is the backup of the entire wallet: **anyone with the seed has all the keys**. The optional passphrase is a plausible-deniability\u002Fdecoy layer — and a loss vector, since losing it makes the wallet unrecoverable |\n| **BIP-32** hierarchical-deterministic (HD) derivation | From the master seed, a tree of keys is deterministically derived; each branch produces a new key pair | Lets you never reuse addresses — **address reuse damages privacy permanently on transparent ledgers** |\n| **BIP-44 \u002F 49 \u002F 84 \u002F 86** | Standard derivation paths by script\u002Faddress type | Pick paths deliberately; wallets interoperate on these |\n| **Descriptors (BIP-380s)** | Strings such as `wpkh(xpub...\u002F0\u002F*)` that fully describe a wallet's script structure | The modern interchange format between wallet software and signing devices |\n\n> **PRACTICAL KEY MANAGEMENT**\n>\n> For your cryptocurrency, you need to define:\n> 1. **The key derivation scheme** — HD wallet with standard paths.\n> 2. **The address format** — how public keys are encoded as addresses. Bitcoin uses Base58Check\n>    or bech32; Ethereum uses hex with a checksum.\n> 3. **The signature scheme and what exactly a signature commits to** — the sighash flags.\n> 4. **The multi-signature support** — how M-of-N key sets are expressed in the transaction\n>    format.\n\n### 2.5 What §2 decides for the rest of the build\n\n- Hash choice fixes the PoW puzzle and the chain linkage → §3 → `coin-consensus-and-finality`.\n- Signature scheme and address format fix the script and address types → §4 → `coin-building-a-utxo-chain`.\n- Merkle-Patricia state commitment is the precondition for state proofs → §5 → `coin-building-an-account-chain`.\n- Ring signatures and hidden amounts are the privacy path → §6 → `coin-privacy-features`.\n- Every one of these is a decision you make **once**, with vetted libraries, and never by writing\n  the primitive yourself.\n","# Cryptographic Primitives\n\n> **Part 2 of 8** of the *Building a Cryptocurrency* reference (plugin\n> `building-a-cryptocurrency`), covering §2 — the hashes, signatures, key derivation and commitment schemes a chain is built from. Sibling skills:\n> `coin-what-it-is-and-the-three-architectures` (§1 — the replicated-state-machine definition and the Bitcoin \u002F Ethereum \u002F Monero reference architectures),\n> `coin-consensus-and-finality` (§3 — proof of work, proof of stake, Sybil resistance, fork choice and what finality actually means),\n> `coin-building-a-utxo-chain` (§4 — the UTXO ledger model, script, transaction validation and what a fork of Bitcoin actually involves),\n> `coin-building-an-account-chain` (§5 — the account\u002Fworld-state model, the EVM, gas, and building a chain with smart contracts),\n> `coin-privacy-features` (§6 — ring signatures, stealth addresses, confidential amounts and zero-knowledge approaches),\n> `coin-networking-and-tokenomics` (§7–§8 — peer-to-peer gossip and propagation, then issuance, fees, supply schedules and incentive design),\n> `coin-security-and-the-build-guide` (§9–§10 — what actually loses money, and the ordered guide to building and launching a chain),\n>\n> Section numbers are **shared across the whole set**: a reference written as §N → `skill` points\n> into that sibling skill. This is an engineering reference, **not investment, legal or tax advice** —\n> deploying a chain that handles real value carries securities, AML\u002FKYC and consumer-protection\n> obligations that are a question for counsel in your jurisdiction.\n\n## §2 Cryptographic Primitives: The Building Blocks\n\n**Scope and disclaimer, carried forward from the source document.** This is an engineering\nreference, not investment advice. Creating a cryptocurrency is a legitimate software engineering\nexercise with well-documented open-source reference implementations. However: deploying a\ncryptocurrency that handles real value carries serious legal, financial, and security\nresponsibilities. Consult counsel regarding securities law, AML\u002FKYC requirements, and consumer\nprotection regulations in your jurisdiction before launching anything that distributes tokens to\nthe public. §2 is where key material, addresses and seed phrases are defined, so it is directly\nupstream of every custody and consumer-protection question.\n\nEvery cryptocurrency is built from the same cryptographic primitives. Understanding them deeply\nis essential — not because you will implement them from scratch (you absolutely should not), but\nbecause **every design decision in a cryptocurrency is ultimately a cryptographic decision**.\n\n> **The golden rule of cryptography:** use vetted, well-maintained libraries at the highest level\n> of abstraction that solves your problem. **Never implement primitives yourself.**\n\n### 2.1 Hash functions\n\nA hash function takes arbitrary input and produces a fixed-size output. The required properties:\n\n| Property | What it means |\n|---|---|\n| Deterministic | The same input always gives the same output |\n| Quick to compute | Cheap enough to run on every block, transaction and address |\n| Preimage resistance | Infeasible to reverse — given the output, you cannot recover the input |\n| Second preimage resistance | Infeasible to find a second input with the same output |\n| Collision resistance | Infeasible to find *any* two inputs with the same output |\n\n**Collision resistance is the weakest of these properties and the first to fall.** Design on the\nassumption that it is the property you lose first.\n\nIn cryptocurrencies, hash functions serve three critical roles:\n\n| Role | What it does | Reference practice |\n|---|---|---|\n| Block hashing | The proof-of-work puzzle and the chain linkage (§3 → `coin-consensus-and-finality`) | Bitcoin: SHA-256d (double SHA-256). Ethereum: Keccak-256 (the pre-standardization Keccak variant, distinct from SHA3-256) |\n| Merkle trees | Compact commitment to transaction sets (see 2.3) | Bitcoin: transaction sets per block. Ethereum: Merkle-Patricia trie over full state |\n| Address derivation | Turning public keys into addresses | Bitcoin: RIPEMD-160(SHA-256(pubkey)). Ethereum: Keccak-256 |\n\n#### Hash function status\n\n| Function | Status | Verdict for a new chain |\n|---|---|---|\n| SHA-256 | Secure and well-studied | Natural choice |\n| SHA3-256 (FIPS 202) | Secure and well-studied | Natural choice |\n| Keccak-256 (the pre-standardization variant, Ethereum's) | Secure and well-studied, but **not** SHA3-256 — the padding and domain-separation rules differ, so the two return different digests for the same input | Natural choice, but pick it deliberately. Name which of the two your spec means and check which one your library's `sha3`\u002F`keccak` entry point actually computes; getting this wrong silently breaks Ethereum compatibility |\n| BLAKE2 \u002F BLAKE3 | Faster alternatives with strong security properties | Viable |\n| SHA-1 | **Broken for collisions**; deprecated everywhere that matters | Do not use for any security purpose |\n| MD5 | **Completely broken** — collisions are trivial | Do not use for any security purpose |\n\n#### Length extension attack\n\nSHA-2 uses the Merkle-Damgård construction and is vulnerable to **length extension**: knowing\n`H(m)` lets you compute `H(m + padding + extra)` without knowing `m`. This is why\n`H(key + message)` is **not** a valid MAC construction. SHA-3 and BLAKE are not vulnerable to\nthis. For HMAC, the construction is specifically designed to resist length extension regardless of\nthe underlying hash.\n\n### 2.2 Digital signatures\n\nDigital signatures are the identity system of a cryptocurrency. You sign with your private key;\nanyone can verify with your public key. The signature proves the holder of the private key\nauthorized **the exact bytes that were signed** — and that is the whole of what it proves. It does\nnot make a transaction globally unique: the same signature over the same bytes verifies again,\nlater, and on any other chain that encodes transactions the same way.\n\n**Replay resistance is a property of the ledger, not of the signature.** A UTXO chain gets it\nbecause a transaction names the outputs it consumes and each output can only be consumed once\n(§4 → `coin-building-a-utxo-chain`); an account chain gets it because the signed bytes include the\nsender's nonce, which the state machine increments (§5 → `coin-building-an-account-chain`). Across\nchains and contracts it takes explicit domain separation — a chain ID inside the signed bytes\n(**EIP-155**), an **EIP-712** domain separator, or an equivalent tag. The rule for a new design:\nwhatever must not be replayable has to be inside the bytes you sign.\n\n| Algorithm | Used By | Key Size | Notes |\n|---|---|---|---|\n| ECDSA (secp256k1) | Bitcoin (pre-Taproot), Ethereum | 256-bit | Widely deployed. Requires a per-signature random nonce `k` — reusing `k` across two signatures reveals the private key. This has broken real systems. |\n| Schnorr (secp256k1) | Bitcoin (Taproot, Nov 2021) | 256-bit | Linear and aggregatable (enabling MuSig2 multisig); BIP340 specifies deterministic nonce derivation, but nonce handling remains security-critical. The modern default for new designs. |\n| EdDSA (Ed25519) | Many modern systems | 256-bit | Fast, and hard to misuse: **RFC 8032** derives the per-signature nonce by hashing the private key's prefix together with the message, so no per-signature RNG sits in the path to fail. That is the *derivation* doing the work — a repeated nonce still reveals the key. Ed25519 signs over **edwards25519**, a twisted Edwards curve; **Curve25519** is the birationally equivalent Montgomery curve used by **X25519 key exchange**, which is a different primitive and does not sign. Do not substitute one for the other. Verification strictness (cofactor handling, signature malleability) differs between libraries, so a consensus system must pin one rule and test against it. An excellent default for new cryptocurrencies. |\n| Ring Signatures | Monero | 256-bit | A group of possible signers, but the actual signer is hidden among them. The key privacy primitive for anonymous transactions. |\n\nRing signatures are developed in full — ring size, decoy selection and the FCMP++ upgrade path —\nin §6 → `coin-privacy-features`. Taproot address encoding and the script consequences of Schnorr\nare in §4 → `coin-building-a-utxo-chain`.\n\n> **THE NONCE HAZARD, AND WHY IT IS NOT ONLY ECDSA'S**\n>\n> ECDSA requires a secret per-signature value `k`. If `k` is reused across two signatures with the\n> same key, **simple algebra reveals the private key**. This has broken real systems, including a\n> well-known game console. Even *biased* `k` (not perfectly random) leaks the key over many\n> signatures.\n>\n> The fix is a **specified deterministic derivation**: **RFC 6979** for ECDSA, **BIP340** for\n> Schnorr, **RFC 8032** for Ed25519. Be precise about what that buys. Determinism is a property of\n> the derivation a specification chose, **not of the signature scheme**: Schnorr and Ed25519 are\n> nonce-based too, and a repeated or biased nonce reveals the key there by the same algebra. They\n> are safer because their standard derivation takes the random-number generator out of the path,\n> not because the hazard is absent.\n>\n> **Whichever scheme you use, use its specified derivation and never a homegrown one.** One\n> exception to keep in view: interactive multi-party signing (**MuSig2**, **FROST**) needs a fresh\n> nonce per signing session that is never reused across sessions or retries — single-signer\n> deterministic derivation does not carry over, and reusing a session nonce leaks the key share.\n\n### 2.3 Merkle trees\n\nA Merkle tree is a binary tree of hashes where leaf nodes are hashes of data (transactions) and\neach internal node is the hash of its children. The root hash is a compact cryptographic\ncommitment to the entire dataset. To prove a specific transaction is included in a block you\nprovide a **Merkle proof** — the sibling hashes along the path from the leaf to the root — which is\n**O(log n)** in size. This enables lightweight clients (**SPV**) to verify transaction inclusion\nwithout downloading the entire blockchain.\n\n```\n\u002F\u002F Merkle tree construction (simplified)\nleaves = [hash(tx1), hash(tx2), hash(tx3), hash(tx4)]\nlevel1 = [hash(leaves[0] + leaves[1]), hash(leaves[2] + leaves[3])]\nroot   = hash(level1[0] + level1[1])\n\n\u002F\u002F To prove tx3 is included, provide:\n\u002F\u002F leaf = hash(tx3)\n\u002F\u002F sibling at level 0 = hash(tx4)\n\u002F\u002F sibling at level 1 = hash(leaves[0] + leaves[1])\n\u002F\u002F Verifier hashes up the tree and checks against the known root\n```\n\n| Chain | Structure | What the header commits to |\n|---|---|---|\n| Bitcoin | Merkle tree | Transaction sets within blocks |\n| Ethereum | Merkle-Patricia trie | The entire state — accounts, balances, code, storage — not just the transactions |\n\nEthereum's trie commits the block header to the **full state**, which is what enables **state\nproofs**; those are essential for light clients and bridges. The account\u002Fworld-state model that\ntrie encodes is §5 → `coin-building-an-account-chain`.\n\n### 2.4 Key generation, HD wallets, and seed phrases\n\nEvery user in a cryptocurrency has key pairs. **The private key is the identity**; the public key is\nthe address others send to. Key management is the hardest part of cryptocurrency — not the\ncryptography, but the operational security around storing and using keys (the losses this causes\nare §9–§10 → `coin-security-and-the-build-guide`).\n\n| Standard | What it defines | What to watch |\n|---|---|---|\n| **BIP-39** seed phrases | A human-readable encoding of a master seed — 12–24 words from a defined wordlist | The seed is the backup of the entire wallet: **anyone with the seed has all the keys**. The optional passphrase is a plausible-deniability\u002Fdecoy layer — and a loss vector, since losing it makes the wallet unrecoverable |\n| **BIP-32** hierarchical-deterministic (HD) derivation | From the master seed, a tree of keys is deterministically derived; each branch produces a new key pair | Lets you never reuse addresses — **address reuse damages privacy permanently on transparent ledgers** |\n| **BIP-44 \u002F 49 \u002F 84 \u002F 86** | Standard derivation paths by script\u002Faddress type | Pick paths deliberately; wallets interoperate on these |\n| **Descriptors (BIP-380s)** | Strings such as `wpkh(xpub...\u002F0\u002F*)` that fully describe a wallet's script structure | The modern interchange format between wallet software and signing devices |\n\n> **PRACTICAL KEY MANAGEMENT**\n>\n> For your cryptocurrency, you need to define:\n> 1. **The key derivation scheme** — HD wallet with standard paths.\n> 2. **The address format** — how public keys are encoded as addresses. Bitcoin uses Base58Check\n>    or bech32; Ethereum uses hex with a checksum.\n> 3. **The signature scheme and what exactly a signature commits to** — the sighash flags.\n> 4. **The multi-signature support** — how M-of-N key sets are expressed in the transaction\n>    format.\n\n### 2.5 What §2 decides for the rest of the build\n\n- Hash choice fixes the PoW puzzle and the chain linkage → §3 → `coin-consensus-and-finality`.\n- Signature scheme and address format fix the script and address types → §4 → `coin-building-a-utxo-chain`.\n- Merkle-Patricia state commitment is the precondition for state proofs → §5 → `coin-building-an-account-chain`.\n- Ring signatures and hidden amounts are the privacy path → §6 → `coin-privacy-features`.\n- Every one of these is a decision you make **once**, with vetted libraries, and never by writing\n  the primitive yourself.\n",{"name":5,"description":7},"develop","ae32736a1aabddabca5d2c96d665aa0ebc7d8700","src\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fbuilding-a-cryptocurrency\u002Fskills\u002Fcoin-cryptographic-primitives",3,"https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey","https:\u002F\u002Fthe-vibey-project.github.io\u002Fvibey\u002F","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project","https:\u002F\u002Fvibewithadam.matthewsteinberger.com","freedom for software engineers","2026-11-15 05:47:42",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add the-vibey-project\u002Fvibey --skill coin-cryptographic-primitives",{"tool":40,"command":41},"bunx","bunx skills add the-vibey-project\u002Fvibey --skill coin-cryptographic-primitives",{"tool":43,"command":44},"pnpm","pnpm dlx skills add the-vibey-project\u002Fvibey --skill coin-cryptographic-primitives","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fbuilding-a-cryptocurrency\u002Fskills\u002Fcoin-cryptographic-primitives\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7AT1FQJAE1FQYAMDTF490Y4","white-paper-writing","Use when writing white papers, technical reports, policy documents, thought leadership pieces, or any long-form authoritative document. Triggers on requests to write, structure, outline, or review white papers, technical reports, position papers, policy briefs, or evidence-driven arguments. Also use for B2B content marketing strategy, technical documentation requiring authority, academic-style reports, or any document that must educate while persuading. Use when someone asks \"how should I structure this\" for a long-form document.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fwhite-paper-writing\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7AT16BJRJJKK2MASXRZS76G","prose-technical-mechanics","Use when editing or writing prose at a technical\u002Fmechanical level: choosing between Anglo-Saxon and Latinate diction, placing information in topic vs stress positions, writing periodic vs cumulative sentences, handling sentence rhythm, punctuation as logic, transitions, paragraph structure, or phonesthetics. Use when someone wants to understand WHY prose works or doesn't, not just surface-level style advice. Triggers on word choice, sentence structure, emphasis, rhythm, diction, or any deep writing mechanics question.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fprose-technical-mechanics\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7AT0W9HT0ZZ9Y287NW99MR3","prose-mechanics","Use when writing, editing, or analyzing prose style; when trying to avoid generic AI-sounding writing; when applying specific prose styles such as journalistic, academic, narrative, KJV biblical, Hemingway plain, Latinate\u002FJamesian, Orwellian, Augustan, Victorian, Early Modern (Bacon, Browne, Milton), or free indirect discourse; or when coaching someone on writing voice and mechanics. Triggers on any request to improve, analyze, or write in a specific prose style, to fix \"AI-sounding\" writing, to make prose more vivid or concrete, to vary sentence rhythm, or to understand how a particular writer achieves their effects.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fprose-mechanics\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7AT0KR635JX66X2X6F3E2CP","narrative-structure","Use when structuring stories, pitches, presentations, white papers, or any persuasive narrative; analyzing the hero's journey in fiction or non-fiction; applying StoryBrand for business communication; designing narrative arcs for thought leadership; or understanding Vogler, Snyder, Propp, or Campbell frameworks. Triggers on any narrative structure, storytelling, pitch structure, StoryBrand, hero's journey, three-act structure, Freytag, Save the Cat, narrative arc, or \"how should I structure this story\u002Fpitch\u002Fpresentation\" request.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fnarrative-structure\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7AT0AKGW09NKKZDYBT8VRDE","legal-brief-writing","Use when writing legal briefs, motions, or any court filing; when analyzing judicial cognition and persuasion; when applying elite brief-writing techniques from Roberts, Clement, Kagan, Garner; or when structuring legal arguments for maximum persuasion. Also use for autistic\u002Fneurodivergent advocates who need to understand how their natural communication style maps to elite legal advocacy. Triggers on any legal writing, brief drafting, motion preparation, or legal argument structuring request.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Flegal-brief-writing\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7AT00VWPS4Q8B5VEMXX9NQT","journal-publishability-criteria","Use whenever a research paper, article or preprint is being written, revised, reviewed or published, and specifically before every publication of docs\u002Fpaper.md. Covers what legitimate journals actually gate on, in order of gating — the editor's desk screen (scope, novelty, package problems), what reviewers judge (methodological soundness, claims the evidence can carry, statistical and qualitative reporting), EQUATOR reporting guidelines, the ICMJE authorship criteria, COPE's view of text recycling, the near-universal generative-AI policy (no AI author, disclosure, author responsibility), TOP 2025 transparency standards, how to verify a journal is legitimate, submitting without an institution, and a pre-submission checklist. Triggers on requests to evaluate, review, prepare or submit a paper, to judge publishability, to write a declarations or data-availability section, to disclose AI use, or to check a journal.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fjournal-publishability-criteria\u002FSKILL.md",[],[]]