You have a 4 number long PIN code with each number ranging from 0 to 9 which you wish to encrypt. You are then given a random 4 digit number ranging from 0 to 9999, which when added to the original PIN should give out a perfectly secure encrypted number.
Now clearly, just adding the two numbers would give an uneven distribution (a Gaussian curve), as if for example the PIN was 0000
and the random number was 0001
, you can rest assured that the original PIN is either 0000
or 0001
, while if both integers add up to 9999, there are 19998 possible outcomes.
So my initial thought was that applying the mod of 10000 (because there are 10000 possible combinations) to the sum should ensue an even distribution, making this encryption scheme perfectly secure. Now I honestly really don't know how to prove this, but my main question is how can you convert this somewhat meaningless number back to the original PIN? Is this actually (maybe not effective) perfectly secure? The point of this exercise is that the two users only have common knowledge of the random number, so I don't think any modulus exponent tricks are accessible.