Jump to content

Simple encryption based on the Enigma Machine


willichan
 Share

Recommended Posts

There are hundreds of these around the internet, but here is my version of the Enigma Machine in UDF form.

It can be used for simple string, or for entire files.  I don't recommend it for highly sensitive data, but is good for simple encryption or just for fun.

There are no global variables used, and you can have multiple instances (if you find you need it).

Enigma.zip

Link to comment
Share on other sites

1 hour ago, willichan said:

I don't recommend it for highly sensitive data

Or any kind of data which you don't want people to see, because it was cracked in WW2 by Alan Turing himself :lol:

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

If you read the Wikipedia article in full, you will see that many more people were involved. Not only Alan Turing :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

@water Right, but wasn't Turing the main one who got the breakthrough? My knowledge comes from the movie with Benedict Cumberbatch.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

This article describes who was involved in cracking the Enigma.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

@water Thanks, the article was too long so I asked ChatGPT to give me the brief:

Quote

Alan Turing and his team at Bletchley Park were not the first to crack the Enigma code, but they made significant and pioneering contributions to the codebreaking efforts. Polish cryptanalysts, including Marian Rejewski, had made earlier breakthroughs in understanding the Enigma machine's workings during the 1930s.

The Polish Cipher Bureau had already developed techniques to decrypt Enigma-encrypted messages before World War II. They shared their knowledge with the British and French, providing them with valuable insights. However, it was Turing and his colleagues who further developed and refined these techniques, especially for the more complex versions of the Enigma machine used by the German military during the war.

So, while Turing and his team were not the first to crack Enigma, they played a crucial role in significantly enhancing and expanding the codebreaking efforts, ultimately contributing to the Allies' success in deciphering Enigma-encrypted messages during World War II.

Bonus: Turing's contributions:

Spoiler

Alan Turing played a pivotal role in the cracking of the Enigma code during World War II. He was a British mathematician and computer scientist. Turing's contributions included:

  1. Conceptualization of the Bombe: Turing conceived the idea of the Bombe, an electromechanical machine designed to help decipher Enigma-encrypted messages. This concept was developed into a working machine by others.

  2. Banburismus: Turing worked on a method called Banburismus, which was used to improve the efficiency of codebreaking efforts. It involved statistical analysis to identify patterns and settings in the Enigma machine.

  3. Hut 8: Turing was a leading figure in Hut 8, a section at Bletchley Park dedicated to breaking German naval Enigma codes. His work contributed significantly to decrypting messages related to U-boat movements and naval operations.

  4. Theoretical Insights: Turing's mathematical and cryptographic expertise provided important theoretical insights that guided the development of techniques for deciphering Enigma-encrypted messages.

Overall, Alan Turing's innovative thinking and contributions were instrumental in the Allied efforts to crack the Enigma code, which had a significant impact on the outcome of World War II.

 

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

On 9/28/2023 at 5:23 PM, TheDcoder said:

Or any kind of data which you don't want people to see, because it was cracked in WW2 by Alan Turing himself :lol:

Thanks for the "like", TheDcoder.

It is true that many messages from the Nazi machine were cracked.  This was because of flaws in the system that Turning and his team exploited, which allowed them to work backwards to find the machine setup for that day.

  • First, they could assume that text like "Hail Hitler" would appear toward the end of the message.
  • Second, they could assume that no letter would encrypt to itself.  For Example "t" would not encrypt to "t"
  • Third, once a single message was cracked for the day, they could assume the same settings for the remainder of the day.

Fortunately, my rendition has a few differences.

  • Although based on the mechanics of the Enigma machine, I am not limited by the physical, so my version can potentially encode a character to itself.
  • No assumptions can be made about the contents of one encrypted sample, and apply it to another as universally as containing a common phrase, or using the same configuration for each encryption during the day.
  • The Enigma machine was limited to just letters and numbers, without upper and lower case differentiation.  I am able to work with a full 256 characters in each byte of data, including non-printable characters.  (exponentially more possibilities to try).

That said, I might trust this for simple needs, but would not recommend it over modern encryption methods available, should higher security be needed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...