Hebern 1 rotor cipher machine, math vision


Home Page
Hebern's machines Home Page

Introduction

In 1917, the American Hebern invented a cipher machine, the encryption element of which was a rotor. Hebern (simultaneously with Scherbius) invents the Rotor as a ciphering element.

The rotor page describes the mathematics that goes into understanding how a rotor works.

This page describes the complete machine, which although essentially based on a rotor, also includes fixed permutations: the keyboard and the lampboard.

Machine Description

The Hebern 1 rotor machine generally functions as a rotor connected on one side to a keyboard and on the other to an output unit (printer or light panel). In fact, it can be theoretically more complex, because the wiring connecting the rotor to these two units (keyboard, lampboard), does not necessarily correspond to “identity” permutation. We will study the implications associated with the use of these wirings.

The wiring connecting the keyboard to the rotor being called Keyboard, and the wiring connecting the rotor to the light board (or printer) being called Lampboard.

Complete formulas

With Caesar permutation

\( c = pKC^{i}RC^{-i}L \)

A plain letter: p, the ciphered letter: c.
The rotor (R) is at positions i
K represents the Keyboard permutation.
L represents the Lampboard permutation.
C is the circular shift (Caesar permutation).

With PI permutation

\( y_i = \Pi_L(\Pi_Ri(\Pi_K(x))) \)

A plain letter: x, the cipher letter: y, PI: permutation.
K: Keyboard, L: Lampboard, R: Rotor, i: key.

Use of a simplified wiring (limited to 5 connections)

1st case: Keyboard and Lampboard permutations are equal to Identity

In the case where the Keyboard and Lampboard permutations are equal to the identity, we end up with a simple rotor. The mathematics of the rotor have already been covered in the rotor page.

2nd case: only Lampboard permutation is equal to Identity

Let the following wiring be:
  • Keyboard (K): [2,0,3,1,4]
  • Rotor (R): [1,0,3,4,2]
Table KR        Table  KRa      Table RK-1  
  0 1 2 3 4       1 3 0 2 4       0 1 2 3 4  
0 3 1 4 0 2     0 1 0 3 4 2     0 3 1 4 0 2 
1 3 4 1 2 0     1 4 2 3 1 0     1 4 2 3 0 1   
2 0 1 4 2 3     2 1 2 0 4 3     2 0 1 3 4 2  
3 3 1 2 4 0     3 1 4 3 2 0     3 4 1 2 0 3   
4 1 3 4 2 0     4 3 2 1 4 0     4 4 0 3 1 2  
  • a) Encryption mode, clockwise progress
    In encryption mode, we first do the K permutation and then the R permutation. The encryption table corresponds to the first table (KR). No visible structure appears. On the other hand, if we reorganize the order of the columns to have the diagonals containing the sequence [0,1,2,3,4], the first line gives the wiring of the rotor (the second table [KRa]).

    At the mathematical formula level, we have:

    y = R[ K[ x ] + i ] - i
    
  • b) Decryption mode, clockwise advancement
    In decryption mode, we first do the R-1 permutation (reverse R) and then the K-1 permutation. The third table (RK-1) allows you to carry out the decryptions.

    We notice that the diagonals contain the same sequence: [1,3,0,2,4] which in fact corresponds to K-1.

3rd case: only Lampboard permutation is equal to Identity

This problem is similar to the previous case but reversed.

4th case: Keyboard, Rotor and Lampboard are different to Identiy

Let the following wiring be:
  • Keyboard (K): [2,0,3,1,4]
  • K inverse: [1,3,0,2,4]
  • Rotor (R): [1,0,3,4,2]
  • R inverse: [1,0,4,2,3]
  • Lampboard (L):[2,1,0,4,3]
  • L inverse: [2,1,0,4,3]
Table KRL (1)  Table KRL_inv (2) Table 1 anagram  Table 2 anagram
  0 1 2 3 4       1 3 0 2 4        1 3 0 2 4       2 1 0 4 3       
0 4 1 3 2 0     0 4 1 3 2 0      0 1 2 4 3 0     0 3 1 4 0 2
1 4 3 1 0 2     1 3 2 4 1 0      1 3 0 4 1 2     1 4 2 3 0 1
2 2 1 3 0 4     2 3 1 0 2 4      2 1 0 2 3 4     2 0 1 3 4 2
3 4 1 0 3 2     3 2 1 4 3 0      3 1 3 4 0 2     3 4 1 2 0 3
4 1 4 3 0 2     4 3 0 4 2 1      4 4 0 1 3 2     4 4 0 3 1 2

The first table allows encryption. It has no structure. Likewise the second table which allows decryption.

The third table is created by anagramming the columns of the first table. The diagonals correspond to the reverse Lampboard permutation. After anagramming, the column heads correspond to inverse of the Keyboard permutation. The diagonals correspond to the Lampboard permutation.

The fourth table is created by anagramming the columns of the second table. The diagonal of this table gives a diagonal which corresponds to the inverse of the Keyboard permutation (1,3,0,2,4). The column heads correspond to inverse of the Lampboard permutation.