The PPC-xx Hand Cipher


Home Hand Ciphers


The PPC-xx cipher (Pencil-and-Paper Cipher - xx) is a complex handcipher, used to encrypt a message, containing letters, numbers and spaces. There are four variations, each with a different key system. PPC-xx is a highly secure cipher, with a key space of at least 10E18*47 (PPC-N). PPC-xx uses three steps: an extended straddling checkerboard, a normal columnar transposition and a disrupted columnar transposition. The combination of fractioning by the checkerboard and the double disrupted transposition makes PPC-xx a very powerful encryption method. A variant of PPC-xx with a more complex keying system is the
Secom cipher.

Before explaining the PPC-xx Cipher, we will show the four different key systems. For each method, the first part is used for the checkerboard, the second for the first transposition and the third part for the second (disrupted) transposition. Although both sender and receiver must agree on the keying method, one can determine the used keying by looking at the key format.

PPC-N

With PPC-N, Pencil-and-Paper Cipher - Numbers, the checkerboard and transposition keys are determined by a fixed length of 10 digits (0-9) each. Checkerboard and both transposition are 10 columns wide.

Example Key:

3971285460 - 9632587401 - 0987654321

The checkerboard and transpositions order are applied with the same order as the key, with 0 as last digit.

Key format (in groups of five):

39712 85460 96325 87401 09876 54321

PPC-NE

With PPC-NE, Pencil-and-Paper Cipher - Numbers Extended, the checkerboard key is determined by a fixed length of 10 digits (0-9), and both transposition keys are determined by a series of numbers, written out in two digits (01-nn), where the two transposition keys are separated by '00'. Both transpositions can be up to 99 columns wide, which gives an astronomical number of possible keys.

Example Key:

2587413690 - 0602140304110105070813091012 - 00 - 0702110310040501060809

The checkerboard order is determined by the first 10 digits, with 0 as last number. The first transposition order is read out, in two-digit figures, until '00' is reached. The second transposition starts after the '00'.

Key format (in groups of five):

25874 13690 06021 40304 11010 50708 13091 01200 07021 10310 04050 10608 09

PPC-A

With PPC-A, Pencil-and-Paper Cipher - Alphabet, the checkerboard and transposition keys are determined by the order of the letters of the alphabet, where the transposition keys are separated by 'X'. The letter 'X' should not appear in the three keys parts. Therefore, each transposition can be up to 25 columns wide.

Example Key:

HJKRDCVAWP - DEEGUJCSASAZE - X - GTFDCLPMSDETGFGGHIKJ

The checkerboard and transpositions order are applied in the alphabetical order. Assign 1 to the first letter of the alphabet, and so on, and assigning digits in order to identical letters (example: DACAB gives order 51423).

Key format (in groups of five):

HJKRD CVAWP DEEGU JCSAS AZEXG TFDCL PMSDE TGFGG HIKJ

PPC-W

With PPC-W, Pencil-and-Paper Cipher - Words, the checkerboard and transposition keys are determined by the order of the letters in the words or pieces of a sentence, where the checkerboard uses the first 10 letters, and the transposition keys are separated by 'X' or by using a new line. The width of both transpositions is unlimited, giving a large key space. However, the key space is less than which is mathematically possible, due to the use of words and/or sentences. To optimize the key space, use many small words.

Example Key:

DOWHATEVER - YOUNEEDTO - ACHIEVEYOURGOAL

The checkerboard and transpositions order are applied in the alphabetical order. Assign 1 to the first letter of the alphabet, and so on, and assigning digits in order to identical letters (example: DACAB gives order 51423).

Key format 1:

DO WHATEVER YOU NEED TO X ACHIEVE YOUR GOAL

Key format 2:

DO WHATEVER YOU NEED TO
ACHIEVE YOUR GOAL

Enciphering a message

We will demonstrate the encryption technique by the following example:

Plain text:

RV TOMORROW AT 1400PM TO COMPLETE TRANSACTION USE DEADDROP AS USUAL

Step 1 - The Checkerboard

Determine the key order for the checkerboard according to the key system used (PCC-N, PCC-NE, PCC-A or PCC-W). Note that in each key system, the checkerboard is determined by the first 10 digits or letters.

In our example, we use the order 8139065427. These 10 digits are used as the top row of numbers for a straddling checkerboard.

The second row of the checkerboard contains the highest frequency letters ESTONIA, with a blank in the 3rd , 6th and 9th square. Write the digits, located above an empty square, downwards in the first column. Complete the checkerboard with the following letters and numbers:

B C D F G H J K L M
P Q R U V W X Y Z *
1 2 3 4 5 6 7 8 9 0

However, we start the filling of the rows in the column, pointed to by the digit at the left of that row. In our example, the start positions are underlined. Complete until the end of that row and proceed at the beginning of the row. If the left row digit is 0, the filling will start at the last, rightmost position.

 | 8 1 3 9 0 6 5 4 2 7
 +--------------------
 | E S   T O   N I   A
