One idea is to use [BIP32 HD paths](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) to create nonces instead of private key. For reference, the old key derivation path was as follows: `m'/xx'/coin_type'/account'/key_chain/index`. The new paths would look like: `m'/xx'/coin_type'/account'/key_or_nonce/key_chain/index` where another node is inserted after the account to indicate whether you're deriving a private key or a nonce. While it is not backwards-compatible with the previous key generation scheme, it allows us to easily keep track of nonces while also inflicting possibly greater penalty on double spending. If the private key (xpriv) is ever revealed during this scheme, and if the xpub of `m/xx'/coin'/account'` is known, then all nonces and all private keys that have been used so far can be [derived and sweeped](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#implications).
0 commit comments