SlideShare a Scribd company logo
Understanding the History of Encryption
Understanding the History of Encryption
Few facts -
Encryption has been around for a very long time. Instead of
explaining the History of Cryptography, I am going to
recommend a very good book by David Khan called "The Code
Breakers" , published in 1996.
Instead of starting with early encryption algorithm, I am going
to used two interesting encryption algorithms that will capture
manu of the concepts that Khan outline in his book. The first
algorithm is Character Substitution. Remember, the problem we
are trying to solve is "how do we secure communications?". An
example is - Suppose Alice and Bob wants to communicate
securely using Eve is an attacker that wants to eavesdrop on the
conversation. In order to communicate securely, Alice and Bob
are going to share a secret key, which we are going to call K.
Eve does not know anything about the key K.
Alice, Bob and even Eve know the algorithm (say character
substitution). We all have played the substitution game in
School. A is map to C and B is map to X and C is map to W
and so on and so forth. So, if EVE gets the mapping and the
ciphered text, she will be able to decipher the secret. Let
supposed Eve gets the ciphered text but not the mapping (key).
It will be difficult to figure the key out.
Assuming we have 26 letters, how many possibilities are there -
-> guess?
1. 26
2. 26X26
3. 26! (factorial)
4. 2^26
The answer is 26! which is about 2^88 if I remember correctly,
which is a very large sample space. I hope you understand
where I got the 26!. Think of one mapping and now think of
another mapping and so on.
What is factorial? 1! = 1, 2! = 1X2 = 2, 3! = 1X2X3 = 6 and so
on.
When I said 2^88, it is a good key since it is using 88 bits. Note
that I am not saying it is great.
What I want you to do is to think about how you would break a
substitution cipher? It is not hard but it needs some
imagination.
The Substitution Cipher and How to break the Cipher
Breaking The Substitution Cipher
One way to break a substitution cipher is to use frequency
analysis. Let's focus on the English language for now but the
process works the same way for other languages. The character
"e" occurs 12.7% in the Eglish language and the letter "t"
occurs 9.35% and the letter "a" is 8.2% of the time. So, you can
count each character in the ciphered text, compute its frequency
and start replacing it. After you complete the first say 4
characters, you may want to change your strategy. Can you
explain why you want to stop after the first 4 characters? The
two-character "of" is about 4.16% and "to" is about 2%. Now
try three characters frequency.
After a period of time, you will be able to decipher most of the
text. I am going to ask you to do your first significant
homework using frequency analysis.
One possibility for the substitution cipher:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
↕
V
J
Z
B
G
N
F
E
P
L
I
T
M
X
D
W
K
Q
U
C
R
Y
A
H
S
O
Note that we can have 25 factorial of these possibilities
(remember 2^88 - 28-bit key)
Here is your homework - A character sub was used. Can you
decipher as much of this text as you can? Submit your results in
the drop box below (Frequency Analysis). You may use Python
to code the solution.
ztrfqvdjrzqt
rci wzyabi wdmwrzrdrzqt jzacif zw g jzacif rcgr cgw miit zt dwi
hqf ygtx cdtvfivw qh xigfw (gt iojibbitr czwrqfx zw lzsit zt
wzyqt wztlcw 'rci jqvi mqqk'). zr mgwzjgbbx jqtwzwrw qh
wdmwrzrdrztl isifx abgztrior jcgfgjrif hqf g vzhhifitr jzacifrior
jcgfgjrif. zr vzhhifw hfqy rci jgiwgf jzacif zt rcgr rci jzacif
gbacgmir zw tqr wzyabx rci gbacgmir wczhriv, zr zw jqyabiribx
udymbiv.
rci wzyabi wdmwrzrdrzqt jzacif qhhifw sifx bzrrbi jqyydtzjgrzqt
wijdfzrx, gtv zr pzbb mi wcqpt rcgr zr jgt mi igwzbx mfqkit isit
mx cgtv, iwaijzgbbx gw rci yiwwgliw mijqyi bqtlif (yqfi rcgt
wisifgb cdtvfiv jzacifrior jcgfgjrifw).
Understanding Vignere
Vignere Cipher
Our follow on topic is Vignere Cipher which is an interesting
algorithm developed by French Cryptographer Vignere. I will
post more about the Vignere Cipher tomorrow and ways to hack
the Vigenere cipher.
(You will run into different spelling of Vignere)
Vignere Cipher is a primitive Cipher and is not practical for the
computing today but it uses an interesting substitution. There is
something called Vignere table:
The Vignere cipher requires a key of fixed length. For our
example we are going to use the word CRYPTO. Please do not
worry about upper case and lower case.
The clear text we are going to encrypt is:
IT IS A GREAT DAY AT MARYMOUNT
What we do next is to paste the key below the clear text with all
spaces removed.
ITISAGREATDAYATMARYMOUNT <--------------- Clear Text
CRYPTO
CRYPTOCRYPTOCRYPT <-------------- Key
To encrypt the letter "I" in the message, you would look at row
"I" and column "C" - the "C" in CRYPTO since they lined up.
The result is "K". Next, we move to the next character, which is
a "T" for the row and an column "R". I will let you complete the
rest.
ITISAGREATDAYATMARYMOUNT <--------------- Clear Text
CRYPTO
CRYPTOCRYPTOCRYPT <-------------- Key
KK <--------------
CIPHERED TEXT
Assume you know the length of the key, how would you break
this encryption? Think about this question and come up with
ideas and we'll use next week discussion to post your findings

