It is the dimension of the field of play that is crucial.
There are 26 letters in the alphabet and a space is used to separate the words. 26+1=27=3^3.
interpreting letters as numbers in trinary form.
In base 3 or trinary numbers the digits for the number are the 'tri-bit' (0-2) times the power of 3 for that digit.3^2=9,3^1=3,3^0=1
The alphabet as trinary numbers is.-space = 000
a-001 b-002 c-010 d-011 e-012 f-020 g-021 h-022 i-100 j-101 k-102 l-110 m-111 n-112 o-120 p-121 q-122 r-200 s-201 t-202 u-210 v-211 w-212 x-220 y-221 z-222
The algorythm uses an XOR-like logic.
XOR truth table
0 XOR 0 = 0 1 XOR 0 = 1
0 XOR 1 = 1 1 XOR 1 = 0
Given input of two bits A and B with the XOR result being C, A further XOR of C with A results in B or C XOR B resulting in A.
The 3 values are a complementary set-any two returns the third element in the set.
In Binary this complementary relationship can be represented by two sets of bits.
1-000-input of 0 and 0 returns 0.
2-011-input of any two of these 3 bits returns the third bit.
I refer to this complimentary relationship of bits as triplets for the rest of this post. From here I extrapolated to how a trinary system 'might' work in a similar manner.
I started with the triplet 012 -input any 2 and the result is the third.
That left 000 111 and 222 as the forced other triplets.
if the bits match then the output is the same, if they differ the remaining alternative bit is returned. (all or neither)
describe it
encryption
d=011..e=012..s=201..c=010..r=200..i=100
e=012..n=112..c=010..r=200..y=221..p=121
c=010..w=212..q=122..0=120..w=212..n=112
The last line is the beginning of the last line in the encrypted text in the puzzle. Decryption works exactly the same way. Encrypted text + encryption key returns the decrypted text. Or -decrypted and encrypted text returns 'encryption key'...
Since posting this puzzle I read an article on quantum computers and encryption.(Scientific American I think) The author made a point that I pursued. He implied that data encryption could use the MOD 2 function (With binary input).
If you look at the XOR truth table above you can see that mod 2 of the sum of the 2 inputs is the result of the XOR function.
The rest of this post is what I've elaborated since posting the puzzle.
The general formula for generating succesive encrypted bits in number system N using a MOD operator.
C=(2*N+Offset-A-B) MOD N
(2*N to guarantee a positive MOD result in any programming language.)
A and B are the input bits - (from data and encryption key), C is the resulting bit. 'Offset' is a value 0<= Offset < N
Looking at the sums of the columns in the puzzle example above you can see that the columns all add to 0, 3 or 6 (because offset is 0 for this puzzle)
For the Binary XOR function in this MOD function model.
N= 2.Offset = 0. N=2 Offset =1 generates the same values as the NOT XOR function.
Remember, the sum for the two input bits plus the return bit is a multiple of n-your number system plus the offset.
Clearly the offset can be adjusted bit by bit by a second key or a different position in the key and further befuddle attempts to decrypt the data. (I'm sure encryption algorythms would use all of this, bit-swapping, and more)
I said the trinary with elaboration works with bytes. Trinary numbers don't fit together cleanly with bytes. Nonetheless a byte encrypted with a 6-bit trinary key fits inside a 6 bit trinary number 3^6-1=729-1 (max) which is less than 10 bit binary numbers 2^10-1=1024-1 (max). The encrypted data then would be 10 binary bits to represent 1 former byte now in it's encrypted trinary form as a binary number. As a bit stream every 5 bytes would represent 4 'values'.
(Hexidecimal numbers -base 16 and base 4 numbers- Quadral? fit into bytes like a hand in a glove.)
I pointed out that the XOR function is equivalent to A+B mod 2. The formula I gave uses (2*N-A-B + Offset). Binary is the only number system where (A+B+Offset) MOD N works as an encryption/decryption device, that is, it gives the same result as the general formula.
Addendum: In the puzzle a 'brute force' attack on the encryption, given enough data, would resolve into valid letter triplets asociated with the solution.For example matching letters in the encrypted text and the 'encryption key' always yeild the same letter, similarly any two different letters always have the same third letter asociated with them. In the puzzle (N=3 Offset=0) there are 144 letter triplets - counting the obvious aaa bbb...etc. Without these obvious ones you get 117 other triplets. There are 135 letter triplet in each of the other 2 offsets. This Addendum is all irrelevant trivia.