Sunday, April 16, 2017

Retrochallenge 2017 RC2017/04 Project Updates

This is the page for the Retrochallenge 2017 RC2017/04

http://www.retrochallenge.org/p/entrants-list-201704.html
http://www.retrochallenge.org/

The goal for this challenge is to further optimize the 6502 Enigma Z30 Machine Simulator for the Kim UNO.

This page will grow as entries are added.

Will be tweeting about it with the #rc201704 #retrochallenge tags

All the source code is available at:
https://github.com/arduinoenigma/Mystery6502Machine/tree/master

For this challenge, we will be updating:
https://github.com/arduinoenigma/Mystery6502Machine/blob/master/EnigmaZ30v3Full.lst
https://github.com/arduinoenigma/Mystery6502Machine/blob/master/EnigmaZ30v3Full.asm

Sunday, April 2, 2017

My entry for RC2017/04, An Enigma Machine Z30 Simulator running on a Kim 1 / Uno

Just noticed this years retrochallenge is up! http://www.retrochallenge.org/

Here is the entry page:
http://www.retrochallenge.org/2017/03/rc201704-open-for-entrants.html

  1. Your name (or alias);
  2. Your Twitter handle (if applicable);
  3. Your blog location (for project updates); and
  4. A brief synopsis of your project.

And here is my entry:

1) Arduino Enigma

2) @ArduinoEnigma
     https://twitter.com/arduinoenigma

3) http://arduinoenigma.blogspot.com/

4) There are some cool kids out there making electronic versions of the Enigma Machine. They mostly seem to be some sort of microcontroller wired to 4x fourteen segment displays and pushbuttons to move the rotors and type the message to encrypt. I wanted to do the same but without rolling a custom PCB. A KIM Uno was laying around, having been used only to develop a 53 byte clock program. The idea was born to use the KIM to simulate an Enigma Machine. This 6502 program implements a 1930s encryption machine in a 1970s computer. It turns a KIM Uno into the cheapest physical enigma machine simulator out there.

The original, lever stepping only version was 703 bytes including the menu to change the encryption settings. The v2 gear and lever stepping enigma engine has already been optimized to be smaller than v1. The v2 menu system gained a third function to set the stepping mode. After optimizations, the feature richer v2 is now only 11 bytes bigger than v1.

The goal for this retrochallenge is to further optimize the code so its total size is smaller than v1.

For a bit of background, three rare, numbers only, Enigma Z30 were found in Sweden, an article in Cryptologia "Enigma Z30 retrieved" describes the wheel wiring. This machine can only encrypt numbers and the rotors have only 10 positions, it is thus perfect to be simulated in a KIM.Based on the published wheel wiring and some reasonable assumptions based on the architecture of other enigma machines, a 6502 program was written. The program has two parts, the core enigma functionality, the user being responsible for changing the machine settings via direct RAM manipulation using the KIM monitor and a menu system for a user friendly way of changing the machine settings. After learning that two versions of the machine existed, one with double stepping anomaly prone lever stepping and another with odometer like geared stepping, the program and its menu system ware modified to also support gear stepping.

Below are some demo videos of v1.

https://www.instagram.com/p/BOu3_X8h1rD/
https://www.instagram.com/p/BNbAu1Xhsde/
https://www.instagram.com/explore/tags/enigmaz30/

I had been looking for an excuse to make a new video of v2 showing the new F3 mode to select the stepping mechanism type and to shave a few more bytes off.

RC2017/04, here we come...

Sunday, March 26, 2017

Enigma Z30 Machine Simulator v2.0 Released

In time for the Vintage Computer Festival East (March 31-April 2), the Enigma Z30 Machine Simulator v2.0 is being released.

http://vcfed.org/wp/festivals/vintage-computer-festival-east/

This 6502 program turns the KIM Uno into the cheapest enigma machine simulator out there.

http://obsolescence.wixsite.com/obsolescence/kim-uno-summary-c1uuh

This new version supports lever and gear stepping. The stepping logic has been changed so that the machine always steps when the rotors display 9, the ring setting has no effect on the stepping point. This is consistent with other enigma machines.

An optional, but very useful menu allows the machine settings to be changed without exiting the program. This previous menu had two options, the first one changed the rotor types, the second one changed the ring settings. It now has a third option so the gear setting can be changed as well.

This version has been optimized. The machine code has more functionality and is smaller than v1. When the menu code is added, the total program size changes from 703 in v1 to 714 in v2.

The program can be entered from the images shown below. The full source code can be downloaded at:
https://github.com/arduinoenigma/Mystery6502Machine

Z30 Machine only:


Z30 Machine Menu:


For the motivation behind the creation of this machine:
https://hackaday.io/project/18644-mystery-6502-program-for-the-kim-uno-1kbchallenge

For the Paper Model showing the inner workings of this machine:
https://github.com/arduinoenigma/Mystery6502Machine/blob/master/6502%20ENIGMA%20Z30%20Paper%20Model.xlsx

The image below is taken from the Paper Model file and shows a sample path through the rotors:


To read some thoughts on the recreation and cryptanalysis of this machine:
http://enigmaworldcodegroup.freeforums.net/thread/109/thoughts-recreation-cryptanalysis-enigma-z30

Sunday, December 11, 2016

Free program that simulates an Enigma Z30 Machine released

The following contest inspired me to create an enigma simulator that runs on the KIM Uno / KIM 1 programmable calculator.

https://hackaday.io/project/18644-mystery-6502-program-for-the-kim-uno-1kbchallenge

Follow the instructions bellow to get the code into your KIM Uno


To see more pictures about this build, visit:

https://www.instagram.com/explore/tags/mystery6502program/


Sunday, November 27, 2016

Version 1.7 Released

Just a quick post to let readers know that version 1.7 of the Arduino Enigma Machine Simulator is up. If you have received a previous download link, simply change the version number. If you need one, contact us for details.

This version has a significantly faster display driver. The color configuration tool allows the additional (greek) rotor to have a different color than the others. The display can now be flipped so the cables enter the unit at the back instead of the front. The color contrast of the LCD display is not very good in this configuration though.


You can see more pictures at:

https://www.instagram.com/explore/tags/m0104/

If you like what you see, head over to our store:

tinyurl.com/enigmashop

Sunday, April 3, 2016

Version 1.5 released

The code base for the Arduino Enigma Machine Simulator has been quite stable lately, it has been tested extensively so there are no glaring issues. There was however, a small intermittent visual corruption bug in the plugboard view that was difficult to track down. Not having a specific sequence of steps to reproduce and not being able to make it happen on demand, it could not be fixed.

Lately, I have been active in the Engima World Code Group Forum http://enigmaworldcodegroup.freeforums.net/ and using the simulator a lot through the serial port with the Arduino Serial Monitor tool since it is the easier way to encode long texts.

I noted the plugboard view was getting the visual corruption quite regularly and was not sure if it was related to the age of the Touchscreen LCD display, since the simulator that I am using was built in October 2014 (Hint: the bug is not related to the age of the screen, it works fine).

This is the main screen, touching the area at the bottom of the screen below the PYXCV key row enters the plugboard view.


This is the corrupted plugboard view, notice the faint E between the K and the L. It turns out it is in exactly the same position as the E in the lamp field in the main view. Touching the T shaped keys at the top of the screen returns to the main view.



If the plugboard view is entered again the visual corruption disappears.


During one of the enigma message sessions I noticed the last key encoded with the machine was the one showing up as a visual corruption in the lamp field. And here is where the bug was hiding. If a letter is encoded, the resulting letter would normally be illuminated in the lamp field. If a letter is encoded through the serial port, the resulting letter is only shown in the serial monitor window, but if the plug board is opened to make changes to the plugboard, the resulting letter will be shown as a visual corruption in its normal lamp field position.


Having a reliable sequence of steps that would reproduce the bug, fixing it was easy, clear out the encoded key variable if the letter is received and encoded through the serial port routine. Version 1.5 has been released to fix this. 

This bug was hard to track down because the plugboard had to be opened right after encoding a character through the serial port. If the Enigma logo was touched to open the machine instead and then the plugboard view was opened, it would display correctly.

New customers will get this updated version on their units. Existing customers can download the latest version at the usual download location provided in their welcome e-mail.

Monday, January 18, 2016

Assembled enigma machine simulator now available for sale on ebay

Last year, the Arduino Enigma Machine Simulator was entered in the hackaday.com best product prize competition.


Three units had to be assembled and submitted. Units HaD 0001, HaD 0002 and HaD 0003 were sent.  

When the competition ended, Units HaD 0001 and HaD 0002 were returned, as per the contest terms.


They were carefully photographed and listed for sale on eBay: HaD 0001 and HaD 0002. They both sold. Since there is interest in assembled enigma simulators, the eBay store has now two listings, one for the simulator in kit form and the other one for a fully assembled simulator.

eBay Store:

The simulator in kit form ships the next business day. When an assembled unit is purchased, it will be assembled, typically over the weekend. The processing time is listed as 20 days, but it might be ready sooner. 

Below are pictures of assembled unit HaD 0001 to give you an idea of what a completed unit looks like.


Sunday, December 27, 2015

Monday, October 12, 2015

Projects made with the Arduino Enigma Simulator Engine

The availability of a correct Free Open Source implementation for the Arduino platform of the Enigma encryption algorithm and the Uhr switch has inspired the following people to write their own enigma simulators. To this day, the most popular page on this blog is this:
http://arduinoenigma.blogspot.com/2014/10/source-code-for-implementation-of.html
What will you be inspired to make with it?

---

le Sanglier des Ardennes Page:

Source code:

Box sketch:

---

Claudio's Page:
http://adamatj.altervista.org/

Details about his Enigma Simulator:
http://adamatj.altervista.org/ https://docs.google.com/viewer?url=adamatj.altervista.org/articoli/art21/enigma_replica_41.pdf

Simulator source code:
http://www.grix.it/UserFiles/double_wrap/File/enigma/enigma_replica_v41.txt

---

