Docsity

Understanding Encryption: Cryptosystems, Symmetric & Asymmetric Encryption, Cryptanalysis, Exams of Computer Science

Toggle sidebar
bg1
Electrostatic Modeling of CMOS sensor array 1
1
CS 665:
Computer System Security
Introduction to Encryption
Bojan Cukic
Spring 2005
2
Encryption Basics
Disguising a message content.
Maintaining secure data in an insecure
environment.
Weakest link principle.
Study of the principles of encryption.
Study of how encryption fails.
3
Terminology and Background
Encryption
is a process of encoding a
message so that its meaning is not obvious.
Decryption
is the reverse process.
A system for encryption and decryption is
called a
cryptosystem
.
SR
T
O
S: Sender
R: Receiver
T: Transmission line
O: Observer, Intruder
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Understanding Encryption: Cryptosystems, Symmetric & Asymmetric Encryption, Cryptanalysis and more Exams Computer Science in PDF only on Docsity!

1

CS 665:

Computer System Security

Introduction to Encryption

Bojan Cukic

Spring 2005

2

Encryption Basics

„ Disguising a message content.

„ Maintaining secure data in an insecure

environment.

„ Weakest link principle.

„ Study of the principles of encryption.

„ Study of how encryption fails.

Terminology and Background

„ Encryption is a process of encoding a

message so that its meaning is not obvious.

„ Decryption is the reverse process.

„ A system for encryption and decryption is

called acryptosystem.

S R

T

O

S: Sender R: Receiver T: Transmission line O: Observer, Intruder

4

Background

„ An intruderO can:

„ Block the message =>unavailability

„ Intercept the message =>confidentiality

„ Modify the message => affectsintegrity

„ Fabricate the message => integrity

5

Cryptosystems

„ Keyless cipher

„ Plaintext P=(p 1 ,p 2 ,…,pn ) „ Ciphertext C=(c 1 ,c 2 ,…,c (^) n ) „ C=e(P), P=d(C) „ P=d(e(P))

Plaintext Encryption Ciphertext^ Decryption

Plaintext

Cryptosystems (2)

„ Symmetric cryptosystem. „ Plaintext P=(p 1 ,p 2 ,…,pn ). „ Ciphertext C=(c 1 ,c 2 ,…,c (^) n ). „ C=E(K,P), P=D(K,C). „ P=D(K,E(K,P)). „ E and D are mirror processes.

Plaintext Encryption Ciphertext^ Decryption

Plaintext

K

10

Breakable Encryption (2)

„ Is 10^30 system breakable?

„ Assume that 10^30 options are somehow (intelligent search) reduced to 10^15. „ With 10^10 ciphers checked per second, it takes

less than 30 hours to break the system.

„ Technological advances make infeasible

computations feasible within a decade.

„ Breakability defined bycurrent technology.

11

Cryptography: Simple Methods

„ Monoalphabetic ciphers

„ Substitutions (letter exchanges) „ Transpositions (rearranging the order of letters)

„ Polyalphabetic ciphers

„ Character representations

„ English alphabet: A-Z „ Letters: A B C D E... Y Z „ Numbers: 0 1 2 3 4 24 25 „ A + 3 = D, K – 1 = J, etc. „ Plaintext: upper case, Ciphertext: lowercase

Substitutions

„ Based onMODULAR ARITHMETIC

„ Example: f(x) = (x+N) MOD 26, where „ X is a letter, N is an integer, f(x) is the cipher representing x

„ Caesar cipher

„ c (^) i=E(pi)= pi + „ Example: B I O M E T R I C S e l r p h w u l f v „ Advantages: Easy to perform in the field, easy to remember „ Disadvantage: Obvious pattern.

13

Caesar cipher

„ Example:

„ F(x) = x+

„ Existence of unwanted clues

„ ss->vv „ w, l, and h appear twice

T R E A T Y I MP O S S I B L E

14

Caesar Cipher: Cryptoanalysis

„ wklv phvvdjh lv qrw wrr kdug wr euhdn ????????????????????????????????????? „ Too many obvious clues. „ Short English words, word breaks, blank-to-blank mapping (frequently masked). „ Any permutation is a legal cipher „ Π(α)=25-α, Π(α)=(3*α) mod 26. „ Keywords (for example, SPECTACULAR)

