The good thing is, in 2012 the developer Pieter Wuille created the BIP32 specification at the base with the hierarchical deterministic wallets. Collectively with it, Pieter produced a mathematical operate to produce a grasp vital from which to derive all other keys within a deterministic way. This text explains BIP39, https://files.fm/u/42yjf8vs7r