java
java copied to clipboard
AffineCipher decryption function value.
In the AffineCipher README.md, it states the value of y is the numeric value of an encrypted letter, ie. y = E(x). Should y = x, where x is the letter's index from 0 - length of alphabet - 1, in the decryption function?
The README.md states:
the decryption function is:
D(y) = a^-1(y - b) mod m
- where
yis the numeric value of an encrypted letter, ie.y = E(x) - it is important to note that
a^-1is the modular multiplicative inverse ofa mod m - the modular multiplicative inverse of
aonly exists ifaandmare coprime.
If you let y = E(x), I believe this just shows that D(y) is the inverse of E(x).
This issue has been automatically marked as action/stale because it has not had recent activity. Please update if there are new updates to provide.
I'm pretty sure this was fixed in the problem-specifications, since it now uses i instead of x in the encryption function. See #2370.