Sei sulla pagina 1di 16

Classic

Cryptosystems Some Historical Data


ELE 438/CSC418
Ancient Egyptians enciphered hieroglyphic
writings about 4000 years ago
About 2000 years ago Julius Caesar used a simple
substitution algorithm

Classic Cryptosystems Vigenre describes his polyalphabetic substitution


cipher in 1585
In 1917 a Scientific American issue characterize
this system as impossible of translation

Classic
Cryptosystems Some Historical Data Classic
Cryptosystems Preview of Homework #2
ELE 438/CSC418
Gilbert Vernan introduces a very simple system ELE 438/CSC418
Part 1: Mexican Army Cipher Wheel
that uses an xor operation in 1918 https://www.youtube.com/watch?v=8gv37aTo9Fs
Joseph Mauborgne extends Vernans algorithm to How can you break it? (Ciphertext only attack)
suggest the perfect cipher: one-time pad

DES is standardized in 1977.


Diffie and Hellman, and Merkle, introduces
public-key cryptography in 1976.
RSA algorithm is published in 1978 (NSA wants
to classify the work)

1
Classic
Cryptosystems Conversion of Data Types Classic
Cryptosystems Shift Ciphers
ELE 438/CSC418 Notation: ELE 438/CSC418
A famous shift cipher
Plaintext lower case
Caesar cipher (invented about 2000 years ago)
CIPHERTEXT capital letters
Conversion
cyclic shift of the 26 letters of the alphabet by 3
Letters to numbers
Omit spaces and punctuation

a b c d e f g h i j k l m
0 1 2 3 4 5 6 7 8 9 10 11 12

n o p q r s t u v w x y z dog GRJ
13 14 15 16 17 18 19 20 21 22 23 24 25

theclassiscancelledbecauseofsnow
Q: Can you formally Define the Shift Cipher?

Classic
Cryptosystems Shift Cipher Formally Defined Classic
Cryptosystems Modulo operation
ELE 438/CSC418 ELE 438/CSC418
The modulo operation finds the remainder after
Notation: division of one number by another (sometimes called
modulus).
plaintext (message): p
Given two positive numbers, a (the dividend) and
ciphertext (coded message): C
n (the divisor), a modulo n (abbreviated as a mod
Ek( ) encryption function using key k n) is the remainder of the Euclidean division of a
Dk( ) decryption function using key k by n.
"5 mod 2" would evaluate to 1 because 5 divided
by 2 leaves a quotient of 2 and a remainder of 1,
Encryption: Ek(p) C p + k (mod 26)
"9 mod 3" would evaluate to 0 because the
Decryption: Dk(C) p C k (mod 26)
division of 9 by 3 has a quotient of 3 and leaves a
Key: k is in {0, 1, 2, , 25} remainder of 0
http://youtu.be/3QnD2c4Xovk?t=2m16s

2
Classic
Cryptosystems Basic Math Classic
Cryptosystems More on Modulo Operation
ELE 438/CSC418 Two integers a and b are said to be congruent modulo n, if ELE 438/CSC418 Formal definition of modulo operation
their difference a b is an integer multiple of n. If this is the
case, it is expressed as:

The above mathematical statement is read: "a is congruent


to b modulo n".
For example,

because 38 14 = 24, which is a multiple of 12.


For positive n and non-negative a and b, congruence of a and b X (mod 26) X floor( X / 26) * 26
can also be thought of as asserting that these two numbers
have the same remainder after dividing by the modulus n.
So, Example: to calculate (-308) mod 26
-308/26 =-11.846
because, when divided by 12, both numbers give 2 as floor(-11.846) = -12
remainder.
The same rule holds for negative values of a: -308 - (-12)*26 = 4

Classic
Cryptosystems Basic Math Classic
Cryptosystems Basic Math
ELE 438/CSC418 ELE 438/CSC418

Please Find inverse of X mod 26


If and , then:

X 1 3 5 7 9 11 15 17 19 21 23 25
X 1 (mod 26) 1 9 21 15 3 19

7 23 11 5 17 25

Why not division?

3
Classic
Cryptosystems Shift Cipher Formally Defined Classic
Cryptosystems Shift Cipher: An example
ELE 438/CSC418 ELE 438/CSC418

