Arsenio encryption

© Francisco Ruiz, 2016

This page implements the paper-and-pencil "Arsenio" cipher by F. Ruiz, similar to the "Restonia" cipher but with an international-friendly straddling checkerboard (the letter "T" is highly frequent only in English), for those who wish to use a computer as a convenience. All steps can be performed by hand without excessive effort. The process is described in detail in this article, for the Restonia cipher.

Arsenio uses a passphrase made of at least two words. A straddling checkerboard is used for encoding text into decimal digits. Then each word of the passphrase is used as key of a columnar transposition. If a word has less than four characters, it will be merged with the next for this purpose.

To decrypt, the transpositions are reversed, in reverse order, and then the digits are decoded back to letters. The whole process is quite fast since transpositions are fast.


Step 1. Encoding set-up

First let us enter the passphrase in the box below, which is shaded blue like all the other boxes where you can enter something.


First we decide whether the default "Arsenio" checkerboard encoding is to be used, or a similar one derived from the passphrase. This is the Arsenio checkerboard:

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

where "+" designates a space and "=" a period or other important punctuation. To use the checkerboard, simply replace each letter, space or strong punctuation with a single-digit (top) or two-digit code (first left, then top digit), as shown on the checkerboard. Examples: s = 3, h = 96, p = 01.

A passphrase-derived checkerboard would be made this way: count the number of letters in the first two words of the key text (mod 10); these become N1 and N2; if there is only one word or all the words have equal length, take N2=N1+1 mod 10. Then order the letters in "arsenio" plus the space, as they appear in the first sentence of the key text (before the first period) and assign to them the single numerals 1-9,0, skipping N1 and N2. Do the same for the rest of the letters in the English alphabet, placing them in the two rows headed by N1 and N2, then follow with the '.' character, and then the letters that are not in the key text, in reverse alphabetical order (if they are part of "arsenio", they go on the top row, in reverse "arsenio" order). The encoding pattern is displayed below (+ represents a space, = a generic punctuation mark).

Encoding Pattern


Let us now tell the program what we want to do by checking one of the two buttons below. The difference is that the transpositions are performed in reverse order. The conversion between text and digits, which considers spaces and periods as part of the text when encrypting, is different when decrypting, which ignores those.

     Encrypt     Decrypt

And let us also decide whether or not we are basing the encoding on the key text. Warning: encrypted messages using default encoding can be altered by an adversary, plus the key text can be recovered if the plaintext is known.

     Passphrase-derived checkerboard     Default checkerboard


Step 2. Plaintext encoding / Ciphertext preparation

Now we write the plaintext that we wish to encrypt, which will be converted to lowercase. Punctuation marks other than periods, colons, exclamations and interrogations are ignored. Spaces are encoded as high-frequency letters. Diacritical marks (accents) are ignored. If there are any numbers, they are first converted to letters as in a = 1, ... i = 9, j = 0. Plaintext numbers are not decoded back upon decryption, but hopefully the user can spot them easily.

Plaintext / Ciphertext as letters

And this is the same text, encoded as decimal digits. If now you type into the Encoded Plaintext box, its contents are automatically decoded and the result placed in the Plaintext box. When decrypting a ciphertext already encoded as digits, we start with the next box.

Encoded Plaintext / Ciphertext as digits


Step 3. Transpositions

The next step is to transpose this, using each word of the passphrase as a permutation key. A permutation key contains the integers 0 to N, where N is the number of rows (which may be partially filled), in an order different from normal. The process to obtain it is as follows: 1. Find the letter in the word that is the first in alphabetical order and mark that with 0, then mark the next one with 1, and so on until all are marked. 2. if a letter appear twice, give a number first to the one appearing latest in the word, then the next to last, and so on.

The table below shows the permutation keys obtained:

Permutation keys

And now we apply each one to the encoded plaintext. We do it this way: 1. Write the permutation key, and below it the plaintext making consecutive rows of the same length until the plaintext is exhausted. 2. Then read off the table by columns, beginning with the one with "0" at the heading, then the one headed by "1", and so on. Some columns may be longer than others. The result of each transposition is represented as a row in the table below. The final row is the ciphertext, which is repeated in the first green box.

If we are decrypting, the tables are filled by columns, following the order given by the key, and then read off by consecutive rows. The last word in the passphrase is used first, the first last.


Step 4. Encrypted Ciphertext / Decrypted Plaintext

Raw Ciphertext / Encoded Plaintext

Finally (optionally, when encrypting), we decode the result back to letters using the encoding pattern. When encrypting, it is possible to find a single N1 or N2 digit at the end. In this case, we convert N1='!' and N2='?'

Text-based Ciphertext / Final Plaintext

Some statistics on the numerical ciphertest will appear here