y

Y s pe c t a ul r bdf ghi j k mnoqv wx z

ABCDEF GHI J KL MNOPQRSTUVWX Z

Cryptanalysis of

Monoalphabetic Ciphers

„ Clues:

„ Short words, repeated letters, common initial and final word letters. „ Guess and substitute until you reach a solution or a contradiction.

„ Letter frequency distributions.

„ Language dependent. „ Field (of the message) dependent. „ Age dependent.

19

Polyalphabetic Ciphers

„ Goal: Secure ciphertext should have a flat alphabet distribution. „ Mean: Combine different encoding schemes.

20

Polyalphabetic Ciphers (2)

„ Combination of 2 encryption alphabets

„ Characters in odd positions: Π 1 (α)=(3α) mod 26. „ Characters in even positions: Π 2 (α)=(5α+13) mod 26.

ΠΠ 12 + f umn f d y v t v c z y s h h

1 wuh d w b l p s r v v l e o^ h

TRE A T Y I MP O S S I B L E

Net Effect of Multiple Ciphers

„ From Dickens’, “A tale of two cities”, opening paragraph. „ Π1(α)=α, Π2(α)=25-α.

22

Vigenere Tables

„ Permutations should be complements.

„ Extend the number of permutations.

„ But how to keep track?

23

Vigenere Tables: Example

„ 1 st^ column: Plaintext letter „ 1 st^ row: Key alphabet „ Write alphabet keyword above the plaintext, use it for selecting the permutation.

u v r s g f l c m h t h

T H I S T E X T M U S T

b o j a n b o j a n b o

28

CS 665:

Computer System Security

Polyalphabetic Ciphers (2)

Bojan Cukic

Spring 2005

29

Kasiski Method & IC

„ If a letter group appears in the plaintext

k times, encoded inn different ways.

„ If k>n, it is encoded at least twice the same way! „ The distance between repeated patterns must be a multiple of keyword length.

„ Any repeated pattern of 3 or more

letters is most likely NOT accidental.

IC: Index of Coincidence

„ IC uses statistical observations to determine the number of monoalphabetic ciphers. „ If all letters in the alphabet were equally likely, the distribution would be flat. „ So, a flad distribution is a goal of polyalphabetic ciphers! „ By mixing different monoalphabetic ciphers, the variance from the flat distribution changes!

31

Polyalphabetic Decryption

„ Use Kasiski to predict the number of

alphabets.

„ Compute IC to validate the predictions

by Kasiski

„ You may compute the IC for each individual cipher to confirm results.

„ Decrypt each cipher using frequency

tables, digraphs and trigraphs.

32

Perfect substitution cipher

„ Mix alphabets to form an

unrecognizable distribution.

„ No apparent pattern for the choice for

an alphabet.

„ Vigenere table is rigid. Allows for only 26 different alphabets.

„ Aninfinite nonrepeating sequence of

alphabets confounds the Kasiski method. „ Any repeating sequences are purely accidental.

One time pads

„ A large non-repeating set of keys written on sheets of paper, glued together. „ Need 15 keys 20 characters long keys for 300 characters long message. „ A table used for actual permutations. „ Problems: „ Absolute synchronization between S and R „ Printing, distributing, storing, accounting of such long key sequences.

37

Analysis of transpositions

„ Decide the likely distance. „ Do common digrams appear? „ Record frequency. „ Do most digrams look reasonable? „ Compute variances among recorded digram frequencies.

T T

T H E I E

T T

T H E I E

38

Other transpositions

„ Fractioned Morse

„ English (base-26) transformed to standard Morse (base-2) alphabet. „ Morse (base-2) to Fractioned Morse (base- 3). „ Weaknesses „ common word endings result in relatively frequent patterns. „ Repeated words.

Principles of “Good” Encryption

„ Developed by Shannon in 1949.

„ Needed secrecy determines the amount of labor needed for E and D. „ Key choices and enciphering algorithm should be free of complexity. „ Process implementation as simple as possible. „ Ciphering errors should not propagate. „ Ciphering should not enlarge the text.