I want a function for enciphering a single letter that takes two letters as input, produces one letter as output, and has the same properties as bitwise XOR. The problem is that the range of inputs (26 letters) is not a power of a prime number.
IE, for letters a, b, c, and "zero" (where "zero" could be an particular letter)
a^a=0, a^0=a
a^b=b^a
a^b=c, a^c=b, b^c=a
Does such a function exist? I'm guessing from the https://en.wikipedia.org/wiki/Involution_(mathematics) page that there are 532985208200576 such functions, but I don't know how to find them.