-
Notifications
You must be signed in to change notification settings - Fork 111
feat: P2BK #1253
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
base: main
Are you sure you want to change the base?
feat: P2BK #1253
Conversation
21cd6c4 to
15cade7
Compare
18a5b88 to
a38cbe0
Compare
thesimplekid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice just noticed one thing.
79b207d to
d00be74
Compare
|
Please note: keyset id has now been removed from the blinding factor calculation in the NUT spec. |
4723881 to
5c62738
Compare
fix and format fix for ffi crate align r_i derivation database migrations and crud update for `p2pk_e` strip p2pk_e at the exit door fix tests fix typo use p2bk for receiving remove unused import fix for SIG_ALL changes to payment request remove useless field Fix NUT-26 Pay-to-Blinded-Key implementation issues This commit fixes several issues in the NUT-26 implementation: 1. Resolved type mismatches with XOnlyPublicKey handling 2. Fixed scalar operations by using proper methods instead of direct operations 3. Implemented proper key negation for BIP-340 compatibility 4. Added P2BK support to the wallet's send options 5. Added integration test for P2BK ECDH key derivation The changes enable private 'silent payments' through blinded key operations that enhance privacy by preventing the mint from knowing the actual recipient. Implement NUT-26 Pay-to-Blinded-Key (P2BK) enhancements - Fixed ephemeral key handling to properly respect SIG_ALL flag - Use shared ephemeral key for all proofs when SIG_ALL is present - Use per-proof ephemeral keys when SIG_ALL is not present - Implemented blinding for all types of public keys in conditions: - Primary public key (slot 0) - Additional pubkeys (slots 1 to N) - Refund keys (slots N+1 to 10) - Added unit tests for nut26 core functions - Added nut26 support to payment_request implementations tests format try a fix format clippy format fix t vectors tests send: extract p2bk application from confirm function import parity -> strict documentation check connect to cdk-cli format remove apply blinding from send correct blinding of outputs pubkeys (not inputs) to a transaction There is a bug I can't find fixed the bug clippy more clippy + test fix allow HTLC to be blinded as well clippy fix slot assignment feature wallet on tests remove nut26 flag from payment request, as per spec update. format remove default trait add missing p2pk_e add more missing `p2pk_e`s use_p2bk flag rename to 28
82d52aa to
d8e4ef8
Compare
| description: Option<String>, | ||
| transports: Vec<Transport>, | ||
| nut10: Option<Nut10SecretRequest>, | ||
| nut28: Option<bool>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Payment request support has been removed from the spec for now
| let mut engine = Sha256::engine(); | ||
| engine.input(b"Cashu_P2BK_v1"); | ||
| engine.input(&z_x); | ||
| engine.input(&keyset_id.to_bytes()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyset_id was removed in latest spec
Pay-to-Blinded-Key (P2BK) Implementation for Enhanced Privacy
Overview
This PR implements NUT-26: Pay-to-Blinded-Key, a privacy enhancement for P2PK (NUT-11) transactions that enables "silent payments" in Cashu. P2BK allows tokens to be locked to a public key without exposing which public key they're locked to, even to the mint itself.
Key Features
Technical Implementation
User-Facing Changes
use_p2bkoption to the wallet's send operations to toggle P2BK functionalityChecklist
just final-checkbefore committing