Notation:
plaintext (message): p
ciphertext (coded message): C p cryptographyisfun
Ek( ) encryption function using key k
K 11
Dk( ) decryption function using key k
C NCJAVZRCLASJTDQFY
Encryption: Ek(p) C p + k (mod 26) c 2; 2 11(mod 26) 13 N
Decryption: Dk(C) p C k (mod 26)
Key: k is in {0, 1, 2, , 25} r 17; 17 11(mod 26) 2 C
....
N (mod m) = x;
x is between 0 and m-1; and N = m*k + x, where k is an
n 13; 13 11(mod 26) 24 Y
integer
http://www.cs.uri.edu/cryptography/classicalshiftdemo.htm

Classic
Cryptosystems Shift Cipher: Cryptanalysis Classic
Cryptosystems Shift Cipher: Cryptanalysis
ELE 438/CSC418
Can an attacker find the key ? ELE 438/CSC418
Can an attacker find the key ?
Ciphertext only (Lets see the demo again.) Ciphertext only
Known plaintext Exhaustive search, 26 possible keys
Chosen plaintext Known plaintext:
Chosen ciphertext Key = C - p
Chosen plaintext
Choose p = a; K = C
Chosen ciphertext
Choose C = A; K = -p mod 26

4
Classic
Cryptosystems Affine Ciphers Classic
Cryptosystems Affine Ciphers
ELE 438/CSC418
A generalization of the shift ciphers is to use a linear ELE 438/CSC418
Choose : gcd(, 26)=1.
mapping
Example : 13, 4
Encryption: Ek(p) C p + (mod 26) input ERRER
Decryption: Dk(C) p *(C ) (mod 26), alter ERRER
multiplica tion inverse for 13 (mod 26) does not exit.
where * 1 (mod 26)
Key: (, ) Exercise: Cryptoanalysis of Affine Cipher
Example : 9, 2 Ciphertext only
h( 7); 9 7 2 65 13 (mod 26); h N Known plaintext
affine CVVWPM Chosen plaintext
multiplica tion inverse for 9 (mod 26) is 3 Chosen ciphertext
i.e. 9 3 1 (mod 26)
Decryption function is : 3 (13 - 2) 33 7 (mod 26)

Classic
Cryptosystems Basic Math Classic
Cryptosystems Basic Math
ELE 438/CSC418
gcd(x,y) = 1 ELE 438/CSC418

x and y are relatively prime


Please Find *
there does not exist d such that (1) d divide x;
(2) d divide y; (3) d>1 X 1 3 5 7 9 11 15 17 19 21 23 25
e.g. X 1 (mod 26) 1 9 21 15 3 19 7 23 11 5 17 25

gcd(13,26) = 13
gcd(3, 26) = 1
Possible choices for
1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25
More on GCD (or, greatest common factor)
http://www.youtube.com/watch?v=o36mjgTE6kA

5
Classic
Cryptosystems General Substitution Cipher Classic
Cryptosystems Exercise
ELE 438/CSC418 ELE 438/CSC418
Is Brute force attack (or Exhaustive search) a
The key space: all permutations of ={A, B, Z} good idea for
Encryption: give a key Affine Cipher
Each letter x in the plaintext is replaced by (x) General Substitution Cipher
Shift cipher Decryption: given a key How to conduct the known plaintext attack
and affine against
Each letter x in the ciphertext is replaced by -1(x)
cipher are
Affine Cipher
substitution
ciphers General Substitution Cipher

Plaintext: Besides the Brute force attack, how to conduct the


Key: ciphertext only attack against
Affine Cipher
because
General Substitution Cipher
Use one letter to replace another letter

Possible attacks against general


Classic
Cryptosystems Cryptoanalysis of Affine Cipher Classic
Cryptosystems
substitution cipher
ELE 438/CSC418
Ciphertext only: ELE 438/CSC418
Exhaustive search is infeasible
12*26= 312 choices for the key Size of the key space : 26! 4 1026
Frequency analysis
Known plaintext: knowing two letters of Each language has certain features; frequency of
plaintext and corresponding ciphertext may be letters, or of groups of two or more letters
enough. Substitution ciphers preserve the language features
Substitution ciphers are vulnerable to frequency
analysis attacks.
Chosen plaintext and Chosen ciphertext

6
Classic
Cryptosystems Frequencies of Letters in English Classic
Cryptosystems Other Frequency Features of English
ELE 438/CSC418 ELE 438/CSC418
Two-letter combination
TH > HE > IN >ER > ED > AN > ND
Three-letter combination
THE > AND > ING > HER > NTH .
Vowels, which constitute 40% of plaintext are
often separated by consonants.
The letter A is often found in the beginning of a
word or the second from the last. The letter I is
often the third from the end of a word.
The letter Q is followed only by U
And more

