secret A + pubkey B = secret B + pubkey A this is the entire premise of Diffie Hellman Key Exchange if that equation doesn't hold, then one side has something wrong with it, and is not as labeled