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
Resources
Related projects
CSEF · 2007
If Robert E. Lee Had a PC: Cracking the Vigenere Cipher
CSEF · 2014
Evaluation of the Stronger Data Encryption Type for Secured Communication
CSEF · 2004
Encryption: The Effect of Algorithm Type and Plaintext Length on Encryption, Decryption, and Force-Cracking Times
CSEF · 2011
Cracking the Code: The Effect of Key Length on the Security of a Public Key Encryption
ISEF · 2021
Breaking the Substitution Cipher: Coding an Automatic Cipher Solver
CSEF · 2010
The Effect of Encryption Key Combination on Data Security
CSEF · 2004
Security Through Chaos: Encryption as a Source for Information Entropy
CSEF · 2010
Cracking the Code: Analyzing Alphanumeric Combinations and Password Security
Closest projects by meaning, across every fair and year in the corpus.
Browse more like this
Source: California Science & Engineering Fair public projects