Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 22

Goals

• Confidentiality is the concealment of information


or resources.
• Authenticity is the identification and assurance of
the origin of information.
• Integrity refers to the trustworthiness of data
or resources in terms of preventing improper and
unauthorized changes.
• Availability refers to the ability to use the
information or resource desired.
• Non-repudiation is a service which prevents an
entity from denying previous commitments or
actions.
Cryptology
Cryptology is the science and study of
systems for secret communications. It
consists of two complementary fields of
study: Cryptography, the design of secret
communications systems, and
Cryptanalysis, the study of ways to
compromise of secret communications
systems.
Friends and enemies: Alice, Bob, Trudy
• well-known in network security world
• Bob, Alice want to communicate “securely”
• Trudy (intruder) may intercept, delete, add messages

Alice Bob
data, control
channel
messages

data secure secure data


sender receiver

Trudy
Classify Security Attacks as
• Passive attacks - eavesdropping on, or monitoring
of, transmissions to:
– obtain message contents, or
– monitor traffic flows
• Active attacks – modification of data stream to:
– modify messages in transit
– denial of service
Classification of Cryptography
• Number of keys used
– Hash functions: no key
– Secret key cryptography: one key
– Public key cryptography: two keys - public, private
• Type of encryption operations used
– substitution / transposition / product
• Way in which plaintext is processed
– block / stream
Ciphers
• Symmetric cipher: same key used for
encryption and decryption
– Block cipher: encrypts a block of plaintext at a
time (typically 64 or 128 bits)
– Stream cipher: encrypts data one bit or one byte
at a time
• Asymmetric cipher: different keys used for
encryption and decryption
7
Symmetric Cipher Model
Symmetric Encryption
• Mathematically:
C = EK(P ) or C = E(K, P)
P= DK(C ) or P = D(K, C )
• P = plaintext
• C = ciphertext
• K = secret key
• E = encryption algorithm
• D = decryption algorithm
Classical Substitution Ciphers
• where letters of plaintext are replaced by
other letters or by numbers or symbols
• or if plaintext is viewed as a sequence of bits,
then substitution involves replacing plaintext
bit patterns with ciphertext bit patterns
Caesar Cipher
• earliest known substitution cipher
• by Julius Caesar
• mathematically give each letter a number
a bc de f g hi jk l m no p q rst u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

• Then the general Caesar cipher is:


c = EK(p) = (p + k) mod 26

p = DK(c) = (c – k) mod 26
Caesar Cipher
example:
C = E(p) = (p + k) mod (26) = (p + 3) mod (26)
Plain: a b c d e f g h i j k l m no pq r s t u v w x y z

Cipher: D E F G H I J K L M N O P QR STU V W X Y Z A
B C

Plaintext: if we wish to replace letters


Ciphertext: LIZHZOVKWRUHSODFHOHWWHUV
Monoalphabetic Substitution Cipher

Shuffle the letters and map each plaintext letter to


a different random ciphertext letter:

Plain: a b c d e f g h i j k l m n o p qr s t u v w x y z

Cipher: D K V Q FI B JWPE SC X HTMYA UOL R GZ N

Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA

13
Monoalphabetic Cipher Security

• Now we have a total of 26! = 4 x 1026 keys.


• With so many keys, it is secure against brute-
force attacks.
• But not secure against some cryptanalytic
attacks.
• Problem is language characteristics.

14
Kerckhoffs's Principle

 An encryption scheme should be


secure even if enemy knows
everything about it except the key
• Attacker knows all algorithms
• Attacker does not know random numbers

Full name:
Jean-Guillaume-Hubert-Victor-
François-Alexandre-Auguste
Kerckhoffs von Nieuwenhof
slide 15
Cryptanalysis
• Objective: to recover the plaintext of a ciphertext
or, more typically, to recover the secret key.
• Kerkhoff’s principle: the adversary knows all
details about a cryptosystem except the
secret key.
• Two general approaches:
– brute-force attack
– non-brute-force attack (cryptanalytic attack)

16
Cryptanalysis of Caesar Cipher
• only have 25 possible ciphers
– A maps to A,B,..Z
• could simply try each in turn
• a brute force search
• given ciphertext, just try all shifts of letters
• do need to recognize when have plaintext
English Letter Frequencies
Playfair Cipher
• not even the large number of keys in a
monoalphabetic cipher provides security
• one approach to improving security was to
encrypt multiple letters
• the Playfair Cipher is an example
• invented by Charles Wheatstone in 1854, but
named after his friend Baron Playfair
Playfair Key Matrix

• a 5X5 matrix of letters based on a keyword


• fill in letters of keyword (sans duplicates)
• fill rest of matrix with other letters
• eg. using the keyword MONARCHY
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
Encrypting and Decrypting
• plaintext is encrypted two letters at a time
1. if a pair is a repeated letter, insert filler like 'X’ so
that balloon would be treated as ba lx lo on.
2. if both letters fall in the same row, replace each with
letter to right. For example, ar is encrypted as RM.
3. if both letters fall in the same column, replace each
with the letter below it For example, mu is encrypted
as CM.
4. otherwise each letter is replaced by the letter in the
same row and in the column of the other letter of the
pair. Thus, hs becomes BP and ea becomes IM (or JM,
as the encipherer wishes).
Playfair Example
 Message = Move forward
 Plaintext = mo ve fo rw ar dx
 Here x is just a filler, message is padded and segmented
 mo -> ON; ve -> UF; fo -> PH, etc.
 Ciphertext = ON UF PH NZ RM BZ
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z

You might also like