Learn about a few examples
of cryptography in history.
Completed
What is information?
Number Bases
Encoding
Overflow Errors
Encryption vs Encoding
Today
Cryptography in History
Caesar Cipher in Python
Upcoming
Numbers to Letters and Back
Start with typing:
https://shaunwegs.github.io/2024/cs/t/index.html
Keep your screenshot, you'll need it later.
At the end of the video, he mentioned that this only covered the first stage of cryptography. When discussing cryptography, we often talk about classical cryptography or modern cryptography. We also sometimes talk about cryptography in 3 stages: manual (by hand), mechanical (using devices), and digital (using computers).
We typically consider mechanical cryptography to start around World War 2, which includes the infamous Enigma Machine. However, this doesn't mean that there weren't encryption devices prior to that.
Devices like a Cipher Disc, the first one often attributed to the Italian architect and author Leon Battista Alberti in 1470, were created to help encrypt and decrypt messages.
Cipher wheels were also used during the American Civil War (Apr 12, 1861 – Apr 9, 1865), specifically by the Confederates. The Union used other encryption methods, including the Route Cipher that we believe the Confederate never cracked.
Here's an image about a modern cipher wheel, based on a cipher wheel used by the Mexican Army. The Mexican Army may have used a cipher wheel during the Mexican-American War (1846-1848), and probably during the Mexican Revolution (1913-1917).
When we say modern cryptography, we basically mean digital cryptography. So, classical cryptography is basically manual and mechanical cryptography, and modern is digital cryptography. People still study classical cryptography today, but more in for the historical value as opposed to anything practical.
Claude Shannon's work in the 1940's would lead to modern cryptography, but we would typically say that modern cryptography wasn't actually until the 1970s. This was when the Data Encryption Standard was developed at IBM. Modern cryptography is basically digital cryptography. Shanon's would lead to modern cryptography, he was just a few decades ahead of his time.
That's way too complicated for where we are now. For programming as a beginner, we need to focus on the older, simpler (and not very secure) ways to encrypt.
You should already know what Caesar Cipher is. It's not a great cipher, but it's well known and one of the oldest ciphers in existence. While the Caesar cipher may have helped keep Caesar's messages confidential and protected, keep in mind that most people were illiterate and couldn't read anyway.
Now, we'll use Python to write a simple Caesar Cipher program. While we are using digital tools to run this, it is still 'classical cryptography' we're just using a computer to do it. We'll talk more about modern cryptography later on in the semester.
Follow along.
The finished product of a cipher program isn't actually very important.
The important part is that you understand the process.
I'm using just basic text edit and terminal, but you can do this in PyCharm. I talk a fair bit about the terminal in this video, and how to use it to navigate our folders on the system. We're not really focused on that this year- you can try it if you want, or you can ignore it and just work with PyCharm.
Use the same variable_name.replace("x","x") method I used in the video above to create your own mono-alphabetic cipher program. It should not just be a ceasar cipher +3 like mine was. You can use mine as a base, but experiment with it some to make it your own.
After, screenshot both your code, and that it actually runs correctly. Double check the output of your program to make sure that it's really encrypting your message as intended.