Ciphers
A C++ command-line application for encrypting and decrypting text using classical cryptographic ciphers



About This Project
Implements multiple classical encryption and decryption techniques, including Caesar and substitution ciphers. This project supports both encryption and decryption workflows, with Caesar cipher decryption implemented using brute-force techniques combined with dictionary-based validation. For substitution cipher decryption, a hill-climbing algorithm guided by quadgram frequency scoring is used to evaluate the 'English-likeness' of candidate decryptions. The program is structured using helper functions and careful function decomposition, and all functionality is validated through an extensive milestone-based test suite.
Key Features
- Caesar cipher encryption and brute-force decryption
- Substitution cipher encryption and decryption using hill climbing
- Dictionary-based validation for Caesar decryption
- Quadgram-based scoring to evaluate English text likelihood
- File-based and console-based decryption support
Technologies Used
- IDE: VSCode
- C++
- string, vector, streams
- Makefile
Challenges & Learnings
Challenges:
The most challenging aspect of this project was designing efficient and correct decryption logic, especially for the substitution cipher. Implementing the hill-climbing algorithm required careful tuning to balance performance and accuracy. Another challenge was adhering to the project constraints, such as avoiding additional libraries and global variables, while still maintaining readable and modular code.
What I Learned:
This project strengthened my understanding of algorithmic problem-solving and cryptanalysis techniques. I gained experience working with brute-force approaches, probabilistic scoring using quadgrams, and performance-aware C++ programming. It also reinforced the importance of clean function decomposition and systematic testing when working with complex logic.