[{"data":1,"prerenderedAt":1356},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Frandom-number-generation-and-entropy":3,"docs-kids-\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Frandom-number-generation-and-entropy":849,"docs-tracks":850},{"id":4,"title":5,"body":6,"description":21,"extension":841,"meta":842,"navigation":843,"path":844,"seo":845,"source":846,"stem":847,"__hash__":848},"docs\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Frandom-number-generation-and-entropy.md","Random Number Generation & Entropy",{"type":7,"value":8,"toc":804},"minimark",[9,13,18,22,25,29,34,37,48,54,82,86,92,96,99,103,114,120,125,128,133,139,142,163,168,174,179,182,187,193,196,210,215,221,224,238,243,246,252,255,275,279,282,308,314,321,328,334,339,365,369,375,380,397,400,404,410,415,422,428,433,437,441,447,451,457,461,467,471,475,480,495,500,508,514,518,522,530,534,542,547,551,555,563,567,575,580,584,587,591,597,601,607,611,631,635,639,689,693,739,743,746,801],[10,11,5],"h1",{"id":12},"random-number-generation-entropy",[14,15,17],"h2",{"id":16},"introduction","Introduction",[19,20,21],"p",{},"Cryptographic security begins with randomness. Every secret key, every nonce, every session identifier starts as random bytes. If an attacker can predict your random numbers, they can predict your keys. If they can predict your keys, they own your accounts. The stakes could not be higher.",[19,23,24],{},"This chapter explores how rippled generates cryptographically secure random numbers, where entropy comes from, and why weak randomness has led to some of the most catastrophic security failures in blockchain history.",[14,26,28],{"id":27},"the-csprng-cryptographically-secure-pseudo-random-number-generator","The CSPRNG: Cryptographically Secure Pseudo-Random Number Generator",[30,31,33],"h3",{"id":32},"what-makes-randomness-cryptographically-secure","What Makes Randomness \"Cryptographically Secure\"?",[19,35,36],{},"Not all random number generators are created equal:",[38,39,44],"pre",{"className":40,"code":42,"language":43},[41],"language-text","\u002F\u002F ❌ NOT CRYPTOGRAPHICALLY SECURE\nstd::srand(time(NULL));\nint random = std::rand();  \u002F\u002F Predictable, sequential, weak\n\n\u002F\u002F ❌ BETTER BUT STILL NOT SECURE\nstd::random_device rd;\nstd::mt19937 gen(rd());\nstd::uniform_int_distribution\u003C> dis(0, 255);\nint random = dis(gen);  \u002F\u002F Better distribution, still not secure for crypto\n\n\u002F\u002F ✅ CRYPTOGRAPHICALLY SECURE\nauto& prng = crypto_prng();\nuint8_t random_bytes[32];\nprng(random_bytes, sizeof(random_bytes));  \u002F\u002F Unpredictable, secure\n","text",[45,46,42],"code",{"__ignoreMap":47},"",[19,49,50],{},[51,52,53],"strong",{},"Requirements for cryptographic randomness:",[55,56,57,64,70,76],"ol",{},[58,59,60,63],"li",{},[51,61,62],{},"Unpredictability",": Even knowing all previous outputs, future outputs cannot be predicted",[58,65,66,69],{},[51,67,68],{},"Uniform distribution",": All values are equally likely",[58,71,72,75],{},[51,73,74],{},"Independence",": Each output is independent of all others",[58,77,78,81],{},[51,79,80],{},"Entropy",": Derived from sources an attacker cannot observe or control",[30,83,85],{"id":84},"rippleds-csprng-implementation","Rippled's CSPRNG Implementation",[38,87,90],{"className":88,"code":89,"language":43},[41],"\u002F\u002F From src\u002Flibxrpl\u002Fcrypto\u002Fcsprng.cpp\n\nclass csprng_engine\n{\nprivate:\n    std::mutex mutex_;  \u002F\u002F Thread safety for older OpenSSL\n\npublic:\n    using result_type = std::uint64_t;\n\n    csprng_engine()\n    {\n        \u002F\u002F Initialize entropy pool from system sources\n        if (RAND_poll() != 1)\n            Throw\u003Cstd::runtime_error>(\"CSPRNG: Initial polling failed\");\n    }\n\n    void operator()(void* ptr, std::size_t count)\n    {\n        \u002F\u002F Thread-safety for older OpenSSL versions\n        #if (OPENSSL_VERSION_NUMBER \u003C 0x10100000L) || !defined(OPENSSL_THREADS)\n        std::lock_guard lock(mutex_);\n        #endif\n\n        \u002F\u002F Get cryptographically secure random bytes\n        auto const result = RAND_bytes(\n            reinterpret_cast\u003Cunsigned char*>(ptr),\n            count);\n\n        if (result != 1)\n            Throw\u003Cstd::runtime_error>(\"CSPRNG: Insufficient entropy\");\n    }\n\n    result_type operator()()\n    {\n        result_type ret;\n        (*this)(&ret, sizeof(result_type));\n        return ret;\n    }\n\n    void mix_entropy(void* buffer, std::size_t count)\n    {\n        \u002F\u002F Add entropy from std::random_device\n        std::array\u003Cstd::random_device::result_type, 128> entropy;\n        std::random_device rd;\n\n        for (auto& e : entropy)\n            e = rd();\n\n        std::lock_guard lock(mutex_);\n\n        \u002F\u002F Add to OpenSSL's entropy pool\n        RAND_add(\n            entropy.data(),\n            entropy.size() * sizeof(std::random_device::result_type),\n            0);  \u002F\u002F Conservatively assume no actual entropy contribution\n\n        if (buffer != nullptr && count != 0)\n            RAND_add(buffer, count, 0);\n    }\n};\n\n\u002F\u002F Global singleton - initialized once per process\ncsprng_engine& crypto_prng()\n{\n    static csprng_engine engine;\n    return engine;\n}\n",[45,91,89],{"__ignoreMap":47},[14,93,95],{"id":94},"where-does-entropy-come-from","Where Does Entropy Come From?",[19,97,98],{},"Entropy is the measure of unpredictability. For cryptography, we need entropy from sources that an attacker cannot observe or control.",[30,100,102],{"id":101},"system-entropy-sources","System Entropy Sources",[19,104,105,106,109,110,113],{},"When ",[45,107,108],{},"RAND_poll()"," is called during ",[45,111,112],{},"csprng_engine"," initialization, OpenSSL collects entropy from multiple system sources:",[38,115,118],{"className":116,"code":117,"language":43},[41],"┌──────────────────────────────────────────────┐\n│         OpenSSL Entropy Collection            │\n└──────────────────────────────────────────────┘\n                     │\n        ┌────────────┼────────────┐\n        │            │            │\n   ┌────▼───┐  ┌────▼────┐  ┌────▼────┐\n   │Hardware│  │Operating│  │ Timing  │\n   │  RNG   │  │ System  │  │ Sources │\n   └────┬───┘  └────┬────┘  └────┬────┘\n        │           │            │\n        └───────────┴────────────┘\n                    │\n              ┌─────▼──────┐\n              │  Entropy   │\n              │    Pool    │\n              └────────────┘\n",[45,119,117],{"__ignoreMap":47},[19,121,122],{},[51,123,124],{},"1. Hardware Random Number Generators",[19,126,127],{},"Modern CPUs include dedicated hardware for generating random numbers:",[19,129,130],{},[51,131,132],{},"Intel\u002FAMD (x86_64):",[38,134,137],{"className":135,"code":136,"language":43},[41],"; RDRAND instruction - hardware RNG\nrdrand rax        ; Random 64-bit value in RAX register\n\n; RDSEED instruction - direct entropy source\nrdseed rax        ; Random seed value\n",[45,138,136],{"__ignoreMap":47},[19,140,141],{},"These instructions access physical processes:",[143,144,145,151,157],"ul",{},[58,146,147,150],{},[51,148,149],{},"Thermal noise",": Random fluctuations in transistor behavior due to heat",[58,152,153,156],{},[51,154,155],{},"Quantum effects",": Subatomic randomness at the hardware level",[58,158,159,162],{},[51,160,161],{},"Avalanche noise",": Random current fluctuations in reverse-biased PN junctions",[19,164,165],{},[51,166,167],{},"ARM processors:",[38,169,172],{"className":170,"code":171,"language":43},[41],"; ARM TrustZone random number generation\n; Hardware entropy source\n",[45,173,171],{"__ignoreMap":47},[19,175,176],{},[51,177,178],{},"2. Operating System Entropy",[19,180,181],{},"Different operating systems maintain entropy pools:",[19,183,184],{},[51,185,186],{},"Linux\u002FUnix:",[38,188,191],{"className":189,"code":190,"language":43},[41],"\u002F\u002F \u002Fdev\u002Furandom - Non-blocking, cryptographically secure\nint fd = open(\"\u002Fdev\u002Furandom\", O_RDONLY);\nread(fd, buffer, size);\n\n\u002F\u002F \u002Fdev\u002Frandom - Blocks if entropy is low (usually not needed)\n",[45,192,190],{"__ignoreMap":47},[19,194,195],{},"The kernel's entropy pool is fed by:",[143,197,198,201,204,207],{},[58,199,200],{},"Disk I\u002FO timings (unpredictable due to physical mechanics and caching)",[58,202,203],{},"Network packet arrival times (dependent on network conditions)",[58,205,206],{},"Keyboard and mouse input timings (human unpredictability)",[58,208,209],{},"Interrupt timing (hardware event randomness)",[19,211,212],{},[51,213,214],{},"Windows:",[38,216,219],{"className":217,"code":218,"language":43},[41],"\u002F\u002F CryptGenRandom - Windows CSPRNG\nCryptGenRandom(hProvider, dwLen, pbBuffer);\n",[45,220,218],{"__ignoreMap":47},[19,222,223],{},"Windows gathers entropy from:",[143,225,226,229,232,235],{},[58,227,228],{},"System performance counters",[58,230,231],{},"Process and thread IDs",[58,233,234],{},"High-resolution timestamps",[58,236,237],{},"Hardware random number generators",[19,239,240],{},[51,241,242],{},"3. Timing-Based Entropy",[19,244,245],{},"Even without dedicated hardware, timing provides entropy:",[38,247,250],{"className":248,"code":249,"language":43},[41],"\u002F\u002F High-resolution clock measurements\nauto t1 = std::chrono::high_resolution_clock::now();\n\u002F\u002F ... do some work ...\nauto t2 = std::chrono::high_resolution_clock::now();\nauto duration = t2 - t1;  \u002F\u002F Unpredictable due to system load, caching, etc.\n",[45,251,249],{"__ignoreMap":47},[19,253,254],{},"Sources of timing unpredictability:",[143,256,257,260,263,266,269,272],{},[58,258,259],{},"CPU frequency scaling",[58,261,262],{},"Cache behavior (hits vs. misses)",[58,264,265],{},"Branch prediction success\u002Ffailure",[58,267,268],{},"Memory access patterns",[58,270,271],{},"Context switches",[58,273,274],{},"Interrupt handling",[30,276,278],{"id":277},"the-entropy-pool","The Entropy Pool",[19,280,281],{},"OpenSSL maintains an internal entropy pool that:",[55,283,284,290,296,302],{},[58,285,286,289],{},[51,287,288],{},"Collects"," entropy from multiple sources",[58,291,292,295],{},[51,293,294],{},"Mixes"," it using cryptographic hash functions (SHA-256)",[58,297,298,301],{},[51,299,300],{},"Extracts"," random bytes on demand",[58,303,304,307],{},[51,305,306],{},"Reseeds"," automatically when needed",[38,309,312],{"className":310,"code":311,"language":43},[41],"[Entropy Sources]\n       │\n       ├─> Hardware RNG ────┐\n       ├─> OS Entropy   ────┤\n       ├─> Timing Data  ────┤\n       └─> Process State────┤\n                            │\n                       ┌────▼─────┐\n                       │  Mixing  │\n                       │(SHA-256) │\n                       └────┬─────┘\n                            │\n                    ┌───────▼────────┐\n                    │  Entropy Pool  │\n                    │  (256+ bits)   │\n                    └───────┬────────┘\n                            │\n                      ┌─────▼──────┐\n                      │ RAND_bytes │\n                      └────────────┘\n",[45,313,311],{"__ignoreMap":47},[14,315,317,318],{"id":316},"defense-in-depth-mix_entropy","Defense in Depth: ",[45,319,320],{},"mix_entropy()",[19,322,323,324,327],{},"Rippled doesn't just rely on OpenSSL's entropy—it adds additional entropy from ",[45,325,326],{},"std::random_device",":",[38,329,332],{"className":330,"code":331,"language":43},[41],"void mix_entropy(void* buffer, std::size_t count)\n{\n    \u002F\u002F Create array to hold additional entropy\n    std::array\u003Cstd::random_device::result_type, 128> entropy;\n    std::random_device rd;\n\n    \u002F\u002F Fill array with random_device output\n    for (auto& e : entropy)\n        e = rd();\n\n    std::lock_guard lock(mutex_);\n\n    \u002F\u002F Add to OpenSSL's pool\n    \u002F\u002F Last parameter = 0 means \"don't increase entropy estimate\"\n    \u002F\u002F (conservative: we don't assume how much entropy random_device provides)\n    RAND_add(\n        entropy.data(),\n        entropy.size() * sizeof(std::random_device::result_type),\n        0);\n\n    \u002F\u002F Also mix in provided buffer if any\n    if (buffer != nullptr && count != 0)\n        RAND_add(buffer, count, 0);\n}\n",[45,333,331],{"__ignoreMap":47},[19,335,336],{},[51,337,338],{},"Why this matters:",[143,340,341,350,359],{},[58,342,343,346,347,349],{},[51,344,345],{},"Belt and suspenders",": Even if OpenSSL's entropy is weak, ",[45,348,326],{}," provides backup",[58,351,352,355,356,358],{},[51,353,354],{},"Platform independence",": Different platforms implement ",[45,357,326],{}," differently",[58,360,361,364],{},[51,362,363],{},"Defense against implementation bugs",": Bugs in one source don't compromise the entire system",[14,366,368],{"id":367},"thread-safety","Thread Safety",[38,370,373],{"className":371,"code":372,"language":43},[41],"#if (OPENSSL_VERSION_NUMBER \u003C 0x10100000L) || !defined(OPENSSL_THREADS)\nstd::lock_guard lock(mutex_);\n#endif\n",[45,374,372],{"__ignoreMap":47},[19,376,377],{},[51,378,379],{},"Why thread safety matters:",[143,381,382,385,388,394],{},[58,383,384],{},"Rippled is multi-threaded",[58,386,387],{},"Multiple threads may request random bytes simultaneously",[58,389,390,391],{},"Older OpenSSL versions aren't thread-safe for ",[45,392,393],{},"RAND_bytes",[58,395,396],{},"Modern OpenSSL (1.1.0+) handles thread safety internally",[19,398,399],{},"The code defensively uses a mutex for older versions while allowing modern OpenSSL to use its own (more efficient) thread safety mechanisms.",[14,401,403],{"id":402},"error-handling-fail-loudly","Error Handling: Fail Loudly",[38,405,408],{"className":406,"code":407,"language":43},[41],"if (result != 1)\n    Throw\u003Cstd::runtime_error>(\"CSPRNG: Insufficient entropy\");\n",[45,409,407],{"__ignoreMap":47},[19,411,412],{},[51,413,414],{},"Why throw on error:",[19,416,417,418,421],{},"If random number generation fails, the only safe response is to ",[51,419,420],{},"stop immediately",". Continuing with predictable or weak random numbers would be catastrophic:",[38,423,426],{"className":424,"code":425,"language":43},[41],"\u002F\u002F ❌ WRONG - Dangerous fallback\nuint8_t get_random_byte() {\n    uint8_t result;\n    if (RAND_bytes(&result, 1) != 1) {\n        \u002F\u002F DON'T DO THIS!\n        return std::rand() % 256;  \u002F\u002F Weak fallback\n    }\n    return result;\n}\n\n\u002F\u002F ✅ CORRECT - Fail loudly\nuint8_t get_random_byte() {\n    uint8_t result;\n    if (RAND_bytes(&result, 1) != 1) {\n        Throw\u003Cstd::runtime_error>(\"RNG failure\");\n    }\n    return result;\n}\n",[45,427,425],{"__ignoreMap":47},[19,429,430],{},[51,431,432],{},"Better to crash than to generate weak keys.",[14,434,436],{"id":435},"using-the-csprng","Using the CSPRNG",[30,438,440],{"id":439},"generating-a-random-secret-key","Generating a Random Secret Key",[38,442,445],{"className":443,"code":444,"language":43},[41],"SecretKey randomSecretKey()\n{\n    std::uint8_t buf[32];\n    beast::rngfill(buf, sizeof(buf), crypto_prng());\n    SecretKey sk(Slice{buf, sizeof(buf)});\n    secure_erase(buf, sizeof(buf));\n    return sk;\n}\n",[45,446,444],{"__ignoreMap":47},[30,448,450],{"id":449},"generating-random-transaction-ids-for-testing","Generating Random Transaction IDs (for testing)",[38,452,455],{"className":453,"code":454,"language":43},[41],"uint256 randomUInt256()\n{\n    uint256 result;\n    crypto_prng()(result.data(), result.size());\n    return result;\n}\n",[45,456,454],{"__ignoreMap":47},[30,458,460],{"id":459},"generating-session-tokens","Generating Session Tokens",[38,462,465],{"className":463,"code":464,"language":43},[41],"uint64_t generateSessionToken()\n{\n    return crypto_prng()();  \u002F\u002F Returns random uint64_t\n}\n",[45,466,464],{"__ignoreMap":47},[14,468,470],{"id":469},"historical-failures-lessons-from-weak-randomness","Historical Failures: Lessons from Weak Randomness",[30,472,474],{"id":473},"case-study-1-weak-rng-in-android-2013","Case Study 1: Weak RNG in Android (2013)",[19,476,477],{},[51,478,479],{},"Problem:",[143,481,482,489,492],{},[58,483,484,485,488],{},"Android's Java ",[45,486,487],{},"SecureRandom"," had a bug",[58,490,491],{},"Used insufficient entropy",[58,493,494],{},"Generated predictable private keys",[19,496,497],{},[51,498,499],{},"Consequence:",[143,501,502,505],{},[58,503,504],{},"Multiple wallets generated identical or predictable keys",[58,506,507],{},"Attackers stole funds by guessing private keys",[19,509,510,513],{},[51,511,512],{},"Lesson:"," Never trust that \"SecureRandom\" is actually secure without verification.",[30,515,517],{"id":516},"case-study-2-blockchaininfo-rng-bug-2014","Case Study 2: Blockchain.info RNG Bug (2014)",[19,519,520],{},[51,521,479],{},[143,523,524,527],{},[58,525,526],{},"Browser-based RNG used weak entropy",[58,528,529],{},"Some generated keys were predictable",[19,531,532],{},[51,533,499],{},[143,535,536,539],{},[58,537,538],{},"Attackers could brute-force private keys",[58,540,541],{},"Multiple wallets compromised",[19,543,544,546],{},[51,545,512],{}," Browser RNGs are insufficient for key generation. Always use system CSPRNG.",[30,548,550],{"id":549},"case-study-3-reused-nonces-playstation-3","Case Study 3: Reused Nonces (PlayStation 3)",[19,552,553],{},[51,554,479],{},[143,556,557,560],{},[58,558,559],{},"PlayStation 3 signing algorithm reused the same nonce value",[58,561,562],{},"ECDSA signatures with known nonce expose the private key",[19,564,565],{},[51,566,499],{},[143,568,569,572],{},[58,570,571],{},"PS3 signing key was extracted",[58,573,574],{},"Anyone could sign \"official\" PS3 software",[19,576,577,579],{},[51,578,512],{}," Nonces must be random and never reused. (XRPL uses deterministic nonces via RFC 6979 to avoid this entirely.)",[14,581,583],{"id":582},"testing-randomness-quality","Testing Randomness Quality",[19,585,586],{},"How can you verify randomness is actually random?",[30,588,590],{"id":589},"statistical-tests","Statistical Tests",[38,592,595],{"className":593,"code":594,"language":43},[41],"\u002F\u002F Test: Check distribution over many samples\nvoid test_distribution() {\n    std::map\u003Cuint8_t, int> frequency;\n\n    \u002F\u002F Generate 256,000 bytes\n    for (int i = 0; i \u003C 256000; ++i) {\n        uint8_t byte;\n        crypto_prng()(&byte, 1);\n        frequency[byte]++;\n    }\n\n    \u002F\u002F Each byte value should appear ~1000 times\n    \u002F\u002F Statistical deviation should be small\n    for (int i = 0; i \u003C 256; ++i) {\n        int count = frequency[i];\n        \u002F\u002F Allow ±10% deviation (±100 occurrences)\n        assert(count > 900 && count \u003C 1100);\n    }\n}\n",[45,596,594],{"__ignoreMap":47},[30,598,600],{"id":599},"independence-test","Independence Test",[38,602,605],{"className":603,"code":604,"language":43},[41],"\u002F\u002F Test: Sequential bytes should be independent\nvoid test_independence() {\n    std::map\u003Cstd::pair\u003Cuint8_t, uint8_t>, int> pairs;\n\n    uint8_t prev = 0;\n    crypto_prng()(&prev, 1);\n\n    for (int i = 0; i \u003C 65536; ++i) {\n        uint8_t curr;\n        crypto_prng()(&curr, 1);\n        pairs[{prev, curr}]++;\n        prev = curr;\n    }\n\n    \u002F\u002F Each pair should appear ~1 time (65536 pairs, 65536 iterations)\n    \u002F\u002F No pattern should emerge\n}\n",[45,606,604],{"__ignoreMap":47},[30,608,610],{"id":609},"professional-test-suites","Professional Test Suites",[143,612,613,619,625],{},[58,614,615,618],{},[51,616,617],{},"NIST Statistical Test Suite",": Industry standard for RNG testing",[58,620,621,624],{},[51,622,623],{},"Diehard tests",": Comprehensive statistical analysis",[58,626,627,630],{},[51,628,629],{},"TestU01",": Modern, extensive RNG test suite",[14,632,634],{"id":633},"best-practices-for-random-number-generation","Best Practices for Random Number Generation",[30,636,638],{"id":637},"do","✅ DO:",[55,640,641,656,667,678],{},[58,642,643,650],{},[51,644,645,646,649],{},"Always use ",[45,647,648],{},"crypto_prng()"," for cryptographic operations",[38,651,654],{"className":652,"code":653,"language":43},[41],"auto& prng = crypto_prng();\nuint8_t key_material[32];\nprng(key_material, sizeof(key_material));\n",[45,655,653],{"__ignoreMap":47},[58,657,658,661],{},[51,659,660],{},"Check return values",[38,662,665],{"className":663,"code":664,"language":43},[41],"if (RAND_bytes(buffer, size) != 1) {\n    Throw\u003Cstd::runtime_error>(\"RNG failure\");\n}\n",[45,666,664],{"__ignoreMap":47},[58,668,669,672],{},[51,670,671],{},"Use enough random bytes",[38,673,676],{"className":674,"code":675,"language":43},[41],"\u002F\u002F ✅ 32 bytes = 256 bits of security\nuint8_t key[32];\n\n\u002F\u002F ❌ 8 bytes = only 64 bits (too weak!)\nuint8_t weak_key[8];\n",[45,677,675],{"__ignoreMap":47},[58,679,680,683],{},[51,681,682],{},"Securely erase random material",[38,684,687],{"className":685,"code":686,"language":43},[41],"uint8_t temp[32];\nprng(temp, sizeof(temp));\n\u002F\u002F ... use temp ...\nsecure_erase(temp, sizeof(temp));\n",[45,688,686],{"__ignoreMap":47},[30,690,692],{"id":691},"dont","❌ DON'T:",[55,694,695,706,717,728],{},[58,696,697,700],{},[51,698,699],{},"Don't use standard library RNGs for crypto",[38,701,704],{"className":702,"code":703,"language":43},[41],"std::mt19937 gen;  \u002F\u002F ❌ NOT CRYPTOGRAPHICALLY SECURE\nstd::rand();       \u002F\u002F ❌ EXTREMELY WEAK\n",[45,705,703],{"__ignoreMap":47},[58,707,708,711],{},[51,709,710],{},"Don't seed with predictable values",[38,712,715],{"className":713,"code":714,"language":43},[41],"srand(time(NULL));  \u002F\u002F ❌ Predictable seed\nsrand(getpid());    \u002F\u002F ❌ Process ID is guessable\n",[45,716,714],{"__ignoreMap":47},[58,718,719,722],{},[51,720,721],{},"Don't implement your own CSPRNG",[38,723,726],{"className":724,"code":725,"language":43},[41],"\u002F\u002F ❌ DON'T DO THIS\nuint8_t my_rand() {\n    static uint64_t state = time(NULL);\n    state = state * 6364136223846793005ULL + 1;\n    return state >> 56;\n}\n",[45,727,725],{"__ignoreMap":47},[58,729,730,733],{},[51,731,732],{},"Don't ignore entropy exhaustion",[38,734,737],{"className":735,"code":736,"language":43},[41],"\u002F\u002F ❌ Don't loop indefinitely\nwhile (RAND_bytes(buf, size) != 1) {\n    \u002F\u002F If this fails, STOP, don't retry forever\n}\n",[45,738,736],{"__ignoreMap":47},[14,740,742],{"id":741},"summary","Summary",[19,744,745],{},"Random number generation is the foundation of cryptographic security:",[55,747,748,754,760,766,775,781,795],{},[58,749,750,753],{},[51,751,752],{},"True randomness is essential",": Predictable randomness = predictable keys = stolen funds",[58,755,756,759],{},[51,757,758],{},"Multiple entropy sources provide defense",": Hardware RNG, OS entropy, timing, etc.",[58,761,762,765],{},[51,763,764],{},"OpenSSL's RAND_bytes is cryptographically secure",": When properly seeded",[58,767,768,771,772,774],{},[51,769,770],{},"Rippled adds additional entropy",": Via ",[45,773,326],{}," for defense in depth",[58,776,777,780],{},[51,778,779],{},"Fail loudly on errors",": Better to crash than generate weak keys",[58,782,783,786,787,790,791,794],{},[51,784,785],{},"Never use standard RNGs for crypto",": ",[45,788,789],{},"std::rand()",", ",[45,792,793],{},"std::mt19937"," are not secure",[58,796,797,800],{},[51,798,799],{},"Thread safety matters",": Older OpenSSL versions need mutex protection",[19,802,803],{},"In the next chapter, we'll see how this cryptographically secure randomness is used to generate the secret keys that secure accounts on the XRP Ledger.",{"title":47,"searchDepth":805,"depth":805,"links":806},2,[807,808,813,817,819,820,821,826,831,836,840],{"id":16,"depth":805,"text":17},{"id":27,"depth":805,"text":28,"children":809},[810,812],{"id":32,"depth":811,"text":33},3,{"id":84,"depth":811,"text":85},{"id":94,"depth":805,"text":95,"children":814},[815,816],{"id":101,"depth":811,"text":102},{"id":277,"depth":811,"text":278},{"id":316,"depth":805,"text":818},"Defense in Depth: mix_entropy()",{"id":367,"depth":805,"text":368},{"id":402,"depth":805,"text":403},{"id":435,"depth":805,"text":436,"children":822},[823,824,825],{"id":439,"depth":811,"text":440},{"id":449,"depth":811,"text":450},{"id":459,"depth":811,"text":460},{"id":469,"depth":805,"text":470,"children":827},[828,829,830],{"id":473,"depth":811,"text":474},{"id":516,"depth":811,"text":517},{"id":549,"depth":811,"text":550},{"id":582,"depth":805,"text":583,"children":832},[833,834,835],{"id":589,"depth":811,"text":590},{"id":599,"depth":811,"text":600},{"id":609,"depth":811,"text":610},{"id":633,"depth":805,"text":634,"children":837},[838,839],{"id":637,"depth":811,"text":638},{"id":691,"depth":811,"text":692},{"id":741,"depth":805,"text":742},"md",{},true,"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Frandom-number-generation-and-entropy",{"title":5,"description":21},"xrpl-trainings\u002Fcore-dev-bootcamp\u002Fmodule04\u002Frandom-number-generation-and-entropy.md","docs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Frandom-number-generation-and-entropy","K3EDwR81TRrUe7T-sdkTY9ojFWRrZrk6HS4b6d7VJH8",[],[851,893,908,929,953,1345],{"title":852,"path":853,"children":854,"description":891,"pages":892},"XRPL Basics","\u002Fdocs\u002Fxrpl-basics",[855,858,861,864,867,870,873,876,879,882,885,888],{"title":856,"path":857},"Getting Started","\u002Fdocs\u002Fxrpl-basics\u002Fgetting-started",{"title":859,"path":860},"Trustline","\u002Fdocs\u002Fxrpl-basics\u002Ftrustline",{"title":862,"path":863},"Payments","\u002Fdocs\u002Fxrpl-basics\u002Fpayments",{"title":865,"path":866},"Reading and subscribing to Transactions","\u002Fdocs\u002Fxrpl-basics\u002Freading-and-writing-memos",{"title":868,"path":869},"Writing and reading memos","\u002Fdocs\u002Fxrpl-basics\u002Fwriting-and-reading-memos",{"title":871,"path":872},"Non Fungible Tokens","\u002Fdocs\u002Fxrpl-basics\u002Fnon-fungible-tokens",{"title":874,"path":875},"Multi-Purpose Tokens","\u002Fdocs\u002Fxrpl-basics\u002Fmptoken",{"title":877,"path":878},"PathFinding","\u002Fdocs\u002Fxrpl-basics\u002Fpath-finding",{"title":880,"path":881},"Escrow","\u002Fdocs\u002Fxrpl-basics\u002Fescrow",{"title":883,"path":884},"Price Oracles","\u002Fdocs\u002Fxrpl-basics\u002Fprice-oracles",{"title":886,"path":887},"Tickets","\u002Fdocs\u002Fxrpl-basics\u002Ftickets",{"title":889,"path":890},"Multi-Signature","\u002Fdocs\u002Fxrpl-basics\u002Fmulti-signature","In this section we will cover some of the primary functionality of the XRPL ledger.",13,{"title":894,"path":895,"children":896,"description":906,"pages":907},"Token Issuance and Liquidity","\u002Fdocs\u002Ftoken-issuance-and-liquidity",[897,900,903],{"title":898,"path":899},"Creating Accounts and Setup","\u002Fdocs\u002Ftoken-issuance-and-liquidity\u002Fcreating-accounts",{"title":901,"path":902},"Issuing Tokens","\u002Fdocs\u002Ftoken-issuance-and-liquidity\u002Fissuing-tokens",{"title":904,"path":905},"Creating an AMM Pool","\u002Fdocs\u002Ftoken-issuance-and-liquidity\u002Fcreating-an-amm-pool","This session will cover token issuance and providing liquidity for your tokens using the automatic market maker built in to the XRPL",4,{"title":909,"path":910,"children":911,"description":927,"pages":928},"Cyphered Chat on XRPL","\u002Fdocs\u002Fcyphered-chat-on-xrpl",[912,915,918,921,924],{"title":913,"path":914},"Set up","\u002Fdocs\u002Fcyphered-chat-on-xrpl\u002Fset-up",{"title":916,"path":917},"Set up Keys","\u002Fdocs\u002Fcyphered-chat-on-xrpl\u002Fset-up-keys",{"title":919,"path":920},"Cypher the message","\u002Fdocs\u002Fcyphered-chat-on-xrpl\u002Fcypher-the-message",{"title":922,"path":923},"Set up the memo & send the tx","\u002Fdocs\u002Fcyphered-chat-on-xrpl\u002Fset-up-the-memo-and-send-the-tx",{"title":925,"path":926},"Get the message and decypher it","\u002Fdocs\u002Fcyphered-chat-on-xrpl\u002Fget-the-message-and-decypher-it","Send encrypted messages over XRPL",6,{"title":930,"path":931,"children":932,"description":951,"pages":952},"EVM Sidechain","\u002Fdocs\u002Fevm-sidechain",[933,936,939,942,945,948],{"title":934,"path":935},"Connecting Metamask","\u002Fdocs\u002Fevm-sidechain\u002Fconnecting-metamask",{"title":937,"path":938},"Set up a Foundry project","\u002Fdocs\u002Fevm-sidechain\u002Fset-up-an-evm-project",{"title":940,"path":941},"Bridging Assets","\u002Fdocs\u002Fevm-sidechain\u002Fbridging-assets",{"title":943,"path":944},"Remix","\u002Fdocs\u002Fevm-sidechain\u002Fremix",{"title":946,"path":947},"Banking App","\u002Fdocs\u002Fevm-sidechain\u002Fbanking-app",{"title":949,"path":950},"Banking Contract Key Concepts","\u002Fdocs\u002Fevm-sidechain\u002Fbanking-contract-key-concepts","This workshop will walk you through deploying a smart contract and building a full app on the XRPL EVM sidechain",7,{"title":954,"path":955,"children":956,"description":1343,"pages":1344},"Core Dev Bootcamp","\u002Fdocs\u002Fcore-dev-bootcamp",[957,977,1020,1070,1101,1156,1187,1203,1243,1277,1302,1318],{"title":958,"path":959,"children":960},"Rippled I – Compilation, Configuration, and Launch","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01",[961,964,967,970],{"title":962,"path":963},"Environment & Build Toolchain","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01\u002Fenvironment-build-toolchain",{"title":965,"path":966},"Compilation Process & Generating Binary","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01\u002Fcompilation-process-generating-binary",{"title":968,"path":969},"Local Development & Testing","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01\u002Flocal-development-testing",{"title":971,"path":972,"children":973},"Homeworks","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01\u002Fhomeworks",[974],{"title":975,"path":976},"Homework 1: Rippled Node Setup and Mainnet Synchronization","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule01\u002Fhomeworks\u002Fhomework1",{"title":978,"path":979,"children":980},"Rippled II: Deep Dive into the Protocol and Codebase","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02",[981,984,987,990,993,996,999,1002,1005],{"title":982,"path":983},"Protocols: Communication and Interoperability","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fprotocols-communication-and-interoperability",{"title":985,"path":986},"Transactors: Transaction Processing Framework","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Ftransactors-transaction-processing-framework",{"title":988,"path":989},"Application Layer: Central Orchestration and Coordination","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fapplication-layer-central-orchestration-and-coordination",{"title":991,"path":992},"Consensus Engine: XRP Ledger Consensus Protocol","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fconsensus-engine-xrp-ledger-consensus-protocol",{"title":994,"path":995},"Overlay Network: Peer-to-Peer Networking Layer","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Foverlay-network-peer-to-peer-networking-layer",{"title":997,"path":998},"Transaction Lifecycle: Complete Transaction Journey","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Ftransaction-lifecycle-complete-transaction-journey",{"title":1000,"path":1001},"Codebase Navigation: Efficiently Navigating the Rippled Source","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fcodebase-navigation-efficiently-navigating-the-rippled-source",{"title":1003,"path":1004},"Debugging Tools: Development and Debugging Techniques","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fdebugging-tools-development-and-debugging-techniques",{"title":971,"path":1006,"children":1007},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fhomeworks",[1008,1011,1014,1017],{"title":1009,"path":1010},"Homework 1: Transaction Flow Analysis","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fhomeworks\u002Fhomework1",{"title":1012,"path":1013},"Homework 2: Transactor Code Exploration","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fhomeworks\u002Fhomework2",{"title":1015,"path":1016},"Homework 3: Logging and Debugging","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fhomeworks\u002Fhomework3",{"title":1018,"path":1019},"Homework 4: Architecture Diagram","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule02\u002Fhomeworks\u002Fhomework4",{"title":1021,"path":1022,"children":1023},"Anatomy of Rippled: SHAMap and NodeStore","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03",[1024,1027,1030,1033,1036,1039,1042,1045,1048,1051,1054,1057],{"title":1025,"path":1026},"Foundational Concepts","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fstate-management-challenges",{"title":1028,"path":1029},"Trees, Hashing, and Cryptographic Commitments","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Ftree-fundamentals",{"title":1031,"path":1032},"SHAMap Architecture and Node Hierarchy","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fshamap-architecture",{"title":1034,"path":1035},"Navigation, Hashing, and Merkle Properties","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fshamap-navigation-hashing",{"title":1037,"path":1038},"Traversal, Iteration, and Synchronization","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fshamap-synchronization",{"title":1040,"path":1041},"The NodeStore","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fnodestore-architecture",{"title":1043,"path":1044},"Storage Abstraction and Backend Implementations","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fstorage-backends",{"title":1046,"path":1047},"Cache Layer and Performance Optimization","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fcache-layer",{"title":1049,"path":1050},"Database Operations and Lifecycle Management","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fdatabase-operations",{"title":1052,"path":1053},"Cryptographic Proofs and State Reconstruction","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fproofs-state-reconstruction",{"title":1055,"path":1056},"Resource Management and Performance Characteristics","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fresource-management",{"title":1058,"path":1059,"children":1060},"Appendices","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fappendices",[1061,1064,1067],{"title":1062,"path":1063},"Appendix : Codebase Navigation Guide","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fappendices\u002Fnavigation",{"title":1065,"path":1066},"Appendix : Configuration Reference","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fappendices\u002Fconfiguration",{"title":1068,"path":1069},"Appendix : Debugging and Development Tools","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03\u002Fappendices\u002Fdebugging",{"title":1071,"path":1072,"children":1073},"Transactors: Understanding the Lifecycle of a Transaction","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis",[1074,1077,1080,1083,1086,1089,1092,1095,1098],{"title":1075,"path":1076},"Transactor Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Ftransactor-architecture",{"title":1078,"path":1079},"Processing Pipeline","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fprocessing-pipeline",{"title":1081,"path":1082},"Fee and Sequence Handling","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Ffee-sequence-handling",{"title":1084,"path":1085},"State Modification Patterns","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fstate-modification",{"title":1087,"path":1088},"TER Result Codes","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fter-result-codes",{"title":1090,"path":1091},"Case Study: CheckCreate Transactor","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fcase-study-checkcreate",{"title":1093,"path":1094},"Homework 1: Trace a Transaction Through All Phases","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fhomeworks\u002Fhomework1",{"title":1096,"path":1097},"Homework 2: Implement a Custom Validation Check","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fhomeworks\u002Fhomework2",{"title":1099,"path":1100},"Homework 3: Analyze TER Code Paths","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule03bis\u002Fhomeworks\u002Fhomework3",{"title":1102,"path":1103,"children":1104},"Cryptography I: Blockchain Security and Cryptographic Foundations","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04",[1105,1108,1111,1114,1115,1118,1121,1124,1127,1130,1133,1136,1139,1150],{"title":1106,"path":1107},"The Four Pillars of Security","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fthe-four-pillars-of-security",{"title":1109,"path":1110},"The Lifecycle of a Cryptographic Key","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fthe-lifecycle-of-a-cryptographic-key",{"title":1112,"path":1113},"Random Number Generation","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Frandom-number-generation",{"title":5,"path":844},{"title":1116,"path":1117},"Key Generation Pipeline","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fkey-generation-pipeline",{"title":1119,"path":1120},"Transaction Signing & Verification","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Ftransaction-signing-and-verification",{"title":1122,"path":1123},"Hash Functions in XRPL","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fhash-functions-in-xrpl",{"title":1125,"path":1126},"Base58Check Encoding","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fbase58check-encoding",{"title":1128,"path":1129},"Peer Handshake Protocol","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fpeer-handshake-protocol",{"title":1131,"path":1132},"Secure Memory Handling","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fsecure-memory-handling",{"title":1134,"path":1135},"Common Cryptographic Pitfalls","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fcommon-cryptographic-pitfalls",{"title":1137,"path":1138},"Performance & Optimization","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fperformance-and-optimization",{"title":1058,"path":1140,"children":1141},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fappendices",[1142,1144,1147],{"title":1062,"path":1143},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fappendices\u002Fcodebase-navigation-guide",{"title":1145,"path":1146},"Appendix : Debugging & Development Tools","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fappendices\u002Fdebugging-and-development-tools",{"title":1148,"path":1149},"Appendix : RFCs and Standards Reference","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fappendices\u002Frfcs-and-standards-reference",{"title":971,"path":1151,"children":1152},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fhomeworks",[1153],{"title":1154,"path":1155},"Homework 1: Signature Verification Discovery","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule04\u002Fhomeworks\u002Fhomework1",{"title":1157,"path":1158,"children":1159},"Cryptography II: Protocol Extensions and Quantum Signatures","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05",[1160,1163,1166,1169,1172,1175,1181],{"title":1161,"path":1162},"Overlay Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Foverlay-architecture",{"title":1164,"path":1165},"Connection Lifecycle","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fconnection-lifecycle",{"title":1167,"path":1168},"Handshake Protocol","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fhandshake-protocol",{"title":1170,"path":1171},"Message Relaying","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fmessage-relaying",{"title":1173,"path":1174},"Peer Discovery","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fpeer-discovery",{"title":1058,"path":1176,"children":1177},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fappendices",[1178],{"title":1179,"path":1180},"XLS-??d Quantum-Resistant Signatures","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fappendices\u002Fxls-d",{"title":971,"path":1182,"children":1183},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fhomeworks",[1184],{"title":1185,"path":1186},"Homework 1: Building Quantum-Resistant Signatures for XRPL","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule05\u002Fhomeworks\u002Fhomework1",{"title":1188,"path":1189,"children":1190},"Communication I: Understanding XRPL(d) RPC Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule06",[1191,1194,1197,1200],{"title":1192,"path":1193},"RPC Handler Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule06\u002Frpc-handler-architecture",{"title":1195,"path":1196},"Request and Response Flow","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule06\u002Frequest-response-flow",{"title":1198,"path":1199},"Authentication and Authorization","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule06\u002Fauthentication-authorization",{"title":1201,"path":1202},"Error Handling and Validation","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule06\u002Ferror-handling-validation",{"title":1204,"path":1205,"children":1206},"Communication II: Building and Integrating Custom RPC Handlers","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07",[1207,1210,1213,1216,1219,1231],{"title":1208,"path":1209},"Implementing Custom Handlers","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fimplementing-custom-handlers",{"title":1211,"path":1212},"Testing RPC Handlers","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Ftesting-rpc-handlers",{"title":1214,"path":1215},"Advanced Features","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fadvanced-features",{"title":1217,"path":1218},"Best Practices and Patterns","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fbest-practices-patterns",{"title":1058,"path":1220,"children":1221},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fappendices",[1222,1225,1228],{"title":1223,"path":1224},"Appendix: Handler Examples","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fappendices\u002Fhandler-examples",{"title":1226,"path":1227},"Appendix: Helper Functions","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fappendices\u002Fhelper-functions",{"title":1229,"path":1230},"Appendix: Debugging Guide","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fappendices\u002Fdebugging-guide",{"title":971,"path":1232,"children":1233},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fhomeworks",[1234,1237,1240],{"title":1235,"path":1236},"Homework 1: Building a Custom RPC Handler","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fhomeworks\u002Fhomework1",{"title":1238,"path":1239},"Hints","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fhomeworks\u002Fhints",{"title":1241,"path":1242},"Snippets","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule07\u002Fhomeworks\u002Fsnippets",{"title":1244,"path":1245,"children":1246},"Consensus I: Node, Consensus, and Ledger Fundamentals","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08",[1247,1250,1253,1256,1259,1262,1265,1268],{"title":1248,"path":1249},"Consensus Fundamentals","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-fundamentals",{"title":1251,"path":1252},"Consensus Modes and Phases","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-modes-phases",{"title":1254,"path":1255},"Consensus Lifecycle","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fconsensus-lifecycle",{"title":1257,"path":1258},"Ledger Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fledger-architecture",{"title":1260,"path":1261},"Ledger Data Structures","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fledger-data-structures",{"title":1263,"path":1264},"Ledger Acquisition and Validation","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fledger-acquisition-validation",{"title":1266,"path":1267},"RPC and Peer Transaction Lifecycle","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Frpc-peer-tx-lifecycle",{"title":971,"path":1269,"children":1270},"\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fhomeworks",[1271,1274],{"title":1272,"path":1273},"Homework 1: Transaction Consensus Journey","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fhomeworks\u002Fhomework1",{"title":1275,"path":1276},"Homework 2: Consensus Dispute Engineering","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule08\u002Fhomeworks\u002Fhomework2",{"title":1278,"path":1279,"children":1280},"Consensus II: UNLs and Ledger Amendments","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09",[1281,1284,1287,1290,1293,1296,1299],{"title":1282,"path":1283},"Transaction Ordering","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Ftx-ordering",{"title":1285,"path":1286},"Consensus Validations","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Fconsensus-validations",{"title":1288,"path":1289},"Amendments","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Famendments",{"title":1291,"path":1292},"UNL Management","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Funl",{"title":1294,"path":1295},"Consensus Peers","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Fconsensus-peers",{"title":1297,"path":1298},"Homework 1: Validator Keys Setup and Management","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Fhomeworks\u002Fhomework1",{"title":1300,"path":1301},"Homework 2: Negative UNL Engineering","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09\u002Fhomeworks\u002Fhomework2",{"title":1303,"path":1304,"children":1305},"AMM: Automated Market Maker","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09bis",[1306,1309,1312,1315],{"title":1307,"path":1308},"AMM Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09bis\u002Famm-architecture",{"title":1310,"path":1311},"AMM Transactions","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09bis\u002Famm-transactions",{"title":1313,"path":1314},"AMM Logic","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09bis\u002Famm-logic",{"title":1316,"path":1317},"Pathfinding Integration","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule09bis\u002Famm-pathfinding",{"title":1319,"path":1320,"children":1321},"Building Amendments: Lifecycle and Core Protocol Impact","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10",[1322,1325,1328,1331,1334,1337,1340],{"title":1323,"path":1324},"Amendment Architecture","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Famendment-architecture",{"title":1326,"path":1327},"Amendment Lifecycle","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Famendment-lifecycle",{"title":1329,"path":1330},"Voting and Activation","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Fvoting-and-activation",{"title":1332,"path":1333},"Core Protocol Impact","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Fprotocol-impact",{"title":1335,"path":1336},"Network Coordination","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Fnetwork-coordination",{"title":1338,"path":1339},"Monitoring and Tools","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Famendment-monitoring",{"title":1341,"path":1342},"Homework 1: Amendment Status Analysis","\u002Fdocs\u002Fcore-dev-bootcamp\u002Fmodule10\u002Fhomework\u002Fhomework1","The XRPL Core Dev Bootcamp – Online Edition is a program designed for intermediate to advanced C++ developers looking to deepen their skills in the core of the XRP Ledger.",126,{"title":1346,"path":1347,"children":1348,"description":1355,"pages":811},"Tools","\u002Fdocs\u002Ftools",[1349,1352],{"title":1350,"path":1351},"Xaman Setup","\u002Fdocs\u002Ftools\u002Fxaman-setup",{"title":1353,"path":1354},"Metamask Setup","\u002Fdocs\u002Ftools\u002Fmetamask-setup","In this section you will find instructions on how to setup wallets and tools",1796220772481]