More Related Content

PDF
Computer Security (Cryptography) Ch03
PPTX
CryptX '22 W1 Release (1).pptx
PPTX
Classical cyphers python programming
PDF
Part Numbering and ID codes: general considerations and check digits
PPTX
Encrypted message transmitter on public network
PPTX
CTI.Vigenir Cipher.pptx
PPTX
Substitution cipher and Its Cryptanalysis
PDF
C Programming Interview Questions
Computer Security (Cryptography) Ch03
CryptX '22 W1 Release (1).pptx
Classical cyphers python programming
Part Numbering and ID codes: general considerations and check digits
Encrypted message transmitter on public network
CTI.Vigenir Cipher.pptx
Substitution cipher and Its Cryptanalysis
C Programming Interview Questions

Similar to Understanding the History of EncryptionUnderstanding the (20)

PPTX
Classical encryption technique -Cryptoggraphy.pptx
PPT
Crypto
PPTX
1_Cryptanalysis for graduate course.pptx
PPTX
M.Sridevi II-M.Sc (computer science)
PPT
Basic Encryption Decryption Chapter 2
PDF
Course notes on Astronomical data analysis by python pdf
PPTX
Recursive Functions in Python - Assignment Sample for University Students
PPT
classicalencryptiontechniques.ppt
PPTX
Caesar Ciphers Powerpoint.pptxCaesar Ciphers Powerpoint.pptx
PPTX
Cryptography 101
PPTX
Mod1 basics cryptography first module vtu
PDF
HackIM 2012 CTF Walkthrough
PDF
perl 6 hands-on tutorial
PDF
Using Unsorted Bin Attack to achieve a leakless RCE on PIE Binaries
PPTX
forth lecture of the information retrieval and management partB_2025.pptx
PDF
Generating Natural-Language Text with Neural Networks
PDF
writing self-modifying code and utilizing advanced assembly techniques
DOCX
Classical crypto techniques
PPT
Erlang Concurrency
Classical encryption technique -Cryptoggraphy.pptx
Crypto
1_Cryptanalysis for graduate course.pptx
M.Sridevi II-M.Sc (computer science)
Basic Encryption Decryption Chapter 2
Course notes on Astronomical data analysis by python pdf
Recursive Functions in Python - Assignment Sample for University Students
classicalencryptiontechniques.ppt
Caesar Ciphers Powerpoint.pptxCaesar Ciphers Powerpoint.pptx
Cryptography 101
Mod1 basics cryptography first module vtu
HackIM 2012 CTF Walkthrough
perl 6 hands-on tutorial
Using Unsorted Bin Attack to achieve a leakless RCE on PIE Binaries
forth lecture of the information retrieval and management partB_2025.pptx
Generating Natural-Language Text with Neural Networks
writing self-modifying code and utilizing advanced assembly techniques
Classical crypto techniques
Erlang Concurrency

More from corbing9ttj (20)

