Skip to content

Decode a EDM festival lineup encrypted with a substitution cipher (e.g. Countdown NYE 2023)

License

Notifications You must be signed in to change notification settings

stevenxngo/lineup-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EDM Festival Lineup Decoder

This project is a Python application designed to decrypt EDM festival lineups encrypted with a substitution cipher. I was inspired to by the Countdown NYE 2023 lineup, which was teased on Instagram in an encrypted format. This repository includes:

  • Jupyter notebooks used to develop and test the decryption logic on the Countdown NYE 2023 lineup
  • Python scripts for formatting and decrypting new encrypted lineup files, ensuring reusability and efficiency

Note: The decryption algorithm is based on heuristics and assumptions about the structure of the ciphertext. The algorithm is not guaranteed to work on all encrypted lineups, and may require manual intervention to decrypt certain artists.

Table of Contents

Installation

  1. Clone the repository:
git clone https://github.com/stevenxngo/lineup-decoder
  1. Navigate to the project directory:
cd lineup-decoder
  1. Install the required packages:
pip install -r requirements.txt

Usage

Decryption

  1. Place the encrypted lineup text file in the data/ciphertext directory

  2. Run the main script to prepare the data and decrypt the artist names with the following command (replace [filename] with the name of the encrypted lineup file, excluding the file extension):

python main.py [filename]
  1. The decrypted lineup will be saved in the data/decoded_plaintext directory

Encryption

  1. Place the plaintext lineup text file in the data/plaintext directory

  2. Run the main script with the -e flag as per the following command (replace [filename] with the name of the plaintext lineup file, excluding the file extension):

python main.py [filename] -e
  1. The encrypted lineup will be saved in the data/ciphertext directory

Features

  • Data Preparation: Converts raw encrypted lineup text files into a structured CSV format
  • Decryption: Implements a substitution cipher decryption algorithm to convert encrypted artist names into readable formats
  • Automation: Provides a streamlined pipeline for processing new encrypted files with minimal manual intervention
  • Modular Code: Separates data preparation, decryption and encryption into distinct, reusable scripts

Algorithm

The decryption algorithm is based around heuristics and assumptions about the structure of the substitution cypher encrypted text of alphanumeric characters. The heuristics include:

  1. (-- ---) where each character is different is (DJ SET)
  2. (X---XYZ XYZ) is (SUNSET SET)
  3. (Z-------- XYZ) is (THROWBACK SET)
  4. ... XYX ... is ... B2B ...

Assuming at least two of the heuristics are present in the cyphertext, this results in a starting dictionary of known mappings to create a template. The algorithm then iterates through each artist in the cyphertext, filling in a template with known characters (e.g. if J -> E and G -> T and the cyphertext is HJGJD the template is _ETE_).

A list of possible matches is then generated by iterating through a list of known artists (located in data/artists.txt) and comparing the template to the artist name. If there is only one match and the at least 50% of the artist cyphertext is known, the artist is added to the plaintext and dictionary is updated. This process is repeated until either all artists are decrypted or no new artists can be decrypted.

Note: The current implementation can only process artists with alphanumeric characters and spaces. Artists with special characters (e.g. K?D, A-Trak, ABOVE & BEYOND) will require manual intervention.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Acknowledgements

Contact

For questions, feedback, or inquiries about the project, feel free to reach out to me:

Steven Ngo - steventxngo@gmail.com - GitHub - LinkedIn

About

Decode a EDM festival lineup encrypted with a substitution cipher (e.g. Countdown NYE 2023)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published