🔐 Quill: My First Step into Cryptography with C
Introduction
I recently wanted to improve my C programming skills, so I decided to try my hand at classical cryptography. That’s how my small project was born - a utility for decrypting text encrypted with various ciphers.Currently, it only supports the Caesar cipher, but I will update it and add more ciphers.
What is the Caesar cipher?
The Caesar cipher is one of the simplest encryption techniques. You take a letter and shift it along the alphabet by a fixed number.
For example, with shift = 3:
A → D
B → E
C → F
And so on for the entire text.
How I approached the implementation
To write a working decryptor, I had to solve a few smaller problems:
- Check if a character is a letter (I used
isalpha
for this). - Work with ASCII codes to apply shifts correctly.
- Handle uppercase and lowercase letters separately.
Takeaways
This project helped me better understand:
- how to manipulate characters and strings in C,
- how ASCII codes work,
- why standart functions like
isalpha
andisupper
are so useful.