3

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.

blake8086
  • 163
  • If associativity was also assumed, then it would determine a vector space over $\Bbb F_2$. Cannot you just borrow 6 more symbols? : ) – Berci Jun 17 '13 at 01:47
  • I was hoping to make an educational example of a block cipher by showing steps from simple alphabetic substitution cipher up to more complex things. If I can just borrow symbols, I might as well encrypt bytes, don't you think? :) – blake8086 Jun 17 '13 at 02:20

0 Answers0