Classic
Cryptosystems An Example Classic
Cryptosystems

ELE 438/CSC418
Suppose Eve has intercepted the cryptogram below, ELE 438/CSC418
counts of the letters in the cryptogram show
and it is known to be encrypted using a simple that I is the most common single letter, XL most
substitution cipher: common bigram, and XLI is the most
common trigram.
LIVITCSWPIYVEWHEVSRIQMXLEYVEOIEWHRXEXIPFEMVE e is the most common letter in the English
WHKVSTYLXZIXLIKIIXPIJVSZEYPERRGERIM language, th is the most common bigram,
WQLMGLMXQERIWGPSRIHMXQEREKIETXMJTPRGEVEKEIT
REWHEXXLEXXMZITWAWSQWXSWEXTVEPMRXRSJ
and the is the most common trigram.
GSTVRIEYVIEXCVMUIMWERGMIWXMJMGCSMWXSJOMIQX This strongly suggests that X~t, L~h and I~e.
LIVIQIVIXQSVSTWHKPEGARCSXRWIEVSWIIBXV
IZMXFSJXLIKEGAEWHEPSWYSWIWIEVXLISXLIVXLIRGEPIR The second most common letter in the cryptogram
QIVIIBGIIHMWYPFLEVHEWHYPSRRFQMXLE
PPXLIECCIEVEWGISJKTVWMRLIHYSPHXLIQIMYLXSJXLIM is E; since the first and second most frequent
WRIGXQEROIVFVIZEVAEKPIEWHXEAMWYEPP letters in the English language, e and t are
XLMWYRMWXSGSWRMHIVEXMSWMGSTPHLEVHPFKPEZIN accounted for, Eve guesses that E~a, the third
TCMXIVJSVLMRSCMWMSWVIRCIGXMWYMX
most frequent letter.

7
Classic Classic
Cryptosystems Cryptosystems Using these initial guesses, Eve can spot patterns
that confirm her choices, such as "that".
ELE 438/CSC418
Tentatively making these assumptions, the ELE 438/CSC418
Moreover, other patterns suggest further guesses.
following partial decrypted message is obtained. "Rtate" might be "state", which would mean R~s.
Similarly "atthattMZe" could be guessed as
"atthattime", yielding M~i and Z~m. Furthermore,
heVeTCSWPeYVaWHaVSReQMthaYVaOeaWHRtatePFaMVaWHK
VSTYhtZetheKeetPeJVSZaYPaRRGaReM "heVe" might be "here", giving V~r. Filling in
WQhMGhMtQaReWGPSReHMtQaRaKeaTtMJTPRGaVaKaeTR these guesses, Eve gets:
aWHatthattMZeTWAWSQWtSWatTVaPMRtRSJ
hereTCSWPeYraWHarSseQithaYraOeaWHstatePFairaWHKrSTYhtm
GSTVReaYVeatCVMUeMWaRGMeWtMJMGCSMWtSJOMeQt
etheKeetPeJrSmaYPassGasei
heVeQeVetQSVSTWHKPaGARCStRWeaVSWeeBtV
WQhiGhitQaseWGPSseHitQasaKeaTtiJTPsGaraKaeTsaWHatthattime
eZMtFSJtheKaGAaWHaPSWYSWeWeaVtheStheVtheRGaPeRQe
TWAWSQWtSWatTraPistsSJ
VeeBGeeHMWYPFhaVHaWHYPSRRFQMtha
GSTrseaYreatCriUeiWasGieWtiJiGCSiWtSJOieQthereQeretQSrSTW
PPtheaCCeaVaWGeSJKTVWMRheHYSPHtheQeMYhtSJtheMW
HKPaGAsCStsWearSWeeBtr
ReGtQaROeVFVeZaVAaKPeaWHtaAMWYaPP
emitFSJtheKaGAaWHaPSWYSWeWeartheStherthesGaPesQereeBGe
thMWYRMWtSGSWRMHeVatMSWMGSTPHhaVHPFKPaZeN
eHiWYPFharHaWHYPSssFQitha
TCMteVJSVhMRSCMWMSWVeRCeGtMWYMt
PPtheaCCearaWGeSJKTrWisheHYSPHtheQeiYhtSJtheiWseGtQasOe
rFremarAaKPeaWHtaAiWYaPP
thiWYsiWtSGSWsiHeratiSWiGSTPHharHPFKPameNTCiterJSrhisS
CiWiSWresCeGtiWYit