DOCX
1. Is a smile a universal nonverbal form of communication Why or wh.docx
DOCX
1. IntroductionWritten and Narrated by Professor Deni ElliottThe.docx
DOCX
1. IntroductionThe objective of this video is to introduce studen.docx
DOCX
1. In the following sentence, which words are used as adjectivesT.docx
DOCX
1. In the song Tonight from the musical West Side Story, the compo.docx
DOCX
1. IT Diffusion Models Please respond to the followingReview th.docx
DOCX
1. In many ways the underworld was considered dangerous, but there w.docx
DOCX
1. In Jules Henry’s view, how are values and drives related to e.docx
DOCX
1. If I wanted to test a certain chemical to see if it made mice run.docx
DOCX
1. Identify a community or aggregate you are currently involved wi.docx
DOCX
1. Identify and describe the steps of the scientific method. Which o.docx
DOCX
1. How many time zones are there across the world2. Which map wou.docx
DOCX
1. How has society responded to coastal changes initiated by sand tr.docx
DOCX
1. How has the economic geography of this region changed over the .docx
DOCX
1. Important nurses of the 19th century are often overshadowed by Ni.docx
DOCX
1. In what ways did the Columbian Exchange impact the Americas, .docx
DOCX
1. How did the conditions of life among descendants of African Slave.docx
DOCX
1. If you adopt the _______ perspective, youll reject an emphasis o.docx
DOCX
1. How are information systems transforming business and what is the.docx
DOCX
1. How can Fiedlers theory of the least preferred coworker help man.docx
1. Is a smile a universal nonverbal form of communication Why or wh.docx
1. IntroductionWritten and Narrated by Professor Deni ElliottThe.docx
1. IntroductionThe objective of this video is to introduce studen.docx
1. In the following sentence, which words are used as adjectivesT.docx
1. In the song Tonight from the musical West Side Story, the compo.docx
1. IT Diffusion Models Please respond to the followingReview th.docx
1. In many ways the underworld was considered dangerous, but there w.docx
1. In Jules Henry’s view, how are values and drives related to e.docx
1. If I wanted to test a certain chemical to see if it made mice run.docx
1. Identify a community or aggregate you are currently involved wi.docx
1. Identify and describe the steps of the scientific method. Which o.docx
1. How many time zones are there across the world2. Which map wou.docx
1. How has society responded to coastal changes initiated by sand tr.docx
1. How has the economic geography of this region changed over the .docx
1. Important nurses of the 19th century are often overshadowed by Ni.docx
1. In what ways did the Columbian Exchange impact the Americas, .docx
1. How did the conditions of life among descendants of African Slave.docx
1. If you adopt the _______ perspective, youll reject an emphasis o.docx
1. How are information systems transforming business and what is the.docx
1. How can Fiedlers theory of the least preferred coworker help man.docx

Recently uploaded (20)

PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Pharma ospi slides which help in ospi learning
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Classroom Observation Tools for Teachers
PDF
Pre independence Education in Inndia.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Lesson notes of climatology university.
PPTX
master seminar digital applications in india
PDF
01-Introduction-to-Information-Management.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
O7-L3 Supply Chain Operations - ICLT Program
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
102 student loan defaulters named and shamed – Is someone you know on the list?
Final Presentation General Medicine 03-08-2024.pptx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Pharma ospi slides which help in ospi learning
STATICS OF THE RIGID BODIES Hibbelers.pdf
RMMM.pdf make it easy to upload and study
Classroom Observation Tools for Teachers
Pre independence Education in Inndia.pdf
Sports Quiz easy sports quiz sports quiz
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Abdominal Access Techniques with Prof. Dr. R K Mishra
Complications of Minimal Access Surgery at WLH
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Lesson notes of climatology university.
master seminar digital applications in india
01-Introduction-to-Information-Management.pdf

