Ecash backups with Cashu BTC (work in progress, soonTM)
How it works right now:
- To mint ecash, Cashu wallets generate *random* `secret` and `blinding_factor` (the two secret ingredients).
- The mint signs these blindly and sends you back the blind signature.
- Wallets unblind that and treat the unblinded signature + secret as money.
Problem: If you lose your DB, your ecash is gone. How do you get it back? Since the secret + blinding factor were random, there is now way.
Idea: Generate secrets + blinding factors **deterministically** (similar to BIP32 HD wallets) from a single seed you need to back up. Use the mint's cooperation to restore blind signatures on them. Mint operators could offer this for free or ask for a small fee for the service.
This is what happens when you lose your ecash and want to restore it:
- Enter your seed into wallet
- Wallet regenerates `n` pairs of `(determinstic_secret, determinstic_blinding_factor)`
- Generate blinded secrets from that (like previously!)
- Wallet asks the mint to restore signatures on them.
- The mint keeps a list of their previous signatures. If The signature was already issued, it reissues it.
- Wallet unblinds signatures with `determinstic_blinding_factor`
- Retry the same with the next `n` pairs until the mint stops issuing signatures.
Thoughts?