Encryption
1/8
1/17
This material was developed with funding from the
National Science Foundation under Grant # DUE 1601612
Back
Next
Restart
ZBIR GUR ZRA GUVF RIRAVAT GB GUR EUVAR EVIRE JURER JR JVYY OHVYQ N OEVQTR NAQ PEBFF VG
Cipher Text
message in indecipherable form after it is encrypted
Close
Plain Text
message in a readable form before it is encrypted or decrypted
2/17
You receive a secret message from the military general, Julius Caesar, who is commanding you to do something but the message is indecipherable to you. You know the message must be important, but you don’t have a way of understanding what is written. You recall that Caesar had mentioned to you that he was going to send you private or secret information securely via an encrypted message in which he used a key to transform the plain text of the message into cipher text. But what key might he have used to encrypt this secret message?
Indecipherable
not able to be read
Encrypted
concealed information converted into code
2
Caesar had recently developed a system of encrypting his messages by using the letters in a given alphabet and choosing a key number by which to shift the letters. So if you take English, the alphabet consists of 26 letters beginning with the letter “A” and ending with the letter “Z”. Caesar would choose a key number, such as 2. Caesar would then use this number to shift the letters in the plain text message to letters 2 characters to the RIGHT to create the cipher text. So for example, if Caesar had a plain text message that says “WE ATTACK AT DAWN”, and he chose the key to be the number 2. The cipher text of the encrypted message would read “YG CVVCEM CV FCYP”.
3/17
Symmetric
one key is used to both encrypt and decrypt information
This is the first known encryption to be used, and today it is called the Caesar cipher because it was first used by Julius Caeser to send secret, indecipherable messages. This type of encryption requires that the value of the key be shared knowledge by the two individuals who are communicating via encrypted messages. When a single shared key is used to both encrypt and decrypt messages, this is referred to a symmetric key encryption. The key has to be agreed upon in private in advance and therefore keeping the key secret is of inestimable importance.
4/17
Frequency Analysis
examination of letters or patterns contained in cipher text in an attempt to reveal information about the plain text
11
101
0011
1010011
Cracked
when encryption keys are revealed through a systematic brute force trial of every possible combination
But what if you don’t have, or don’t remember the key? There is a weakness of the Caesar cipher however, and it was cracked due to information leak. Even without acquiring the key, the letters in the cipher text might offer insight into the plain text letters. This information leak can be exploited by using frequency analysis.
6/17
L
T
R
V
R
E
A
N
I
M
P
S
O
D
F
H
G
S
C
Frequency analysis is based on the fact that, in any given written language, certain letters and combinations of letters occur with varying frequencies, and that there is a distribution of letters that is roughly the same for almost all samples of that language. For instance, in English, E, is the most common letter, and T, A and O are also very common letters, while Z, Q and X are rare. Likewise, TH, ER, ON, and AN are the most common pairs of letters, and SS, EE, TT, and FF are the most common repeating pairs. Thus, the Caesar cipher can be easily cracked by using frequency analysis.
7/17
U
?
K
Z
Q
G
Y
E
I
L
7
Now that we know that without the key, we can use frequency analysis to crack Caeser’s message, let’s do just that. Let’s take a look at the encrypted message and see if we can decrypt it using only frequency analysis. We can start by looking at our message and examining the frequency of certain characters. Let’s look at the letter “R”. There seems to be a lot of them, and In fact, there are 12 of them! Recall that the most common letter in the English alphabet is the letter “E”. So it is likely that the “R” in the encrypted text represents the letter E. Based on this assumption, we can determine that the key is likely 13 since “E” is 13 positions to the LEFT of “R”. Using the key of 13, decrypt the encrypted message Caesar sent.
19
3
15
11
23
0
8/17
+
8
20
4
16
12
24
–
9
5
17
1
13
25
ZBIR GUR ZRA GUVF RIRAVAT GB
GUR EUVAR EVIRE JURER JR JVYY
OHVYQ N OEVQTR NAQ PEBFF VG
21
10
6
18
14
22
Element
with Audio
HTML
10/17
256 bit encryption
256-bit key used to encrypt and decrypt data in most modern encryption algorithms
Standard Key Length
The key length, which is typically specified as a logarithm in form of bits, is an encryption security standard that varies by the protocol and the algorithm used.
The principles upon which the Caesar cipher was created a true today however. In our modern world we need to transmit private or secret information securely using encryption. Today we use 256 bit encryption which is said to be “too hard” to crack. In this case “too hard” means it is not possible given a reasonable amount of time. In the not so distant past we used 128 bit encryption, but as computer chips have gotten twice as fast each year, we had to increase the standard key length. This doesn’t make encryption much harder, but it makes it exponentially more difficult to crack a cipher due to the significantly increased number of guesses it would require. But what still remains is the problem of sharing a secret key and keeping it safe from others.
Output
Hash Function
Today, using much the same technique as Caesar used, the letters in the English language as divided into ASCII text and are encrypted using asymmetric encryption, which uses two keys: a public key known to everyone and a private key known only to those encrypting and decrypting the message. A public key is shared with everyone so that anyone can use it to encrypt a message. A private key can only be decrypted by a computer with access to that private key. This principles behind how this works requires the use of a one way function which is easy to compute in one direction but hard to reverse without the private key. This one way function is used with a significantly large numbers making the time needed to reverse the one way function sufficiently long to render decryption by trying every possible combination “too hard”.
Asymmetric
encryption that relies on a public key to encrypt and the paired private key to decrypt.
11/17
Input
One Way Function
any mathematical function that is hard to invert. For example, the multiplication of two large prime numbers is a one-way function because it is easy to compute but hard to invert, as the inverse involves factoring.
credit: computersciencewiki.org
Private Key
a key that is kept secret that can be used to decrypt data encrypted using its paired public key
Public Key
a shared key used to encrypt data that is available to anyone to use.
12/17
A way in which to think about this may be to consider how mobile payment services work. Mobile payment services allows anyone to deposit money for you but they need a public key, like your mobile payment service name, to do so. You can distribute the deposit public key widely to anyone you think might need it. Anyone with this public key can now deposit funds into your personal mobile payment account for you. However, only you have the private key, which must be used to remove the funds from the mobile payment service. If each of us has a mobile payment service with public keys, we can each send each other funds, which can only be received with the associated private key.
13/17
Public key cryptography is the foundation of encryption of all traffic on the lnternet. The security protocols SSL (Secure Socket Layer) and TLS (Transport Layer Security) are used to protect you when you are browsing the web. Within your browser you can determine if the website is using one of these protocols by looking for the padlock icon or the letters “https” in the address bar at the top of your browser. You can also use the information within your browser to know what key length and what encryption standard is being used by the website.
Transport Layer Security (TLS)
a cryptographic protocol designed to provide security over a network end to end.
Secure Socket Layer (SSL)
a cryptographic protocol designed to provide security over a network end to end.
Details
No
Certificate (Valid)
15/17
Using what you have learned, determine whether the website is using encryption, and if encryption is being used, determine what key length and encryption standard is being used.
Does this site use encryption?
Yes
Now that we have seen the Caesar cipher used to encrypt a message let’s look at how that same key of 2 is used to decrypt a message. Caesar’s confidant would use this key to shift the letters in the cipher text message to letters 2 characters to the LEFT to create the plain text. So for example if Caesar’s confidant has the cipher text “YG CVVCEM CV FCYP” and he can use the key of 2 to decrypt the message to plain text that reads “WE ATTACK AT DAWN”.
5/17
Great Job!
NY NX SJAJW YTT QFYJ YT GJ
BMFY DTZ RNLMY MFAJ GJJS
VXFFHVV LV QRW ILQDO DQG
IDLOXUH LV QRW IDWDO
WSQIXMQIW CSY AMPP RIZIV ORSA
XLI ZEPYI SJ E QSQIRX
YRXMP MX FIGSQIW E QIQSVC
HDFK SHUVRQ PXVW
OLYH WKHLU OLIH
DV D PRGHO IRU RWKHUV
PM P JHUUVA KV NYLHA AOPUNZ
P JHU KV ZTHSS AOPUNZ
PU H NYLHA DHF
GIZ GY OL CNGZ EUA JU SGQKY
G JOLLKXKTIK
CF UIF DIBOHF UIBU ZPV
XJTI UP TFF JO UIF XPSME
AQW OWUV FQ VJG VJKPIU
AQW VJKPM AQW ECPPQV FQ
9/17
GWC IZM VMDMZ BWW WTL
BW AMB IVWBPMZ OWIT WZ BW
LZMIU I VME LZMIU
Now you try.
Encryption is useful in today’s global online environment. This means that what was once primarily a military and often wartime technology, has become democratized for the use of us all to protecting information shared over networks that were designed to move data quickly, without regard to security.
17/17
14/17
16/17