easteregg Leprechaun
  • Patrick Collins
    • Home
    • Blog
      • eJPTv1 Certification
      • Conferences

      • Blog Home
    • Travel Photos
    • Notes
    • Graduation!
    • Projects and University Work
      • Honours Project
      • Web App Pen Test

      • All projects
    • Socials
    • About Me

    Brute Forcing The Enigma Cipher

    bombe machine

    About

    • Module: CMP110
    • Title: Introduction to Security
    • Grade: B+

    As part of my intro to security module, I had to do a mini project of my choice. Cryptography is a big interest of mine and I love the Enigma cipher, the bombe machine and the history surrounding these. Alan Turing, the legend, is also a big inspiration of mine. So I decided to have a smash at making a program to decipher Enigma ciphertext. The program makes use of a great Enigma library called Py-Enigma. I highly suggest checking it out as it is very well detailed and built, with many features I didn't get using in this project.

    Usage

    The user enters text to encrypt, seperated by "X" to get the crib text feature working. Engima rotor positions are then chosen by the user starting from I II III all the way to V IV III. Finally the start position is set with 3 letters. Although to note in my program the...

    • Reflector is set to "B" and cannot be changed.
    • Ring settings at "1 1 1" cannot be changed.
    • Plugboard "AV BS CG DL FU HZ IN KM OW RX" cannot be changed.

    Below is a demonstration of the program. With me entering the settings, encrypting the plaintext and brute force deciphering.


    Your browser does not support the video tag.

    Once a match for the cribtext has been found, the current Enigma settings that cracked it is used to then decipher the full ciphertext. I absolutely loved doing this project, and it helped me understand this great piece of history and cipher even more.

    PDF

    Below is the PDF document detailing the project further.

    Please DO NOT plagiarise this document. You will be caught, it's not worth it.

    <> Code

    If you would like to check out the code have a look at the repository below. Keep in mind if you want to run the program you just have to simply install Py-Enigma with pip.

    Please DO NOT plagiarise my code. You will be caught, it's not worth it.

    Projects Github Repository

    CMP110 Enigma Cipher Brute-force

    Bruteforce algorithm which attempts to decrypt Enigma ciphertext, with the help of Py-Enigma, from user inputted Enigma settings.


    Copyright © 2022-2025 Patrick Collins
    Contact Me: Contact@paddylonglegs.site
    Background created by freepik