# Integrated Payment Proofs and Round Minimization

**URL:** <https://forum.grin.mw/t/integrated-payment-proofs-and-round-minimization/7745>\
**Category:** Development and Technical Discussion\
**Created:** [August 26, 2020, 1:44pm UTC](https://forum.grin.mw/t/integrated-payment-proofs-and-round-minimization/7745 "2020-08-26T13:44:22Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Kurt](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/kurt/32/3361_2.png) [@Kurt](https://forum.grin.mw/u/Kurt)\
**Post date:** [August 26, 2020, 8:53pm UTC](https://forum.grin.mw/t/integrated-payment-proofs-and-round-minimization/7745/7 "2020-08-26T20:53:42Z")

</div>

> [@tromp](#):
>
> Assuming that a signature with nonce R requires knowledge of kB, this constitutes agreement by party B to accept such a signature as proof of payment.

The assumption is wrong. Yoopa, another attack.

Let’s say I am party A, and I want to fake a payment to party B, with fixed nonce `RB`.

I generate a random scalar `r`, and set my `RA` as `RA = r.G - RB`.

I set some random scalar `x` as well. The magic happens (rogue-nonce attack) when you see that  
`s = r + h + e.x` is a valid signature for `X = x.G` and for total nonce `RA + RB + h.G`. And me, party A, actually don’t know neither of the private keys to `RA` or `RB` !

Using this kernel, I can prove that I paid B without him participating at all : /

> [@antioch](#):
>
> Combine this with a payjoin 2-2 transaction structure - the direction of the transaction is hidden, during tx building.  
> Sender and receiver are interchangeable, A-\>B would look identical to B-\>A.

That sounds magic. This (almost 1 month old) can go either way as well: [Eliminating finalize step - #22 by Kurt](https://forum.grin.mw/t/eliminating-finalize-step/7621/22). People can choose!

Anyways, not sure why you happened to get rid of the Diffie-Hellman @tromp. It’s not like I haven’t insisted on the need of Diffie-Hellman in several posts of the other thread. In particular note the step 3. at the end of the post on the payment proof…

Indeed, the trick if one doesn’t like rogue-nonce attacks and prefers sound payment proofs is… Diffie-Hellman, and following exactly this, both sound in security and in payment proof:  
[Eliminating finalize step - #77 by Kurt](https://forum.grin.mw/t/eliminating-finalize-step/7621/77).  
It is a pretty good exercise to read and understand the steps in both links.

---

_[View the full topic](https://forum.grin.mw/t/integrated-payment-proofs-and-round-minimization/7745)._