Classic Classic
Cryptosystems In turn, these guesses suggest still others (for Cryptosystems
At this point, it would be a good idea for Eve to
example, "remarA" could be "remark", insert spaces and punctuation:
ELE 438/CSC418
implying A~k) and so on, and it is relatively ELE 438/CSC418

straightforward to deduce the rest of the letters,


eventually yielding the plaintext. Hereupon Legrand arose, with a grave and stately
air, and brought me the beetle from a glass case in
hereuponlegrandarosewithagraveandstatelyairandbroughtmethe
which it was enclosed. It was a beautiful
beetlefromaglasscasei scarabaeus, and, at that time, unknown to
nwhichitwasencloseditwasabeautifulscarabaeusandatthattim naturalistsof course a great prize in a scientific
eunknowntonaturalistsof point of view. There were two round black spots
courseagreatprizeinascientificpointofviewthereweretworoun near one extremity of the back, and a long one
dblackspotsnearoneextr
emityofthebackandalongoneneartheotherthescaleswereexcee
near the other. The scales were exceedingly hard
dinglyhardandglossywitha and glossy, with all the appearance of burnished
lltheappearanceofburnishedgoldtheweightoftheinsectwasver gold. The weight of the insect was very
yremarkableandtakingall remarkable, and, taking all things into
thingsintoconsiderationicouldhardlyblamejupiterforhisopinio consideration, I could hardly blame Jupiter for his
nrespectingit
opinion respecting it.

8
Classic
Cryptosystems Key Point Classic
Cryptosystems Vigenre Cipher
Key: K= (k1, k2,, km )
ELE 438/CSC418 ELE 438/CSC418
Plaintext block: p = [p1, p2,, pm]
Ciphertext block: C = [c1, c2,, cm]
In substitution ciphers, one plaintext letter is
mapped to one ciphertext letter. This mapping is
one-to-one. This is why the frequency feature is Encryption:
preserved in the ciphertext. C = [c1, c2,, cm] = (p1+k1, p2+k2,, pm+km ) (mod 26)
Decryption:
p = [p1, p2,, pm] = (c1-k1, c2 -k2,, cm-km ) (mod 26)

In order to make it easier, repeat a keyword as many


times as necessary.

Classic
Cryptosystems Vigenre Cipher Classic
Cryptosystems Vigenre Cipher
Example
ELE 438/CSC418
key word: luck
ELE 438/CSC418
Vigenere cipher masks the frequency with which
k1 k2 k3 k4
a character appears in a language: one letter in the
key is a vector: k = (11, 20, 2, 10)
ciphertext corresponds to multiple letters in the
p1 p2 p3 p4 plaintext. Makes the use of frequency analysis
plaintext c r y p t o g r a p h y more difficult.
key 11 20 2 10 11 20 2 10 11 20 2 10 Any message encrypted by a Vigenere cipher is a
collection of as many simple substitution ciphers
ciphertext N L A Z E I I B L J J I
C1 C2 C3 C4 as there are letters in the key.

Encryption: Discussion:
C = [c1, c2,, cm] = (p1+k1, p2+k2,, pm+km ) (mod 26)
How to break a Vigenere Cipher (ciphertext only)?
Decryption:
p = [p1, p2,, pm] = (c1-k1, c2 -k2,, cm-km ) (mod 26) Basic Ideas.

9
Classic
Cryptosystems Vigenre Cipher: Cryptanalysis Classic
Cryptosystems

ELE 438/CSC418
Step 1: Find the length of the key. ELE 438/CSC418

Step 2: Divide the message into many simple


substitution encryptions.
Step 3: Use frequency analysis to solve the
resulting simple substitutions.

plaintext c r y p t o g r a p h y
key 11 20 2 10 11 20 2 10 11 20 2 10
ciphertext N L A Z E I I B L J J I

plaintext c r y p t o g r a p h y
key 11 20 2 10 11 20 2 10 11 20 2 10
ciphertext N L A Z E I I B L J J I

Classic Classic
Cryptosystems Cryptosystems

ELE 438/CSC418 ELE 438/CSC418

10
Classic Classic
Cryptosystems Cryptosystems Lets do it
ELE 438/CSC418 ELE 438/CSC418
I will create a ciphertext using the follow tool

Generate the ciphertext


https://www.cs.uri.edu/cryptography/classicalvigener
edemo.htm
Watch the decryption tool video
https://www.youtube.com/watch?v=P4z3jAOzT9I
Tring to find the key
http://www.brianveitch.com/maze-runner/frequency-
analysis-vigenere/index.html