Understanding the History of EncryptionUnderstanding the

  • 1. Understanding the History of Encryption Understanding the History of Encryption Few facts - Encryption has been around for a very long time. Instead of explaining the History of Cryptography, I am going to recommend a very good book by David Khan called "The Code Breakers" , published in 1996. Instead of starting with early encryption algorithm, I am going to used two interesting encryption algorithms that will capture manu of the concepts that Khan outline in his book. The first algorithm is Character Substitution. Remember, the problem we are trying to solve is "how do we secure communications?". An example is - Suppose Alice and Bob wants to communicate securely using Eve is an attacker that wants to eavesdrop on the conversation. In order to communicate securely, Alice and Bob are going to share a secret key, which we are going to call K. Eve does not know anything about the key K. Alice, Bob and even Eve know the algorithm (say character substitution). We all have played the substitution game in School. A is map to C and B is map to X and C is map to W and so on and so forth. So, if EVE gets the mapping and the ciphered text, she will be able to decipher the secret. Let supposed Eve gets the ciphered text but not the mapping (key). It will be difficult to figure the key out. Assuming we have 26 letters, how many possibilities are there -
  • 2. -> guess? 1. 26 2. 26X26 3. 26! (factorial) 4. 2^26 The answer is 26! which is about 2^88 if I remember correctly, which is a very large sample space. I hope you understand where I got the 26!. Think of one mapping and now think of another mapping and so on. What is factorial? 1! = 1, 2! = 1X2 = 2, 3! = 1X2X3 = 6 and so on. When I said 2^88, it is a good key since it is using 88 bits. Note that I am not saying it is great. What I want you to do is to think about how you would break a substitution cipher? It is not hard but it needs some imagination. The Substitution Cipher and How to break the Cipher Breaking The Substitution Cipher One way to break a substitution cipher is to use frequency analysis. Let's focus on the English language for now but the process works the same way for other languages. The character "e" occurs 12.7% in the Eglish language and the letter "t" occurs 9.35% and the letter "a" is 8.2% of the time. So, you can count each character in the ciphered text, compute its frequency
  • 3. and start replacing it. After you complete the first say 4 characters, you may want to change your strategy. Can you explain why you want to stop after the first 4 characters? The two-character "of" is about 4.16% and "to" is about 2%. Now try three characters frequency. After a period of time, you will be able to decipher most of the text. I am going to ask you to do your first significant homework using frequency analysis. One possibility for the substitution cipher: A B C D E F G H I J K L
  • 7. D W K Q U C R Y A H S O Note that we can have 25 factorial of these possibilities (remember 2^88 - 28-bit key) Here is your homework - A character sub was used. Can you decipher as much of this text as you can? Submit your results in the drop box below (Frequency Analysis). You may use Python to code the solution. ztrfqvdjrzqt rci wzyabi wdmwrzrdrzqt jzacif zw g jzacif rcgr cgw miit zt dwi hqf ygtx cdtvfivw qh xigfw (gt iojibbitr czwrqfx zw lzsit zt
  • 8. wzyqt wztlcw 'rci jqvi mqqk'). zr mgwzjgbbx jqtwzwrw qh wdmwrzrdrztl isifx abgztrior jcgfgjrif hqf g vzhhifitr jzacifrior jcgfgjrif. zr vzhhifw hfqy rci jgiwgf jzacif zt rcgr rci jzacif gbacgmir zw tqr wzyabx rci gbacgmir wczhriv, zr zw jqyabiribx udymbiv. rci wzyabi wdmwrzrdrzqt jzacif qhhifw sifx bzrrbi jqyydtzjgrzqt wijdfzrx, gtv zr pzbb mi wcqpt rcgr zr jgt mi igwzbx mfqkit isit mx cgtv, iwaijzgbbx gw rci yiwwgliw mijqyi bqtlif (yqfi rcgt wisifgb cdtvfiv jzacifrior jcgfgjrifw). Understanding Vignere Vignere Cipher Our follow on topic is Vignere Cipher which is an interesting algorithm developed by French Cryptographer Vignere. I will post more about the Vignere Cipher tomorrow and ways to hack the Vigenere cipher. (You will run into different spelling of Vignere) Vignere Cipher is a primitive Cipher and is not practical for the computing today but it uses an interesting substitution. There is something called Vignere table: The Vignere cipher requires a key of fixed length. For our example we are going to use the word CRYPTO. Please do not worry about upper case and lower case. The clear text we are going to encrypt is:
  • 9. IT IS A GREAT DAY AT MARYMOUNT What we do next is to paste the key below the clear text with all spaces removed. ITISAGREATDAYATMARYMOUNT <--------------- Clear Text CRYPTO CRYPTOCRYPTOCRYPT <-------------- Key To encrypt the letter "I" in the message, you would look at row "I" and column "C" - the "C" in CRYPTO since they lined up. The result is "K". Next, we move to the next character, which is a "T" for the row and an column "R". I will let you complete the rest. ITISAGREATDAYATMARYMOUNT <--------------- Clear Text CRYPTO CRYPTOCRYPTOCRYPT <-------------- Key KK <-------------- CIPHERED TEXT Assume you know the length of the key, how would you break this encryption? Think about this question and come up with ideas and we'll use next week discussion to post your findings