Portax Tutorial

Introduction:

The Portax cipher is a periodic, digraph based cipher similar to the Slidefair. Like the Slidefair, it is based on one of the classic periodic ciphers (The Porta in place of the Vigenère, Variant or Beaufort used by Slidefair). The major difference between the two ciphers is the method of choosing the digraphs the cipher is applied too. In Slidefair the digraphs are taken sequentially from the plain text. In Portax, the plain text is laid out in pairs of rows of period length and the the digraphs are formed from the vertical columns. Why this is so will become apparent in a little while.

The example we are going to study is ND03 E-04:

QVNRE WLAEP MMTIA NOJJA LWWML MBBUA LUDAK CFXCC UMXCK ISAJJ FFTBP
UQIWU RYKCH UGMTH WHEMW CLFTI XJVMA PUGDW NIMPA VOCJI JRJDN BQZEM
HNKDL SZMEM WUGDI ZWADA KMBNK WOVPS VMHLM JRWJR AQIUO AUQBJ VWHLM
J

The Portax Slide:

At this point, a discussion of the Portax slide is important since (In my humble opinion) it is this ciphers greatest weakness. The slide is formed by two alphabets. Each alphabet is written in two sets of rows. The upper alphabet is the classic Porta slide. The lower alphabet is the the normal alphabet written alternately into two rows. The lower half of the slide (A1/2, A2/1, and A2/2) is allowed to move freely with respect to upper portion of the first alphabet (A1/1). The slide can be set in 1 of 13 positions. When set in the A,B position, the slide looks like this:

A1/1        ABCDEFGHIJKLM
Split       --------------------------
A1/2        NOPQRSTUVWXYZNOPQRSTUVWXYZ

A2/1        ACEGIKMOQSUWYACEGIKMOQSUWY
A2/2        BDFHJLNPRTVXZBDFHJLNPRTVXZ

If the slide were set in the C,D position it would look like this:

A1/1         ABCDEFGHIJKLM
Split       --------------------------
A1/2        NOPQRSTUVWXYZNOPQRSTUVWXYZ

A2/1        ACEGIKMOQSUWYACEGIKMOQSUWY
A2/2        BDFHJLNPRTVXZBDFHJLNPRTVXZ

Digraphs are enciphered as follows. The first letter of the digraph is located in alphabet A1 and the second letter of the digraph is found in alphabet A2. These are considered to form the diagonal of a rectangle. The other corners of the rectangle are found and then used as the cipher text. If the two letters of the plain digraph fall in the same column, the other two letters in that column are used to form the cipher text. In any case, the letter from A1 is used as the first letter of the cipher digraph and the letter from A2 is used as the second letter of the cipher digraph. For example,

In the A,B setting:

  • Plain text ‘at’ is enciphered as ‘JB’
  • Plain text ‘ta’ is enciphered as ‘NM’

In the C,D setting:

  • Plain text ‘at’ is enciphered as ‘ID’
  • Plain text ‘ta’ is enciphered as ‘NM’

Note that the encipherment of ‘ta’ was not changed by the setting of the slide. This is because the first letter of the digraph is located in the A1/2 portion of the A1 alphabet. This portion of alphabet A1 is fixed with respect to alphabet A2. In fact, all the plain text digraphs starting with letters n-z can be encoded in only one way (Unless both plain text letters fall in the same column). This accounts for the method used by Portax to pick digraphs for encipherment. If the encipherment were done in the same manner as Slidefair, almost half of the message could immediately be read!

Period Determination:

The simplest way to determine the period of a Portax is just brute forcing checking of the different possibilities. Essentially, we can just set the cipher up for a candidate period, find the digraphs that start with N-Z, decipher these digraphs, and see if the resulting partial plain text looks reasonable. Our problem cipher is good example of this. The first four cipher letters are in the N-Z range and will produce a reasonably long string of plain text which will let us quickly determine if the period being tested is correct. For example:

Period  Cipher Text  Plain Text   Notes

  4      QVNR         pysn        Reject
         EWLA         gqbi  

  5      QVNRE        ysap*       Reject
         WLAEP        grbi*    

  6      QVNREW       snpu*t      Reject
         LAEPMM       hqaj*s 

  7      QVNREWL      nput*j*     Reject
         AEPMMTI      gqbi*s*  
    
  8      QVNREWLA     putt*r**    Accept!
         EPMMTIAN     grai*s** 
    
  9      QVNREWLAE    uttw*n***   Reject
         PMMTIANOJ    hqaj*s***