Second Method
Classic
Cryptosystems
Finding the Key Length
Classic
Cryptosystems Review
ELE 438/CSC418
Write the ciphertext on a long strip of paper, and ELE 438/CSC418
In the previous lecture
again on another long strip. Conversion of data type
Put one strip above the other, but displaced by a Shift cipher
Optional
Text book
certain number. Affine cipher
page 19-23 Mark a * each time a letter above and the one General substitution cipher
below it are the same. Vigenre cipher
(The
optional
V V H Q W V V R H M U S G J G ...
question in
V V H Q W V V R H M U S G J G T H ...
homework)
*

Count the total number of coincidences.


The displacement that is corresponds to the most
coincidence is the best guess for the key length.

11
Classic
Cryptosystems Block Ciphers Classic
Cryptosystems Hill Cipher
ELE 438/CSC418
We have discussed ELE 438/CSC418
Divide the plaintext into blocks. Each block has
Shift cipher m letters.
Substitution Cipher Encrypt m letter of plaintext at each step
Vigenre Cipher The encryption key K is an m by m matrix
(Mexican Army Cipher)
To encrypt multiply the matrix K by a vector
Common properties: of m plaintext letters to receive a vector of m
A given letter in the ciphertext always comes from ciphertext letters. (Arithmetic is modulo the
exactly one letter in the plaintext. size of the alphabet)
This greatly facilitates finding the key through Example, m=3
frequency analysis.
1 2 3
Block Ciphers:
( 0, 1, 2) 4 5 6 (0, 23, 22) (mod 26)
Encrypting several letters in the plaintext together.
11 9 8

Classic
Cryptosystems Matrix Multiplication Classic
Cryptosystems An Example: Encryption
ELE 438/CSC418 ELE 438/CSC418 Plaintext: howareyoutoday (m=2)
(7 14 22 0 17 4 24 14 20 19 14 3 0 24)
Key:
15 12
K
11 3
Encryption

Explained in Plain English


http://www.youtube.com/watch?v=kuixY2bCc_0

Formal Definition
http://mathworld.wolfram.com/MatrixMultiplication.html
Ciphertext: ZWSENIUSPLJVEU
A song for entertainment: (25 22 18 4 13 8 20 18 15 11 9 21 4 20)
http://www.youtube.com/watch?v=BGbiHdKHG7o

12
Classic
Cryptosystems An Example: Encryption Classic
Cryptosystems An Example: Encryption
ELE 438/CSC418 Plaintext: howareyoutoday (m=2) ELE 438/CSC418 Plaintext: howareyoutoday (m=2)
(7 14 22 0 17 4 24 14 20 19 14 3 0 24) (7 14 22 0 17 4 24 14 20 19 14 3 0 24)
Key: Key:
15 12 15 12
K K
11 3 11 3
Encryption Encryption

7 14
15 12
7 14
15 12
7 15 14 11 7 12 14 3 ( 25 22) 7 15 14 11 7 12 14 3 ( 25 22)
11 3 11 3

15 12 15 12
22 0 22 15 0 11 22 12 0 3 (18 4) 22 0 22 15 0 11 22 12 0 3 (18 4)
11 3 11 3
...... ......

Ciphertext: ZWSENIUSPLJVEU Ciphertext: ZWSENIUSPLJVEU


(25 22 18 4 13 8 20 18 15 11 9 21 4 20) (25 22 18 4 13 8 20 18 15 11 9 21 4 20)

Classic
Cryptosystems Hill Cipher Decryption Classic
Cryptosystems Calculate Inverse of a Matrix
ELE 438/CSC418
The decryption key K-1 a m by m matrix, which ELE 438/CSC418
The inverse of a square matrix A, denoted by A-1,
is the inverse of the encryption key (matrix) K. is the matrix so that the product of A and A-1 is
the Identity matrix.
KK 1 I (mod 26) A(A-1) = I or A-1(A) = I

To decrypt multiply the matrix K-1 by the Requirements to have an Inverse


vector of m ciphertext letters to receive the 1. The matrix must be square (same number of rows
vector of m plaintext letters (Arithmetic is and columns).
modulo the size of the alphabet) 2. The determinant of the matrix must not be zero.
A square matrix that has an inverse is called
invertible or non-singular. A matrix that does
not have an inverse is called singular.
A matrix does not have to have an inverse, but if
it does, the inverse is unique.

