java icon indicating copy to clipboard operation
java copied to clipboard

AffineCipher decryption function value.

Open ericbalawejder opened this issue 5 years ago • 1 comments

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 y is the numeric value of an encrypted letter, ie. y = E(x)
  • it is important to note that a^-1 is the modular multiplicative inverse of a mod m
  • the modular multiplicative inverse of a only exists if a and m are coprime.

If you let y = E(x), I believe this just shows that D(y) is the inverse of E(x).

ericbalawejder avatar Oct 23 '20 15:10 ericbalawejder

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.

github-actions[bot] avatar Sep 23 '21 03:09 github-actions[bot]

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.

sanderploegsma avatar Sep 22 '23 11:09 sanderploegsma