Of the periods tested, only period = 8 produces a string of reasonable characters. Based on this, our initial assumption will be that the period is 8.

Keyword Determination:

Before beginning the work necessary to find the key word, arrange the cipher into groups of period length. This will greatly assist the determination of which digraph belongs to which keyword letter. This provides:

Pos.   12345678   
Key    ********   (Note two rows for each key letter since each
       ********   alphabet has two letters associated with it)
CT1 QVNREWLA OJJALWWM DAKCFXCC JJFFTBPU HUGMTHWH XJVMAPUG 
CT2 EPMMTIAN LMBBUALU UMXCKISA QIWURYKC EMWCLFTI DWNIMPAV 
pt1 putt*r** s****ns* *****r** ****v*so ****s*j* o*t**un*
pt2 grai*s** d****st* *****u** ****n*eo ****n*s* v*r**fo*

CT1 OCJIJRJD KDLSZMEM DAKMBNKW MJRWJRAQ VWH  
CT2 NBQZEMHN WUGDIZWA OVPSVMHL IUOAUQBJ LMJ
pt1 t****t** ***or*** *****t*s **un*v*r st*
pt2 d****i** ***ly*** *****a*t **is*i*h rs*

Looking at what our guess of period 8 has produced, we notice that none of the plain text strings seems unreasonable. This is confirmation that we are now on the correct path.

Now look through the cipher and see if you can guess at some of the unrecovered plain text. This will allow us to begin recovering the key word. One obvious candidate is the string ‘grai*s’ in the first block. This looks a lot like the word ‘grains’. Therefore, at period position 5, the digraph ‘ET’ must decipher as ‘*n’. A quick look at the cipher slide shows this is possible only if the alphabet at position 5 is E,F. This substitution provides:

Pos.   12345678   
Key    ****E***   (Note two rows for each key letter since each
       ****F***   alphabet has two letters associated with it)
CT1 QVNREWLA OJJALWWM DAKCFXCC JJFFTBPU HUGMTHWH XJVMAPUG 
CT2 EPMMTIAN LMBBUALU UMXCKISA QIWURYKC EMWCLFTI DWNIMPAV 
pt1 putthr** s***ins* ****dr** ****v*so ****s*j* o*t*eun*
pt2 grains** d***ast* ****ou** ****n*eo ****n*s* v*r*efo*

CT1 OCJIJRJD KDLSZMEM DAKMBNKW MJRWJRAQ VMH
CT2 NBQZEMHN WUGDIZWA OVPSVMHL IUOAUQBJ LMJ
pt1 t***at** ***or*** ****it*s **univ*r st*
pt2 d***wi** ***ly*** ****ha*t **iswi*h rs*

We now have at least three more possible fill-ins. These are:

  1. The partial text ‘putthr**grains’ in the block 1 suggests the word ‘three’. The first ‘e’ will require that for period position 7 the digraph ‘LA’ decipher as ‘e*’. This will require the alphabet at position 7 to be S,T.
  2. The second ‘e’ in ‘three’ will require that for period position 8 the digraph ‘AN’ also decipher as ‘e*’. This requires alphabet 8 to be E,F.
  3. The partial text ‘t*e’ in block 6 suggests the word ‘the’. This will require that for period position 4 the digraph ‘MI’ decipher as ‘h*’. This requires alphabet 4 to be U,V.

These substitutions provides:

Pos.   12345678   
Key    ***UE*SE   (Note two rows for each key letter since each
       ***VF*TF   alphabet has two letters associated with it)
CT1 QVNREWLA OJJALWWM DAKCFXCC JJFFTBPU HUGMTHWH XJVMAPUG 
CT2 EPMMTIAN LMBBUALU UMXCKISA QIWURYKC EMWCLFTI DWNIMPAV 
pt1 putthree s**dins* ***edr** ***av*so ***es*ac o*theuni
pt2 grainsof d**vast* ***you** ***en*eo ***sn*ss v*rsefor

CT1 OCJIJRJD KDLSZMEM DAKMBNKW MJRWJRAQ VMH
CT2 NBQZEMHN WUGDIZWA OVPSVMHL IUOAUQBJ LMJ
pt1 t**cathe ***or*cl ***withs **univer st*
pt2 d**lwill ***ly*ac ***thant **iswith rs*

At this point, you should be able to finish this decipherment without further help.