Which Cipher Is the Most Difficult for a Computer to Decode?

CSEF · 2018 Computational Systems & Analysis

Overview

Objectives/Goals The objective of my project was to determine which type of cipher was the hardest for a computer to decode: The Ceaser Cipher, The Polybius Square, and The Vigenere Cipher. Methods/Materials To execute my project I created different files to hold each of my cipher codes. Inside each file, I first started a timer that I had imported from a dictionary. I wrote code to loop through each character in the ciphertext. Each cipher required different code to decrypt the characters. For the Vigenere Cipher, I had the code build a matrix for me. For the Polybius Square, I manually created a matrix. For my Caesar Cipher, I created a dictionary to hold all of my letters and their values. Also, I had to loop through all the possible different shift values. Lastly, I stopped my stopwatch and recorded my elapsed time in nanoseconds. Then I divided my elapsed time by 1,000,000,000 to get seconds. The materials that I used are the following: a stopwatch that was built into my code, and by visually assessing the number of lines of code. Results The results showed that the Vigenere Cipher had the greatest lines of code, with the Polybius Square coming in second, and the Caesar Cipher in third. For the overall time the Caesar Cipher comes in first with the longest time, Vigenere Cipher in second with the next longest, and Polybius Square with the least. Conclusions/Discussion I believe that I received these results because the Vigenere Cipher had the most complex code, due to its 26 by 26 matrix, so it would have the most lines of code. The Polybius Square has the second greatest lines of code because it has a matrix that is much smaller than the matrix in the Vigenere Cipher but still more complex than the Caesar Cipher. The Caesar Cipher has the least lines of code but the most time because it is repeating a fairly simple task many times. The Polybius Square received the least time because it had the least number of steps of all the codes. The Vigenere Cipher had the second least time because it was doing a fairly simple task that had complex components.

Summary statement

I showed that the Vigenere Cipher was the most difficult due to it's 26 by 26 matrix, which took the most lines of code.

Help received

I would also like to thank my father for instructing me during the allotted amount of time while I am creating the computer code to decode the cipher.

Competition history

  • CSEF 2018 Computational Systems & Analysis · Entry J0815

Resources

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Browse more like this

Source: California Science & Engineering Fair public projects

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google