The good thing is, in 2012 the developer Pieter Wuille created the BIP32 specification at The bottom with the hierarchical deterministic wallets. Alongside one another with it, Pieter made a mathematical functionality to produce a learn key from which to derive all other keys inside a deterministic way. Using BIP44 https://www.creativelive.com/student/chris-mccarthy-26?via=accounts-freeform_2