Post by Arduino Enigma on Feb 26, 2017 2:20:49 GMT
TLDR: A simulator for a rare enigma machine model was reconstructed from some technical data from a journal article. An attempt was made to verify its correctness from an encrypted sample provided by another journal article. The machines on each article are different. An exact match was not found for either machine, but plenty of partial matches were found suggesting there are 3 transcription errors in the sequence 25183 91467 encrypts to 38760 15924
Long Story Follows:
Been busy testing some things lately. It is now time to document the lessons learned.
Late 2016, Hackaday ran a 1kB coding contest. I don't remember the thought process that got me there, but an idea was born. Implement a numbers only Enigma Z30 machine in 6502 code running in a KIM-1 emulator.
The finished product is shown below. The barebones, enigma only machine was 460 bytes. When code was added to change the machine settings without exiting the program, it grew to 703 bytes. Adding 150 bytes for the Kim-1 ROM keyboard and display routines brings the total to 853 bytes.
The information needed to code the simulator for this machine came from a 2015 article by Anders Wik
about 3 machines that were found in Sweden:
www.tandfonline.com/doi/abs/10.1080/01611194.2015.1055387
There is some more additional information over at:
www.cryptomuseum.com/crypto/enigma/z/
A 2010 article by Arturo Quirantes about a machine that was offered for sale to the Spanish government, shows a couple of pictures of a closed machine and provides a sequence of numbers and the encrypted output but no settings.
www.tandfonline.com/doi/abs/10.1080/0161-110491892845
The content of the article can also be found at:
jproc.ca/crypto/enigma_z.html
Upon closer examination, the Wik and Quirantes papers show two different machines.
Both show a machine with 4 rotors, 10 keys and 10 lamps. The machine in the Quirantes pictures has the arrow on the power selection switch point away from the keys. The Wik pictures shows the power selection switch points towards the keys. There is a lever in the top left corner of the machine in the Quirantes photos. This lever is not there on the Wik pictures.
The cryptomuseum page for the enigma Z shows pictures for a machine whose power selection switch points away from the keys and has a lever labeled 7. An open picture is also provided showing the lever and some details of the stepping mechanism
www.cryptomuseum.com/crypto/enigma/z/img/z_001_full.jpg
www.cryptomuseum.com/crypto/enigma/z/img/z_002_full.jpg
The Quirantes paper tentatively identifies the stepping mechanism to be gear based since the original brochure specified the period of the machine to be 10000. The CryptoMuseum pictures also show a gear driven machine and identify it with Serial Number Z155 or Z165
The Wik paper shows a machine with lever stepping. Pictures of the rotors are shown and they have the notches needed for lever stepping. The article also states that the machine period is 8100 and that the machine suffers from the double stepping anomaly, detailed examples are given. The machine serial numbers are Z101, Z102 and Z103.
Both the Quirantes and the Wik machines show a battery compartment and power switch assembly similar to the Enigma G
www.cryptomuseum.com/crypto/enigma/g/index.htm
www.cryptomuseum.com/crypto/enigma/img/300166/029/full.jpg
The Z155 has a 4 position power switch, with similar labels to the Enigma G: heil, dunkel (dkl), aus, sammler. The Z101 lacks the sammler position.
The battery locking bolts are clearly labeled 15 in the cryptomuseum Z machine pictures. The battery terminals may be identified as 16. The position of the three pair of contacts that the power switch bridges appears to be rotated 90 degrees on the Z machines. Other parts appear to be in the same position.
Most importantly, the Wiks paper provides the rotor and reflector wiring.
Machine operation: Key is pressed, wheels are advanced first, electricity is applied after the rotors have stopped moving and the key is pushed all the way down (this is assumed from the operation of other enigma type machines)
ETw wiring: assumed to be 0..9
(post to be updated later with more info)
Long Story Follows:
Been busy testing some things lately. It is now time to document the lessons learned.
Late 2016, Hackaday ran a 1kB coding contest. I don't remember the thought process that got me there, but an idea was born. Implement a numbers only Enigma Z30 machine in 6502 code running in a KIM-1 emulator.
The finished product is shown below. The barebones, enigma only machine was 460 bytes. When code was added to change the machine settings without exiting the program, it grew to 703 bytes. Adding 150 bytes for the Kim-1 ROM keyboard and display routines brings the total to 853 bytes.
http://instagr.am/p/BOu3_X8h1rD
The information needed to code the simulator for this machine came from a 2015 article by Anders Wik
about 3 machines that were found in Sweden:
www.tandfonline.com/doi/abs/10.1080/01611194.2015.1055387
There is some more additional information over at:
www.cryptomuseum.com/crypto/enigma/z/
A 2010 article by Arturo Quirantes about a machine that was offered for sale to the Spanish government, shows a couple of pictures of a closed machine and provides a sequence of numbers and the encrypted output but no settings.
www.tandfonline.com/doi/abs/10.1080/0161-110491892845
The content of the article can also be found at:
jproc.ca/crypto/enigma_z.html
Upon closer examination, the Wik and Quirantes papers show two different machines.
Both show a machine with 4 rotors, 10 keys and 10 lamps. The machine in the Quirantes pictures has the arrow on the power selection switch point away from the keys. The Wik pictures shows the power selection switch points towards the keys. There is a lever in the top left corner of the machine in the Quirantes photos. This lever is not there on the Wik pictures.
The cryptomuseum page for the enigma Z shows pictures for a machine whose power selection switch points away from the keys and has a lever labeled 7. An open picture is also provided showing the lever and some details of the stepping mechanism
www.cryptomuseum.com/crypto/enigma/z/img/z_001_full.jpg
www.cryptomuseum.com/crypto/enigma/z/img/z_002_full.jpg
The Quirantes paper tentatively identifies the stepping mechanism to be gear based since the original brochure specified the period of the machine to be 10000. The CryptoMuseum pictures also show a gear driven machine and identify it with Serial Number Z155 or Z165
The Wik paper shows a machine with lever stepping. Pictures of the rotors are shown and they have the notches needed for lever stepping. The article also states that the machine period is 8100 and that the machine suffers from the double stepping anomaly, detailed examples are given. The machine serial numbers are Z101, Z102 and Z103.
Both the Quirantes and the Wik machines show a battery compartment and power switch assembly similar to the Enigma G
www.cryptomuseum.com/crypto/enigma/g/index.htm
www.cryptomuseum.com/crypto/enigma/img/300166/029/full.jpg
The Z155 has a 4 position power switch, with similar labels to the Enigma G: heil, dunkel (dkl), aus, sammler. The Z101 lacks the sammler position.
The battery locking bolts are clearly labeled 15 in the cryptomuseum Z machine pictures. The battery terminals may be identified as 16. The position of the three pair of contacts that the power switch bridges appears to be rotated 90 degrees on the Z machines. Other parts appear to be in the same position.
Most importantly, the Wiks paper provides the rotor and reflector wiring.
Machine operation: Key is pressed, wheels are advanced first, electricity is applied after the rotors have stopped moving and the key is pushed all the way down (this is assumed from the operation of other enigma type machines)
ETw wiring: assumed to be 0..9
(post to be updated later with more info)