3| L M B C D F G H J K
6| W X Y Z * P Q R U V
2| 0 1 2 3 4 5 6 7 8 9

We convert the plain text into numbers according to the straddling checkerboard. If a letter is located in the top row, it is replaced by the digit above it. If the letter or number is located in one of the numbered rows, it is replaced by the digit of its row, followed by the digit of its column.

R V * TOM OR R OW * AT* 1 4 0 0 P M * TO* C OM P L ETE* 
64676090310646406860796021202828663160906039031663889860

TR ANSAC TION* U SE* D EAD D R OP * AS* U SU AL
964751739940560621860308730306406660716062162738

Step 2 - The Columnar Transposition

The first transposition is a simple columnar transposition. Determine the width and order of the first (normal) columnar transposition, according to the key system used (PCC-N, PCC-NE, PCC-A or PCC-W) and fill the transposition block, row by row, with the numbers, obtained by the checkerboard conversion. At this stage, null digits are appended to the message, so that it will fill a whole number of 5-digit groups. In our example, we add one null digit.

In our example, we will use FCGKHADEILJB as the order of the transposition. We will use letters to make things easier, since we have more than 10 columns:

FCGKHADEILJB
------------
646760903106
464068607960
212028286631
609060390316
638898609647
517399405606
218603087303
064066607160
621627380

The message is then read off in columns, using the top row letters alphabetically or digits ordinally as the transposition key:

088089367 60167630 461031162 962364063 008900808 642665206
642987841 662699062 376095770 06314006 700083606 19636631

Step 3 - The Disrupted Columnar Transposition

Determine the width and order of the second (disrupted) columnar transposition, according to the key system used (PCC-N, PCC-NE, PCC-A or PCC-W). In our example, we will use KIDJAFBCGEH as the order of the transposition. We will use letters to make things easier, since we have more than 10 columns.

To apply a disrupted transposition, we first determine and fill the triangular areas, and then fill the remaining area. The first triangular area starts at the top of the column which will be read out first, and extends to the end of the first row. It continues in the next row, starting one column later, and so on until it includes only the digit in the last column. Then, if possible, after one full row, a second triangular area starts, this time in the column which will be read out second. A third, fourth, and more triangular areas can be added, if enough rows are available.

Since we know that the message is 105 digits long, we know that we have to fill 9 rows with 11 digits, and 1 row with 6 digits. First, we fill the transposition block row by row with the numbers from the first transposition, first avoiding the triangular areas:

KIDJAFBCGEH
-----------
0880
89367
601676
3046103
11629623
640630089
0080864266
52066429878
416626
990623XXXXX

Next, we fill in the triangular areas, row by row as well:

KIDJAFBCGEH
-----------
08807609577
89367006314
60167600670
30461030083
11629623606
64063008919
00808642666
52066429878
41662636631
990623XXXXX

Again, the message is read off in columns, using the top row digits as transposition key:

7771938622 000320423 960038296 8314608060 717801673 6060606463
536069686 740369681 8900140219 0666260666 0863160549

Finally, the digits are divided in groups of 5 to get the fully encrypted message:

77719 38622 00032 04239 60038 29683 
14608 06071 78016 73606 06064 63536 
06968 67403 69681 89001 40219 06662 
60666 08631 60549

Decrypting a message

To decrypt a message, we determine the checkerboard and transposition orders, according to the key system used (PCC-N, PCC-NE, PCC-A or PCC-W). Next, we apply the transpositions in reverse order.

We create the block for the second -disrupted - transposition, with the appropriate column lengths and triangular areas. We fill in the encrypted message column by column, according to the 2nd transposition key. First, we read of the message row by row, avoiding the triangular areas. Next, we read off the triangular areas, also row by row.

The result is filled in the first - simple - transposition block, also created with the appropriate column lengths, column by column according to the 1st transposition key. Again, we read off the digits row by row.

The resulting sequence of digits is converted to plain text, using the checkerboard. Note that, at the end of the sequence, up to four null digits could be added to complete a block of five, and should be disregarded during conversion.

Notes on the key space

We can calculate the number of possible sequences for a given transposition width. On keying systems with variable transposition width (PCC-NE, PCC-A or PCC-W) it is advisable to use a width of at least 10 rows, one width an even number of digits or letters, and one with an odd number. The checkerboard has a fixed width with 3,628,800 different ways to fill the top row. To calculate the total key space, we need to use each of the three sequences:

Total key space = 3,628,800 x key space T1 x key space T2

For PCC-N, the method with the smallest key space where all key parts have a fixed size of 10 digits, we have:

3,628,800 x 3,628,800 x 3,628,800 = 47,784,725,839,872,000,000 possible keys ( 10E18*47 )

Width Ways to fill (key space)
2 2
3 6
4 24
5 120
6 720
7 5040
8 40,320
9 362,880
10 3,628,800
11 39,916,800
12 479,001,600
... ...


Copyright 2004 - 2014 Dirk Rijmenants

Home Hand Ciphers