Pentagraphic cipher
From: Amnesiac (google_at_faupel.org)
Date: 07/07/05
- Next message: Amnesiac: "Re: Pentagraphic cipher"
- Previous message: Douglas A. Gwyn: "Re: detecting keystokes via satellite"
- Next in thread: Amnesiac: "Re: Pentagraphic cipher"
- Reply: Amnesiac: "Re: Pentagraphic cipher"
- Reply: Douglas A. Gwyn: "Re: Pentagraphic cipher"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 7 Jul 2005 08:00:34 -0700
Like many amateur cryptographers, I read David Kahn's "The
Codebreakers" and was piqued by his assertion (about Playfair) that
"other cryptographers have tried to extend the geometrical technique to
trigraphic substitution. Nearly all have failed." This is, of course,
a challenge to invent a trigraphic substitution cipher. I duly came up
with one some years ago (I can post it if requested), but for some
reason it popped into my head last night that the technique would work
even better to produce a really simple pencil & paper pentagraphic
cipher.
I've not come across this in any of the books I've read and I can't
find any reference on the web to anything like it, so I thought I'd
post it here to see if a) anyone had seen something similar, or b) it's
hopelessly flawed in some way I haven't spotted.
Step 1: Produce a 5x5 alphabet grid, the same as you would for
Playfair, with each axis numbered 0 - 4, for example:
|0|1|2|3|4 Created using BLACK DOG as the keyword and
----------- knight's move to fill it in. Following the
0|B T I K X convention of Playfair, I and J are combined,
1|Q E L U M but you can use whatever solution you wish to
2|D Y R F A cram 26 letters into 25 spaces (e.g. combine
3|V N O Z S K & Q, U & V, represent X as KS etc.
4|H C W P G
Step 2: Divide the plaintext into groups of five letters
and write each letter's coordinate in the grid underneath,
separating X and Y coordinates onto different lines. For each group of
5, sum each row mod 5.
A B I G S | E C R E T |
4 0 2 4 4 |4 1 1 2 1 1 |1
2 0 0 4 3|4 1 4 2 1 0|3
Step 3: Add the sum of the X coordinates to each Y coordinate and the
sum of the Y coordinates to each X coordinate, again mod 5:
A B I G S | E C R E T |
4 0 2 4 4 |4 1 1 2 1 1 |1
2 0 0 4 3|4 1 4 2 1 0|3
4444444444 3131313131
---------- ----------
3144143332 4240034241
Step 4: Add in a further vector (again mod 5), which is used to ensure
that duplicate letters in the original do not encode to the same letter
in the ciphertext:
A B I G S E C R E T
4 0 2 4 4 |4 1 1 2 1 1 |1
2 0 0 4 3|4 1 4 2 1 0|3
4444444444 3131313131
---------- ----------
3144143332 4240034241
0001020304 0001020304
---------- ----------
3140113131 4241004040
Step 5: Convert back to letters, using the original grid:
3140113131 4241004040
U X E U U A M B X X
Done!
Decoding is a simple reversal of the process, i.e. first subtract the
fixed vector, then sum the rows, then subtract the sums from the
values:
U X E U U A M B X X
3140113131 4241004040
0001020304 0001020304
---------- ----------
3 4 1 3 3 |4 4 4 0 4 4 |1
1 4 4 3 2|4 2 0 3 2 1|3
4444444444 3131313131
---------- ----------
4200204443 1114221110
A B I G S E C R E T
The technique works because you're adding the same value 5 times and
then doing mod 5 arithmetic, so the sum of the coordinates remains the
same after encryption and can be recovered for decryption.
It can lead to letters being encoded by themselves but only at a rate
of 1 in 25, and (due to the add-in vector) with no more than 1 in any
group of 5. Given this, I think this could be better than systems
which guarantee never to encode as the same letter, as that gives the
cryptographer a small amount of additional information to work with.
A final note about the vector. This could be a fixed value as shown
above (0001020304), but there are alternatives:
- You could pick one at random and then send it as part of the message
encoded as a 5-group in a pre-agreed location within the message
(first, last, third from end etc.) The encoding is simply done by
reading the letter equivalents for the numbers from the encoding
square. This requires care as the 5-group will always have five unique
letters - a pattern that could be spotted in a sequence of message
traffic.
- You could have a form of chaining by starting with a fixed vector
for the first group and then using the encoded value of the previous
group as the vector for the next. This has the additional good property
of allowing identical plaintext groups to be encoded as different
ciphertexts at the cost of removing the property of having no more than
1 letter in any group encoding as itself.
Cheers,
Matthew
- Next message: Amnesiac: "Re: Pentagraphic cipher"
- Previous message: Douglas A. Gwyn: "Re: detecting keystokes via satellite"
- Next in thread: Amnesiac: "Re: Pentagraphic cipher"
- Reply: Amnesiac: "Re: Pentagraphic cipher"
- Reply: Douglas A. Gwyn: "Re: Pentagraphic cipher"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|