Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wallet] BIP32 deterministic key derivation (towards mint-assisted backups) #92

Closed
callebtc opened this issue Jan 12, 2023 · 3 comments
Closed
Labels
enhancement New feature or request mint About the Nutshell mint nuts NUT specs related wallet About the Nutshell wallet

Comments

@callebtc
Copy link
Collaborator

Summary

Generate random values in the wallet deterministically in order to enable mint-assisted backups.

Description

In their current implementation, Cashu wallets generate random secret's and blinding_factor's to be signed by a mint. Using a deterministic derivation scheme like BIP32 could in principle allow a wallet to restore these quantities from a single seed phrase.

This has no immediate benefits per se but it enables something that, afaik, is an unsolved problem with ecash systems so far, namely backups. If a wallet could re-generate these random values when restoring a backup, in principle, it could be able to restore the BlindedSignature's with the help of the mint. The mint would simply have to keep a log of all produced BlindedSignature's and re-send them to the wallet that requests a backup restoration.

Initially, this would be a free service, but in case the data burden ever gets too large, the mint could ask for a small fee for this service. For closed systems, the benefits seem to far greater than the costs.

@dpc
Copy link

dpc commented Jan 16, 2023

Hi. For reference: I've implement this for Fedimint and it's documented in https://github.com/fedimint/fedimint/blob/3f746db89326bc2ec0872c5434d397e7e6d566d0/docs/backup_and_recovery.md

For anyone that will be working on this: I'd be happy to chat, exchange ideas and I hope to get a second pair of eyes on the whole scheme this way.

@callebtc callebtc changed the title TODO: BIP32 deterministic key derivation (towards mint-assisted backups) [Wallet] BIP32 deterministic key derivation (towards mint-assisted backups) Mar 4, 2023
@callebtc
Copy link
Collaborator Author

callebtc commented Mar 4, 2023

Sorry for missing this @dpc. Yes, very interesting! So nice to see that we came to the same solution independently, that tells me that this is a good path.

I've teased a PoC here: https://twitter.com/callebtc/status/1620186555993456641

It seems to work. My current state (haven't worked much on it the last few weeks) is in the deterministic_secrets branch. I will follow up on this for sure.

@callebtc callebtc added enhancement New feature or request wallet About the Nutshell wallet mint About the Nutshell mint nuts NUT specs related labels Apr 28, 2023
@callebtc
Copy link
Collaborator Author

Fixed in #131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mint About the Nutshell mint nuts NUT specs related wallet About the Nutshell wallet
Projects
None yet
Development

No branches or pull requests

2 participants