# Looking for the inverse of the following equation

I am working on some image encryption algorithm and got stuck.

I have plaintext data value of $256$ and perform the following (all values in decimal):

$$[256 \oplus 2] mod (256) = 0$$

What will be the equation to decrypt the ciphertext $0$?

EDIT - Sorry...I actually intend to do mod 2 and not mod 256 if the answer of $[x \oplus 2]$ exceeds 256. I realized I'll just have to workaround this problem, since the '0' is not an acceptable value in my program. Thanks...

• The given equation evaluates to false and there are no variables in there so it can never be true.
– SEJPM
May 22 '17 at 11:22

You can either try to grasp what @SEJPM already commented:

The given equation evaluates to false and there are no variables in there so it can never be true.

Or you can look at it in an even more simple way:

Your formula is wrong in the first place since $256 \oplus 2 \pmod {256} = 2$ and not $0$ as you imply.

Check the sub-steps:

$256 \oplus 2 = 2 \\2 \pmod {256} = 2$

Therefore

$256 \oplus 2 \pmod {256} \ne 0$

As your formula does not have any variable that might explain how $256 \oplus 2 \pmod {256}$ would result in $0$, the formula doesn't really make sense from a mathematical point of view.

Things would be different if your formula would have read either $x \oplus 2 \pmod {256} = 0$ or something like $256 \oplus 2 - x \pmod {256} = 0$, but that's obviously not the case in your Q.