Caesar Cipher Encryption and Decryption with example
Skills:
Algorithm Basics80%
Key Takeaways
Caesar Cipher encryption and decryption basics are explained, with a promise to implement it in Python in a subsequent video.
Full Transcript
the Caesar cipher is one of the simplest and widely known ciphers it is also one of the earliest known ciphers through history the Caesar cipher being named after Julius Caesar and was used at the time to communicate with his generals hopefully in a secure way he lived in time 100 BC to 44 BC and during his time deciphered would have been considered relatively secure as the most during his era was unable to read and if they if someone came across one of his ciphered messages they would probably think it was written in another language but today this offers essentially no security so how does the Caesar cipher work well we it is quite simple we have 26 letters in the alphabet and for each of their letters it is being shifted a specific number forward in the alphabet so for example a if we use a shift that is a number three then a would become shifted forward three letters in the alphabet so a would become B C D so it become a become D and similarly for B we've become e C becomes F D becomes G and then at the end of the alphabet when we get to Zed then we will actually map it back to the beginning so said would become a B C for a shift of three so said would become C so in as we saw every letter is shifted by three and if we would have a plaintext attack at noon then encrypted this becomes something unreadable and we can notice here that a becomes shifted forward by three then becomes D and similarly T shifted forward by three is W and if we have this ciphertext and we can quite easily also Mack it map it back to the original message by by by subtracting the shift so D becomes backward shifted so subtracted 3 to become a so mathematically the encryption function is e of X we take the letter X and we add a shift and then we also have it modulus 26 so to be able to have that if we are at the end of the alphabet then we map it back to the beginning and the decryption function D of X is simply as we mentioned it's the letter and then we subtract the shift and then we take modulus 26 so as we saw in the previous example the shift was 3 but we could just as easily imagine any shift from 1 to 26 I in this case the length of our alphabet so for example we can use a shift by 4 or 4 5 etc so the problem with this cipher however is that it is very easily broken we can do it by brute force for example we can simply try with a shift of 1 and look at the the message does it is it readable and if it's not readable then we check a shift of 2 etc until we get to the end which is 26 and we continue doing that until we get a readable message and so since we have a fixed number of shifts to try on a message on a ciphered message then then this is done in a constant time so to be able to break the caesar cipher it is done in constant time which makes it a very bad very bad cipher so in the next video I will code the Caesar cipher in Python if you're interested in how that looks check out the next video the link will be in the description thank you so much for watching this video
Original Description
In this video I walkthrough the basics of the Ceaser Cipher and in the next video we will code it in Python.
Link to Python tutorial: https://www.youtube.com/watch?v=6YBqtYkzzmY&t=17s
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Aladdin Persson · Aladdin Persson · 15 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
▶
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
computeCost.m Linear Regression Cost Function - Machine Learning
Aladdin Persson
gradientDescent.m Gradient Descent Implementation - Machine Learning
Aladdin Persson
Neural Network from scratch - Part 1 (Standard Notation)
Aladdin Persson
Neural Network from scratch - Part 2 (Forward Propagation)
Aladdin Persson
Neural Network from scratch - Part 3 (Backward Propagation)
Aladdin Persson
Neural Network from scratch - Part 4 (With Python)
Aladdin Persson
sigmoid.m - Programming Assignment 2 Machine Learning
Aladdin Persson
costFunction.m - Programming Assignment 2 Machine Learning
Aladdin Persson
predict.m - Programming Assignment 2 Machine Learning
Aladdin Persson
costFunctionReg.m - Programming Assignment 2 Machine Learning
Aladdin Persson
lrCostFunction.m - Programming Assignment 3 Machine Learning
Aladdin Persson
oneVsAll.m - Programming Assignment 3 Machine Learning
Aladdin Persson
predictOneVsAll.m - Programming Assignment 3 Machine Learning
Aladdin Persson
predict.m - Programming Assignment 3 Machine Learning
Aladdin Persson
Caesar Cipher Encryption and Decryption with example
Aladdin Persson
Cryptography: Caesar Cipher Python
Aladdin Persson
Vigenere Cipher Explained (with Example)
Aladdin Persson
Cryptography: Vigenere Cipher Python
Aladdin Persson
Hill Cipher Explained (with Example)
Aladdin Persson
Cryptography: Hill Cipher Python
Aladdin Persson
Interval Scheduling Greedy Algorithm: Python
Aladdin Persson
Weighted Interval Scheduling Algorithm Explained
Aladdin Persson
Weighted Interval Scheduling Python Code
Aladdin Persson
Sequence Alignment | Needleman Wunsch Algorithm
Aladdin Persson
Sequence Alignment | Needleman Wunsch in Python
Aladdin Persson
Codility BinaryGap Python
Aladdin Persson
Codility CyclicRotation Python
Aladdin Persson
Derivation Linear Regression with Gradient Descent
Aladdin Persson
Linear Regression Gradient Descent From Scratch in Python
Aladdin Persson
Pytorch Neural Network example
Aladdin Persson
Pytorch CNN example (Convolutional Neural Network)
Aladdin Persson
Pytorch LeNet implementation from scratch
Aladdin Persson
Pytorch VGG implementation from scratch
Aladdin Persson
Pytorch GoogLeNet / InceptionNet implementation from scratch
Aladdin Persson
How to save and load models in Pytorch
Aladdin Persson
How to build custom Datasets for Images in Pytorch
Aladdin Persson
Pytorch Transfer Learning and Fine Tuning Tutorial
Aladdin Persson
Pytorch Data Augmentation using Torchvision
Aladdin Persson
Pytorch Quick Tip: Weight Initialization
Aladdin Persson
Pytorch Quick Tip: Using a Learning Rate Scheduler
Aladdin Persson
Pytorch ResNet implementation from Scratch
Aladdin Persson
Pytorch TensorBoard Tutorial
Aladdin Persson
Pytorch DCGAN Tutorial (See description for updated video)
Aladdin Persson
Naive Bayes from Scratch - Machine Learning Python
Aladdin Persson
Spam Classifier using Naive Bayes in Python
Aladdin Persson
K-Nearest Neighbor from scratch - Machine Learning Python
Aladdin Persson
Linear Regression Normal Equation Python
Aladdin Persson
SVM from Scratch - Machine Learning Python (Support Vector Machine)
Aladdin Persson
Neural Network from Scratch - Machine Learning Python
Aladdin Persson
Pytorch RNN example (Recurrent Neural Network)
Aladdin Persson
Pytorch Bidirectional LSTM example
Aladdin Persson
Pytorch Text Generator with character level LSTM
Aladdin Persson
Logistic Regression from Scratch - Machine Learning Python
Aladdin Persson
K-Means Clustering from Scratch - Machine Learning Python
Aladdin Persson
Pytorch Torchtext Tutorial 1: Custom Datasets and loading JSON/CSV/TSV files
Aladdin Persson
Pytorch Torchtext Tutorial 2: Built in Datasets with Example
Aladdin Persson
Pytorch Torchtext Tutorial 3: From Textfiles to Dataset
Aladdin Persson
Paper Review: Sequence to Sequence Learning with Neural Networks
Aladdin Persson
Pytorch Seq2Seq Tutorial for Machine Translation
Aladdin Persson
Pytorch Seq2Seq with Attention for Machine Translation
Aladdin Persson
More on: Algorithm Basics
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
X now offers an MCP server to make its platform easier for AI tools to use
TechCrunch AI
n8n Automation Repurpose Video Content: The 2025 Production Guide
Dev.to AI
You’re Still Paying $200/Month for AI Tools You Could Replace With a Free Local Setup Tonight
Medium · Data Science
Top 10 AI Tools Every College Student Should Know in 2026
Medium · AI
🎓
Tutor Explanation
DeepCamp AI