The Caesar cipher | Journey into cryptography | Computer Science | Khan Academy
-
0:04 - 0:08SPEAKER 1: The first well known
cipher, a substitution cipher, -
0:08 - 0:11was used by Julius
Caesar around 58 BC. -
0:11 - 0:14It is now referred to
as the Caesar Cipher. -
0:14 - 0:18Caesar shifted each letter
in his military commands -
0:18 - 0:20in order to make them
appear meaningless -
0:20 - 0:22should the enemy intercept it.
-
0:22 - 0:26Imagine Alice and Bob decided
to communicate using the Caesar -
0:26 - 0:30Cipher First, they would need
to agree in advance on a shift -
0:30 - 0:32to use-- say, three.
-
0:32 - 0:33So to encrypt her
message, Alice would -
0:33 - 0:36need to apply a shift
of three to each letter -
0:36 - 0:38in her original message.
-
0:38 - 0:43So A becomes D, B becomes
E, C becomes F, and so on. -
0:43 - 0:46This unreadable, or
encrypted message, -
0:46 - 0:48is then sent to Bob openly.
-
0:51 - 0:54Then Bob simply subtracts
the shift of three -
0:54 - 0:58from each letter in order to
read the original message. -
0:58 - 1:00Incredibly, this
basic cipher was -
1:00 - 1:04used by military leaders for
hundreds of years after Caesar. -
1:04 - 1:07JULIUS CAESAR: I
have fought and won. -
1:07 - 1:11But I haven't conquered
over man's spirit, -
1:11 - 1:13which is indomitable.
-
1:13 - 1:14SPEAKER 1: However,
a lock is only -
1:14 - 1:17as strong as its weakest point.
-
1:17 - 1:19A lock breaker may look
for mechanical flaws. -
1:19 - 1:21Or failing that,
extract information -
1:21 - 1:25in order to narrow down
the correct combination. -
1:25 - 1:30The process of lock breaking and
code breaking are very similar. -
1:30 - 1:31The weakness of
the Caesar Cipher -
1:31 - 1:35was published 800 years later
by an Arab mathematician -
1:35 - 1:36named Al-Kindi.
-
1:36 - 1:39He broke the Caesar Cipher
by using a clue based -
1:39 - 1:41on an important
property of the language -
1:41 - 1:43a message is written in.
-
1:43 - 1:46If you scan text from
any book and count -
1:46 - 1:47the frequency of
each letter, you -
1:47 - 1:50will find a fairly
consistent pattern. -
1:50 - 1:53For example, these are the
letter frequencies of English. -
1:53 - 1:57This can be thought of as
a fingerprint of English. -
1:57 - 1:58We leave this
fingerprint when we -
1:58 - 2:01communicate without
realizing it. -
2:01 - 2:03This clue is one of
the most valuable tools -
2:03 - 2:05for a codebreaker.
-
2:05 - 2:08To break this
cipher, they count up -
2:08 - 2:11the frequencies of each
letter in the encrypted text -
2:11 - 2:14and check how far the
fingerprint has shifted. -
2:14 - 2:17For example, if H is
the most popular letter -
2:17 - 2:19in the encrypted
message instead of E, -
2:19 - 2:22then the shift was likely three.
-
2:22 - 2:24So they reverse
the shift in order -
2:24 - 2:26to reveal the original message.
-
2:26 - 2:28This is called
frequency analysis, -
2:28 - 2:32and it was a blow to the
security of the Caesar cipher.
- Title:
- The Caesar cipher | Journey into cryptography | Computer Science | Khan Academy
- Description:
-
Brit explains the Caesar cipher, the first popular substitution cipher, and shows how it was broken with "frequency analysis"
Watch the next lesson: https://www.khanacademy.org/computing/computer-science/cryptography/crypt/v/polyalphabetic-cipher?utm_source=YT&utm_medium=Desc&utm_campaign=computerscience
Missed the previous lesson? https://www.khanacademy.org/computing/computer-science/cryptography/crypt/v/intro-to-cryptography?utm_source=YT&utm_medium=Desc&utm_campaign=computerscience
Computer Science on Khan Academy: Learn select topics from computer science - algorithms (how we solve common problems in computer science and measure the efficiency of our solutions), cryptography (how we protect secret information), and information theory (how we encode and compress information).
About Khan Academy: Khan Academy is a nonprofit with a mission to provide a free, world-class education for anyone, anywhere. We believe learners of all ages should have unlimited access to free educational content they can master at their own pace. We use intelligent software, deep data analytics and intuitive user interfaces to help students and teachers around the world. Our resources cover preschool through early college education, including math, biology, chemistry, physics, economics, finance, history, grammar and more. We offer free personalized SAT test prep in partnership with the test developer, the College Board. Khan Academy has been translated into dozens of languages, and 100 million people use our platform worldwide every year. For more information, visit www.khanacademy.org, join us on Facebook or follow us on Twitter at @khanacademy. And remember, you can learn anything.
For free. For everyone. Forever. #YouCanLearnAnything
Subscribe to Khan Academy’s Computer Science channel: https://www.youtube.com/channel/UC8uHgAVBOy5h1fDsjQghWCw?sub_confirmation=1
Subscribe to Khan Academy: https://www.youtube.com/subscription_center?add_user=khanacademy - Video Language:
- English
- Team:
Khan Academy
- Duration:
- 02:36
![]() |
Fran Ontanaya edited English subtitles for The Caesar cipher | Journey into cryptography | Computer Science | Khan Academy | |
![]() |
Fran Ontanaya edited English subtitles for The Caesar cipher | Journey into cryptography | Computer Science | Khan Academy |