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.