0
$\begingroup$

I reading a book on the 2 of n escrow protocol. The mathematical algorithm continues as follows:

Given two equations

$x_2k_1 = (x_2(a x_1) + K)$ mod p

$x_1k_2 = (x_1(a x_2) + K)$ mod p

The book says by subtracting one from the other I end up with

$x_2k_1-x_1k_2=x_2K - x_1K$ mod p

I'm new to modular arithmetic and I'm seemingly doing something wrong somewhere. When I try this I end up cancelling everything out since however I manipulate it I end up with 0.

I've tried using the formula :

(A - B) mod C = (A mod C - B mod C) mod C

However I struggle to see how it applies exactly to this one since what's happening is essentially

(A + B) mod C - (A + B) mod C = 0

Any help would be appreciated.

$\endgroup$
  • $\begingroup$ Are you sure it's $x_2(ax_1) + K$? It seems like it should be $x_2(ax_1 + K)$. $\endgroup$ – Michael Albanese Nov 23 '15 at 3:20
  • $\begingroup$ @MichaelAlbanese Hi, yes that's correct. The algorithm in the University study program book is wrong. Thanks for that. $\endgroup$ – user3168961 Nov 28 '15 at 14:46
  • $\begingroup$ Please edit your question to include this information. $\endgroup$ – Michael Albanese Nov 28 '15 at 14:47
  • $\begingroup$ that is the answer to my question $\endgroup$ – user3168961 Nov 28 '15 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.