13
Classic Classic
Cryptosystems Cryptosystems An example: Decryption
ELE 438/CSC418
Finding the Inverse of a 22 Matrix ELE 438/CSC418
Find K-1
1. Switch the elements on the main diagonal 15 12 3 12 3 12
K K 1 (15 3 12 11) 1 (17) 1
2. Take the opposite of the other two elements 11 3 11 15 11 15
3. Multiple all values by the inverse of the 3 14 17 10
23
determinant of the matrix. 15 15 7 7

1
a b d b
( ad bc ) 1 Ciphertext: ZWSENIUSPLJVEU
c d c a (25 22 18 4 13 8 20 18 15 11 9 21 4 20)
In class exercise: To obtain plaintext:
1
7 14 17 10
(mod 26) 25 22 (7 14)
20 19 7 7
19 14 5 10
(9)1 (mod 26) ......
20 7 18 21

Classic
Cryptosystems
Classic
Cryptosystems Known Plaintext Attack
ELE 438/CSC418
To find the inverse and determinant of a matrix ELE 438/CSC418
Plaintext: howareyoutoday
http://www.richland.edu/james/lecture/m116/matrices/ (7 14 22 0 17 4 24 14 20 19 14 3 0 24)
determinant.html
Ciphertext: ZWSENIUSPLJVEU
(25 22 18 14 13 8 20 18 15 11 9 21 4 20)
A Matlab trick
7 14 a b 25 22
>> syms a b c d % define symbolic variables 22 0 c d 18 14 (mod 26)

>> det([a b; c d]) % symbolic calculation: determinant 7 14
Unfortunately, det 4 and (4) mod 26 does not exist.
-1
>> inv([a b; c d]) % symbolic calculation of inverse 22 0
Therefore, the inverse of the first matrix does not exist.
7 14 a b 25 22
>> syms a b c d e f g h i A (mod 26)
20 19 c d 15 11
>> A = [a b c; d e f; g h i];
15 12
>> det(A) Take home exercise, find the key K
11 3

14
Classic
Cryptosystems One-Time Pads Classic
Cryptosystems In-class Exercise
ELE 438/CSC418
Is there an unbreakable cryptosystem? Yes, against ELE 438/CSC418
Given encryption key of Hill Cipher:
ciphertext only attacks.
Representing message as a sequence of 0s and 1s. 15 12
K
Plaintext has n bits 11 3
1011011001
The key K Find the decryption key:
XOR 0 1 0 0 0 1 0 1 0 1
has length n bits
1111001100
is random bit by bit
is used only once 1
a b d b
is known only to Alice and Bob ( ad bc )1
c d c a
Encryption: C = p K (bitwise XOR)
X 1 3 5 7 9 11 15 17 19 21 23 25
Decryption: p = C K (bitwise XOR) X 1 (mod 26) 1 9 21 15 3 19 7 23 11 5 17 25
(0 0=0; 1 0=1; 0 1=1; 1 1=0)

Classic
Cryptosystems In-class Exercise Classic
Cryptosystems Homework #2
ELE 438/CSC418 15 12 3 12 ELE 438/CSC418
Part 1: Mexican Army Cipher Wheel
K K 1 (15 3 12 11) 1

11 3 11 15
https://www.youtube.com/watch?v=8gv37aTo9Fs
3 12
(17) 1 How can you break it? (Ciphertext only attack)
11 15
15 3 12 11 87
87 / 26 3.35 Part 2: Decipher the homework question and
answer the questions
87 ( 4 * 26) 17
3 14 17 10
23
15 15 7 7 Part 3: Perform ciphertext only attack against a
Viginere cipher and find the encryption key.
X 1 3 5 7 9 11 15 17 19 21 23 25
X 1 (mod 26) 1 9 21 15 3 19 7 23 11 5 17 25

15
Classic
Cryptosystems Summary
Conversion: letters numbers
ELE 438/CSC418
Basic Math:
Modulo operation
Multiplicative inverse of mod 26
Shift Cipher: encryption, decryption, key, ciphertext only
attack, known plaintext attack;
Affine Cipher: encryption, decryption, key, ciphertext only
attack, known plaintext attack
General Substitution Cipher: encryption, decryption, key,
ciphertext only attack, known plaintext attack, frequency
analysis
Vigenere Cipher: encryption, decryption, key, ciphertext
only attack (how to find the key length, how to find the
key); understand the meaning of Ai vectors.
Hill Cipher: encryption, decryption, key, known plaintext
attack. (can handle exercises with block size = 2)
One-time pad: features of the key, encryption/decryption,
bitwise XOR operation

16

Potrebbero piacerti anche