top of page

X Key Enigma Machine

by XR_XharpRazor

17 15 7IM3 70 9ø 80ᴎK3R5 W17H Ç®Y¶7ø9r4PHY

Introduction

The Enigma Machine originally has a Keyboard, 3 rotors, 1 reflector, 1 Lampboard. Then the Nazis added the Plugboard and a few more rotors. This time, XKEM (X Key Enigma Machine) works in a very different way. Here we can compare how different they are :

Where to use it ?

XKEM is now an app in KOwO.web
in the console, type "/app xkem" and you are good to go,
need all the commands and instructions ?
type "/help"

XKEM concepts : what do you need to know to use it ?

XKEM is a modified / upgraded version of the Enigma Machine used by the German Military during WW2.
It is a machine used to encrypt and decrypt messages.
If you are not familiar with the Enigma Machine, read the blog post here :

the Cipher Stream

    Imagine you have different components, lined up from left to right.

    we will call this line of components the "cipher stream"
   On the left of the Cipher Stream is the Keyboard
   On the right of the Cipher Stream is the Lampboard

   by convention,
   plaintext are entered on the Keyboard and the Cipher Text will end up on the lampBoard
   ciphertext are entered on the Lampboard and the Plaintext will end up on the Keyboard
   (of course you can actually swap it, but you have to know what you are doing)
   in this explanation, we will use the convention.

   in between the Keyboard and the Lampboard are rotors

    here you get to decide how many rotors do you want.

    when we encrypt a letter, a signal starts from the keyboard, goes throught the rotors, then hit the LampBoard.
   when we decrypt a letter, the opposite happens : from Lampboard back to the Keyboard.

   because the Cipher Stream is a 1-to-1 mapping function between 2 set of letters,
   this means that there is a chance that a letter in SetA will be mapped to the same letter in SetB,
   thus the biggest flaw of the original Enigma Machine has been removed :

    a letter can sometimes become itself in XKEM



the Rotors (and the Plugboard)

    Each rotor has 3 BASIC parts : left studs, right studs, and the wires in the middle.
   the number of left studs, wires, and right studs are all the same, which should be the same with the size of the keyboard.
   A stud of one side hat receive a signal will "send" the signal via the wire to the connected stud on the other side. 

   In a normal Enigma Machine, all the rotors will always spin at a constant rate.
   This means that the rotor state of a normal Enigma Machine has be treated as a function of time and can be easily calculated.
   however XKEM makes this harder by introducing "Rotor Types"

    This means that an XKEM rotor will behave differently based on it's RotorType and the messages entered
    Rotor Types can be sorted into 2 categories : SpinKick & WireManip

   SpinKick decides how the rotor will rotate
   WireManip decides how the wire will change throughout encrypting and decrypting.

   there are 3 SpinKick types :

       ALPHA :
       a normal Enigma Rotor rotating at a constant rate.
       This rotor has 2 attributes : kickState & kickSize
       for every encryption/decryption of a letter, kickState will increase by one
       when kickState reaches kickSize, the rotor will then rotate by 1 place and flushing kickState to 0

       BETA :
       this is a product from an inspiration from an Encryption algorithm from Javatrone
        (a conlang developed in 2017 that gave birth to Astralica).
       This rotor has 2 attributes : leftSignal & rightSignal
       for every encryption/decryption of a letter,
       leftSignal will be the index of the stud that receives the message, vice versa for signalRight.
       then calculate rightSignal - leftSignal and spin the rotor by that amount.
       this has the effect to rotate the LeftStud to the position of the rightStud.

       GAMMA-L or GAMMA-R
       This rotor has 2 attribute : kickState, kickSize
       for every encryption/decryption of a letter,
       multiply the kickState by the number of studs on one side
       then grab the index of the active LeftStud, add it to the kickState.
       while ( kickState > kickSize ) { kickState decrease by kickSize, and rotate by one place }

    there are 2 WireManip types :

       NONE :
       the default value,
       wires will stay the same in the rotor throughout the encryption/decryption

       ADJ2SWAP :
       the rotor will detect the active LeftStud and the active RightStud
       the stud adjacent to the active Studs will swap places

bottom of page