mirror of
https://github.com/bits-wallet/specs.git
synced 2025-12-17 21:54:19 +01:00
Update 04.md
This commit is contained in:
3
04.md
3
04.md
@@ -31,7 +31,8 @@ When a sender wants to pay the recipient, the sender initiates a swap-in payment
|
|||||||
|
|
||||||
### 1. The sender first generates a preimage and a tweaked destination:
|
### 1. The sender first generates a preimage and a tweaked destination:
|
||||||
* Where the recipient npub is `R = r*G` , and the sender npub is `S = s*G`.
|
* Where the recipient npub is `R = r*G` , and the sender npub is `S = s*G`.
|
||||||
* The sender generates a 32-byte random element `rand`, and calculates a tweaked pubkey for the recipient: `R' = hash(s*R, rand)*G + R`.
|
* The sender generates a 32-byte random element `rand`
|
||||||
|
* The sender calculates a tweaked pubkey for the recipient: `R' = hash(s*R, rand)*G + R`.
|
||||||
* The sender generates a shared preimage secret for the recipient : `P = hash(rand)*G + R`
|
* The sender generates a shared preimage secret for the recipient : `P = hash(rand)*G + R`
|
||||||
* The sender `S` then sends a NIP-04 encrypted DM to the recipient containing rand and payment value.
|
* The sender `S` then sends a NIP-04 encrypted DM to the recipient containing rand and payment value.
|
||||||
* The recipient `R` can locally construct his tweaked pubkey `R'` and preimage `P` from the rand value, and the sender's npub `S`.
|
* The recipient `R` can locally construct his tweaked pubkey `R'` and preimage `P` from the rand value, and the sender's npub `S`.
|
||||||
|
|||||||
Reference in New Issue
Block a user