Upload
opal-todd
View
212
Download
0
Embed Size (px)
Citation preview
Cryptographya connection between language and mathematics
Introduction• Cryptography: the procedures, processes,
methods, etc., of making and using secret writing, as codes or ciphers▫crypto-: “hidden” or “secret”; -graphy: a process or
form of drawing, writing, representing, recording, describing
• Cryptanalysis: the procedures, processes, methods, etc., used to translate or interpret secret writings, as codes and ciphers, for which the key is unknown
• Cryptology: the science that includes cryptography and cryptanalysis
Brief History• First hint of cryptography
▫ Egyptian (1900 B.C.) funeral incriptions• Julius Caesar (100-44 B.C.)
▫ First military use of code? or was it the Greeks with the skytale.• Francois Viete (1540-1603)
▫ Deciphered Spanish Code of more than 400 characters• Mary, Queen of Scots (beheaded in 1587)
▫ Plotted to overthrow Queen Elizabeth I• John Wallis (1616-1703)
▫ Deciphered code during English Civil War• World War I
▫ British cryptologists deciphered the Zimmermann Telegram in 1917• World War II
▫ Cryptanalysis allows numerically inferior Amercian navy to defeat the Japanese at the Battle of the Ccoral Sea and in the Battle of Midway Island
Side Note on Literature
•Sir Arthur Conan Doyle – Sherlock Holmes▫“The Adventure of the Gloria Scott
Null Cipher▫“The Adventure of the Dancing Men”
Substitution Cipher•Edgar Allen Poe
▫“The Gold Bug” Substitution Cipher
Some vocabulary• Enciphering: the process of encoding a
message• Deciphering: the process of decoding a
message• Literal plain text: original message• Numerical plain text: numerical equivalent
of the literal plaintext• Literal cipher text: encoded message in
literal form• Numerical plain text: encoded message in
numerical form
A word about steganography…• The practice of hiding messages, so that the
presence of the message itself is hidden, often by writing them in places where they may not be found.
• stegano-: “covered” or “protected”• Examples:
▫Histaiaeus, a Greek general, would tattoo his servants’ shaved heads
▫Romans would sew a message in the sole of a sandal
▫Null Cipher ▫Cardano Grille
Two basic transformations
•Transposition: letters of the plain text are jumbled or disarranged ▫Generally considered harder to break
For example, take the phrase “Math history is super fun” which has 21 letters. That means there are 21! ways to rearrange the letters.
•Substitution: letters of the plain text are substituted by other letters, numbers, or symbols.▫Generally considered easier to use
Transpostition
•Examples:▫Greek Skytale▫Rail Fence Cipher▫Route Transposition Cipher
Code or cipher?
•In general, “code” is distinguished from “cipher”▫A code consists of thousands of words,
phrases, letters, and syllables with codewords or codenumbers that replace plain text.
▫A cipher uses the basic unit length of one letter, sometimes a letter pair, but rarely larger groups of letters.
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
00
o1
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Transition to Math...
•Caeser Cipher▫Shifting the alphabet 3 places
•Rot-n Cipher▫“rot” for “rotation” ▫Let p (plaintext) be a unit of numerical
plain text
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
X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
)26(mod)( nppE
Linear Cipher• Let p be a two digit unit of numerical plain text, we
can encipher using the key:
• The inverse transform of E(p) is the decryption key, where c is a two digit unit of numerical cipher text:
• Since there are 12 possible values of d and 26 possible values of e, there is 12*26=312 possible decryption keys
25)(0and,250,1)26,(,251 where
)26(mod)(
pEbaa
bappE
250and,1)26,(,251 where
)26(mod)(
edd
edccD
A word about Cryptanalysis…• Exhaustive cryptanalysis: trying all possible
decryption keys until the right one is found.▫Consider a character cipher consisting of a
permutation of the alphabet. There would be 26! possible decryption keys.
• Frequency analysis: comparing the frequency of characters in a cipher to the relative frequency of letters used in the English language.▫Letters of the English language in order of relative
frequency:E T A O I N S R H D L C U M F P G W Y B V K X J Q Z
Block or Matrix Ciphers• A diagraph, or two character block cipher, might be
encoded using the following encryption key:
• Designate M as the encryption matrix, then we need M-1 (mod 26) for decryption:
)26(mod75
43
)26(mod75and)26(mod43where
)(
2
1
2
1
212211
2121
P
P
C
C
PPCPPC
CCPPE
)26(mod321
227
35
471
M
One-time Pad and Polyalphabetic Cipher•One time pad:
•Polyalphabetic Cipher:
)26(mod
,,,,;,,,, 321321
iii
nn
KPC
KKKKKPPPPP
)(mod where)26(mod with replaced be it will
message theofletter th theis if ;,,,, 321
kijKpc
ickkkkk
j
m
Public-Key Encryption▫Allows the encryption key to be public.▫Relies on the computational infeasibility of
factoring large numbers, which keeps the decryption key secret.
• Let n=pq, where p and q are prime numbers. Let j be an integer such that 2<j<(p-1)(q-1) and (j, (p-1)(q-1))=1.
• Encryption key:• Let k be the multiplicative inverse of j (mod (p-
1)(q-1)), that is • Decryption key:
)(mod)( nPPEC j
))1)(1((mod1 qpjk
)(mod)( nCCDP k
THE END!
•Any questions?