add deterministic NUT-20 quote locking derivation#373
Conversation
|
|
||
| Where: | ||
|
|
||
| - `129373'` is the registered SLIP-0044 coin type for Cashu. |
|
As per my comment on the related deterministic P2PK key spec ( #331 ), unless there is an overwhelmingly strong reason to use BIP32, then a HMAC-SHA256 KDF is much faster, unless BIP-32 is carefully handled. |
|
I have proposed a HMAC-SHA256 KDF derived alternative, which would close this PR |
Iirc this has been discussed in the past in Leitos original PR for P2PK locking keys. Using BIP32 might be a tad slower, but it leaves the possibility to build something with the extended public keys. Imagine a watch-only wallet for mint quotes |
Yeah, am not convinced it would not be a huge linkability issue compromising privacy. I mentioned it in my replacement pr |
This is both a bug and a feature. I think we have general consensus about a quote-lookup-by-pubkey API, so this would literally allow watch-only / notification / aggregation services. |
Yeah, unfortunately that was kind of a premature shipping before spec sign off. We moved away from bip32 for keysets v2+. Baking that dep into future stuff means apps will have to carry it a long time more. The performance gain is only marginal if you are batch deriving. If you have to derive sporadically for any reason performance drops off a cliff |
robwoodgate
left a comment
There was a problem hiding this comment.
Following offline discussion, and the fact this is already live, I've closed #384.
Summary
Adds deterministic wallet seed derivation guidance for NUT-20 quote locking keys using the Cashu SLIP-0044 coin type and a NUT-20-specific BIP32 path.
Updates the NUT-20 test vectors with the first five derived compressed secp256k1 public keys for the documented mnemonic.
Validation
Egge21M:nut-20-lockingagainstcashubtc/nuts:mainwith the GitHub connector: 1 commit ahead, 0 behind20.mdandtests/20-test.md