Sigaba, the simulators


Home Page
The Sigaba Home Page

Introduction

There are many Sigaba simulators that can be downloaded, here is a selection (sorry for not being exhaustive):

  • The oldest is that of R. Pekelney. It is graphical and written in Java and uses the obsolete Applet technology. Several configurations require modifying the source code.
  • The Pekelney's simulator is hosted by the maritime.org site. A new simulator written in JavaScript by Steve MacMinn is supposed to replace it. It offers generally the same functionalities.
  • Geoff Sullivan's simulator. It is graphical and very educational but only works on old Windows versions.
  • Steve Baggett's simulator. It is graphic. It is very educational and its graphics are very aesthetic. It is highly configurable. It works on Windows and Linux .
  • George Lasry's simulator. It is written in Java. It works in text mode and therefore it is portable. It is not configurable. Any configuration requires modifying the source code.
  • My simulator. It is written in Python. It works in text mode and therefore it is portable. It is configurable.

The Pekelney simulator, its installation

Presentation

R. Pekelney's software is the oldest Sigaba simulator. It is special because it serves as a reference. In fact its author created it to be compatible with an authentic Sigaba that he was able to study. Other simulators try to be compatible with it.

The Pekelney simulator is graphical and written in Java. Its code is available. It is therefore Open Source. It uses an old technology: Java applets. In fact, its installation is more complex than for an ordinary Java application (for example, the G. Lasry's simulator).

Java and Java applets

Java is a computer language that is still very popular (it is in the top 5 most used languages but behind Python ;-). A Java application (*.java) must be compiled. The generated bytecode (*.class) can run, via a Java virtual machine called JVM (written in C language) on any OS (Windows, Linux, etc.) and on any hardware (Intel, ARM, etc.).

A Java applet is a graphical application using the Applet API. It can work:

  • In a browser (but no recent browser supports this technology anymore).
  • Be activated via the appletviewer command.

Versions of Java and the Oracle company

Java is a language created by Sun company in 1995. At first, Java is a proprietary technology, but in 2007, Sun changed the license of Java and released the Java environment under the Open Source GPL-2 license. In 2009, Oracle bought Sun and therefore inherited Java. Oracle creates its own JVM and then markets Java with paid support. An individual can use Oracle tools free of charge by creating an Oracle account.

The different Linux distributions use the free OpenJDK which includes the javac compiler and the java JVM. On Windows, you have the choice of installing the official Java version (from Oracle) or the Open Source version. Currently (2024), we use Java version 22 but versions 8, 11, 17 and 21 are still supported. If you want to use the Applet technology, you must install version 8 which includes the appletviewer application (version 8 was previously called 1.8).

Installation under Windows 10

  1. Installing a free version of Java.
    We download OpenJDK version 8 (which includes the appletviewer)
    1. From the site of Microsoft we choose OpenJDK 8.
    2. We switch to the site Adoptium
    3. On the Adoptium, website we choose:
      • Windows (OS)
      • x86 (hardware)
      • JDK (which corresponds to all Java tools)
      • 8-LTS (version)
      • .msi (package format)
    4. The following link is proposed, we activate it.
    5. We download the MSI version from GitHub.
    6. Activate the downloaded application to install it (click on it in the browser).

  2. Download the code source of the simulator and compile it.
    1. We create a working directory.
      C:\> md sigaba
      
    2. We move inside.
      C:\> cd sigaba
      
    3. We update the PATH (if we want to make the operation persistent, we create a *.bat file)
      C:\sigaba> set PATH=%PATH %;"C:\Program Files\Eclipse Adoptium\jdk-8.0.402.6-hotspot\bin"
      
    4. We download the source code of the Pekelney simulator.
      C:\sigaba> curl -O https://maritime.org/tech/ecmapp.txt
      
    5. Then we correct the following bug with a text editor: lines 861 and 862 must be merged.
      C:\sigaba> notepad ecmapp.txt
      
    6. Finally we rename the source:
      C:\sigaba> ren ecmapp.txt ECMApp.java
      
    7. We compile the application:
      C:\sigaba> javac ECMAapp.java
      
      Note: compilation generates a warning: “Note: ECMApp.java uses or override a deprecated API”. We can ignore it.

  3. We create a web page which allows the activation of the applet
    C:\sigaba> notepad ECMApp.html
     
    
  4. We run the application.
    C:\sigaba> appletviewer ECMApp.html
    

Installation under Linux

Under Linux, most distributions offer the free version of Java (OpenJDK) in package form. Here, as an example, is the installation under Ubuntu 22.04 LTS.

  1. We install the OpenJDK.
    $ sudo apt install openjdk-8-jdk
    
  2. We create a working directory and move inside.
    $ mkdir ~/sigaba
    $ cd ~/sigaba
    
  3. We download the Pekelney simulator and modify the source code.
    $ wget https://maritime.org/tech/ecmapp.txt
    $ vi ecmapp.txt # we merge lines 861 and 862
    
  4. We rename the application and compile it.
    $ mv ecmapp.txt ECMApp.java
    $ javac ECMapp.java
    
  5. We create a web page to activate the applet.
    $ vi ECMApp.html
     
    
  6. We run the application.
    $ appletviewer ECMApp.html
    

Short cut

We have just noticed that installing R. Pekelney’s simulator is not simple. To help with its installation, I make the following files available on my site (with the author's consent):

  • Bug-free Java source code (no broken lines): ECMapp.java.
  • The classes of the application (so already compiled): *.class (a Zip).

If we download the classes directly, we do not need the complete JDK but only the Java version 8 run-time which includes the appletviewer. The compiler is no longer needed.

Steve MacMinn's simulator

On the maritime.org site, which houses the simulator written by Richard Pekelney, you can have access to another graphical simulator using JavaScript technology more recent than Java Applets. This simulator is written by Steve MacMinn.

This simulator offers generally the same functionalities as Richard Pekelney's simulator. The simulator can be accessed online or offline.

  • Online use: link
  • The archive containing the software and which allows its installation and local use: link.

Geoff Sullivan's simulator

It is graphic. It is very educational. Indeed we can (as with most Sullivan simulators) visualize the rotor wiring. Unfortunately, it requires Windows 3.1/95/98/NT4/2000 and as a result it is difficult to run on a modern Windows platform (versions 10 or 11).

Here is the download link.

Steve Baggett's simulator

Steve Baggett's simulator is a must. It is graphical and works under Windows and Linux. With humor, Steve called his simulator YASE (Yet Another Sigaba Emulator). It was designed to illustrate the details of the operation of a Sigaba: We can clearly see the path of the electrical signals. Several options allow you to vary the operation speed (encryption/decryption). It is also possible to encrypt or decrypt step-by-step.

It is highly configurable. You can create your own sets of rotors. We can even generate them automatically. The user interface allows the choice of the order, orientation and position of the rotors. In short, configure the daily key and the message key. It is also possible to use the Navy indicator system as well as the Army indicator system.

The internal documentation will give you all the details of use.

Here is the official download link

But you can also download this simulator from my site (with permission from the author):

  • The Windows version: link
  • The Linux version: link
  • The README file: link

Fig. 3: CSP-889, Electrical paths (from Steve Baggett's simulator)

George Lasry's simulator

Introduction

George Lasry published an article in 2019 proposing a new Sigaba attack: “A Practical Meet-in-the-Middle Attack on SIGABA.” This article can be downloaded using the following link.

In the appendix of the article, G. Lasry provides the Java source code for his simulator. Simply copy it (or use an OCR) to recover it (you can also download it from this site). Then, you have to compile it with the javac tool and run it via the java tool (the JVM). Unlike the Pekelney simulator, we do not need a graphical interface (the application runs in text mode) and we can use any version of Java.

Installation and execution

  1. Installation of Java (see the installation of the R. Pekelney simulator).
  2. Recovery of the source code: we copy it, from the document, or download it from my site: Sigaba.java
  3. We compile it:
    C:\sigaba> javac -d . Sigaba.java
    
  4. We run the simulator:
    C:\sigaba> java simulator.Sigaba
    JTSCALXDRWOKRXHKMVD (expecting JTSCALXDRWOKRXHKMVD
    AAAAAAAAAAAAAAA (expecting AAAAAAAAAAAAAAA)
    

My Simulator

My simulator is written in Python. It is Open Source. It works in text mode. It only uses the standard Python library. It can therefore work on any platform on which Python 3.x is installed. It is complete. You can create your own sets of rotors. One can choose the daily key and the message key from the command line. A Debug option allows you to monitor the operation of the machine in detail.

I wrote a page that describes it: link.

Web Links

  • Richard Pekelney's simulator: link
  • Geoff Sullivan's simulator: link.
  • Steve Baggett's simulator: link
  • George Lasry's simulator (the article which contains the code source): link
  • My simulator: link