The good thing is, in 2012 the developer Pieter Wuille designed the BIP32 specification at The bottom in the hierarchical deterministic wallets. Alongside one another with it, Pieter made a mathematical function to create a learn crucial from which to derive all other keys in a very deterministic way. BIP39 https://www.protopage.com/gwetertzqn#Bookmarks