This is Stephen Peek page, another electronic enigma collector.
I recognize the logo in the LCD machine. It seems to be derived from le Sanglier des Ardennes
http://www.stephenpeek.co.uk/enigma_machines.htm

---

03/29/2019 edit:

Very nice derivative by Mark J Culross, KD5RXT with extra machines added:

https://hackaday.com/2019/03/28/put-an-arduino-enigma-in-your-pocket/

https://github.com/mjculross/Enigma_Visual_Simulator



Wednesday, August 19, 2015

Break this message, win USD $1000

Enigma encrypted messages have been broken before. There are certain properties of the machine that make this possible.

The enigma machine produces more secure messages if a message is encrypted once and then encrypted again, The fundamental weakness of the enigma machine is that a letter can never encrypt to itself. By encrypting a message twice with different settings, a letter in the clear text can encrypt to itself in the second round.

The following message has been encrypted twice with different settings on an M4 machine with an Uhr switch. No further technical help will be provided.

This is going to be called the #Enigma1KChallenge

AHED JXLA UQEZ CKKS BEGA OTAK BMIC
PKHV OPGT FTAS INKI WACP SNLI QUFL
WYJJ YOAW MDGO YFFI IJQD GCGT OMKJ
VPCC YHNW XAQZ BGYU ELOM TPLT NDXA
MRKY EYFZ SYIM VYPL YLPU VNRG JE

The first person to fully decode it and follow the instructions will have $1000 sent via PayPal to them. No purchase necessary, void where prohibited by law, residents of jurisdictions where this would not be legal or restricted are not eligible to win. All laws and regulations apply. Any taxes are the responsibility of the winner.

You can use the following enigma engine or any other correct implementation:
http://arduinoenigma.blogspot.com/2014/10/source-code-for-implementation-of.html


Good luck.



Tuesday, August 18, 2015

Entered the Enigma Machine Simulator into The 2015 Hackaday Prize, Best Product competition



The Arduino Enigma Machine Simulator has been submitted for the The 2015 Hackaday Prize and Best Product competition. Three units, serial numbers HaD0001, HaD0002 and HaD0003 were built and submitted to SupplyFrame so they can be evaluated.

Tuesday, June 30, 2015

Acrylic Case Assembly Notes

These are the assembly notes for the acrylic case, available at:

http://www.ponoko.com/design-your-own/products/enigma-case-w-2-logos-clear-scratch-resistant-acrylic-12383

The acrylic case is the same dimension as the wooden case and it puts together in a similar way.

Please review the assembly instructions for the wood case first.

In this project we use Loctite Go2 Gel for the case and Elmer's Glue-All to attach the Merkblatt to the lid.

Before starting to glue the case, the Arduino must be given some standoffs first. The bottom of the Arduino is not flat. The pins for the USB and 9V Power connectors in the front are taller than the pins in the back.

In the wooden case, a folded post-it note is used as a shim, but this solution cannot be used here because the case is transparent.

The standoffs are created from the unused acrylic piece where the parts are cut from. Locate a thin piece separating the bottom lid sides and break it off. Break this part into small rectangles and sand them smooth. The exact dimensions of the standoff pieces are not critical because we will be using their thickness to raise the bottom of the arduino. They will be laying down on their 3mm side.


Once you have 4 standoffs, apply a little Go2 Gel to each one and glue them to the bottom of the Arduino. They will glue to the PCB. One will go to the left of the infinity arduino logo on the top left corner. Another will go to the left of the ROHS compliant statement. The next one will go on the top right corner above the USB connector. The last one will go on the bottom right corner, clear of the power connector.



Once this step is completed, the case can be assembled in a similar fashion to the wooden one, except that this glue does not require water. Use a little Go2 Gel in each pocket, if you use too much it will get squeezed out. Work clean. Try not to get glue or fingerprint on the sides. There is no way to hide mistakes here...

Once the case is glued, apply hair bands to keep it together. The curing period for this glue is 24 Hours. It does not melt the plastic, but it forms a strong bond. If any glue is squeezed out of the case, you can pry it off after it cures.

To glue the instructions to the lid, use the Elmer's Glue-All, print out an instruction sheet and cut it down to size. Apply glue to the back and place it in the lid in the desired position. The glue will show through the back, you can use the scrap piece of acrylic to practice your gluing technique. If a mistake is made, the instruction sheet and the glue can be removed by getting it wet and rubbing it off. It will remove clean and leave no trace.

This case is the right dimension to accept the Housework 1131 hinges, but I have not found a way to nail the hinges to the case yet.

Tuesday, May 26, 2015

New Case Material for Enigma Simulator: Acrylic

A customer asked if the case could be made of clear plastic. Ponoko offers 3mm thick clear acrylic. The case was laser cut in this material. It looks gorgeous,


This is how it looks with the electronics installed. Shown is the Enigma Color Configuration Tool. A little project being worked on that allows all the colors in the Enigma Simulator to be changed. Do you want a sim in night vision red? A few keystrokes will make that happen.

The clear case is available at:

Clear acrylic glue is needed to put this together. This should work: