Sie sind auf Seite 1von 30

Chapter 2 Classical Encryption Techniques

Basic Concepts Models of Encryption and Decryption Classical Encryption Methods Substitution Techniques Transposition Techniques

Information Security

Chapter 2 Classical Encryption Methods

Basic Concepts
plaintext: the original clear message ciphertext: the transformed message cipher: an algorithm for transforming or encrypting or ciphering a clear message into ciphertext with which any unauthorized party cannot find the plaintext. key: a data unit used for encryption or decryption.

Information Security

Chapter 2 Classical Encryption Methods

Basic Concepts
encipher/encrypt: the process of converting plaintext to ciphertext using a cipher and a key. decipher/decrypt: the process of converting ciphertext back into plaintext using a cipher and a key.

Information Security

Chapter 2 Classical Encryption Methods

Basic Concepts
cryptography: the science/maths of transforming a plaintext into a ciphertext and then transforming the ciphertext back into the plaintext. cryptographic systems are characterized as: The type of operations used for transforming plain text to ciphertext. The number of keys used. The way in which the plaintext is processed.

Information Security

Chapter 2 Classical Encryption Methods

Basic Concepts
cryptanalysis: the study of transforming a ciphertext back into the original plaintext without knowledge of the key. There are two general approaches to attack a conventional scheme: Cryptanalysis Brute-force attack cryptology: both cryptography and cryptanalysis.

Information Security

Chapter 2 Classical Encryption Methods

Models of Encryption and Decryption


Encryption: a process of encoding a message so that its meaning is not obvious. Decryption: the reverse process: transforming an encrypted message back into its normal form. Symmetric key encryption: Encryption key and decryption key are the same. Asymmetric key encryption: Encryption key and decryption key are different.

Information Security

Chapter 2 Classical Encryption Methods

Models of Encryption and Decryption


Symmetric

Asymmetric

public/encryption key of Recipient

secret key/decryption key of Recipient

e.g. RSA

Information Security

Chapter 2 Classical Encryption Methods

Security of An Encryption Scheme


Unconditionally Secure: the ciphertext generated by the scheme does not contain enough information to determine the plaintext no matter how much ciphertext is available. Computationally Secure: if the two criteria are met: the cost of breaking the cipher exceeds the value of the encrypted information. the time required to break the cipher exceeds the useful lifetime of the information.

Information Security

Chapter 2 Classical Encryption Methods

Notation

Encryption: C = E(P) or C = Ekey(P) Decryption: P = D(C) = D(E(P)) or P = Dkey(C)


Symmetric cryptosystem: C=Ekey(P), P=Dkey(C) Asymmetric cryptosystem: C=EEncryptionKey(P), P=DDecryptionKey(C)

Information Security

Chapter 2 Classical Encryption Methods

Mechanism to Make a Cipher


Two basic building blocks of all conventional encryption techniques: Substitution and Transposition (permutation)

Substitution: the letters of plaintext are replaced by other letters or numbers of symbols Transposition: the letters of plaintext are reordered
Information Security Chapter 2 Classical Encryption Methods

10

Caesar Cipher
Substitution: a letter is replaced by another letter or symbol Example: Move each letter of the alphabet to the letter three to the right in the predetermined order of the letters of the alphabet. A D, B E, C F, Caesar cipher moves the ith letter of an alphabet to the i+kth letter. a=0, b=1, c=2,...,Pi=i,...
Encryption C= E(Pi) = i+ k(mod 26) Decryption Pi = D(C)= C-k (mod 26)

Example:

IFMMP = E(HELLO) with k=1

Information Security

Chapter 2 Classical Encryption Methods

11

Cryptanalysis of Caesar Cipher


The encryption/decryption algorithms are known There are only 25 possible keys (1,...,25), so it is easy to break by Brute force cryptoanalysis. The language of the plaintext is known and easily recognizable Can we make it harder?
include all ASCII codes - 255 keys Zip the file and then encrypt it - ciphertext becomes unreadable.

Information Security

Chapter 2 Classical Encryption Methods

12

Cryptanalysis of Caesar Cipher Cryptanalysis by letter frequency distributions.


If encipherment is achieved by a simple letter shift then a frequency count of the letter distributions in the ciphertext will yield the same pattern as the original host language of the plaintext but shifted.

Information Security

Chapter 2 Classical Encryption Methods

13

English Letter Frequency Distribution

Information Security

Chapter 2 Classical Encryption Methods

14

Monoalphabetic Cipher with a Key A better cipher: increase the key space, allow an arbitrary substitution Let KEY be the key
ABCDEFGHIJKLMNOPQRSTUVWXYZ KEYABCDFGHIJLMNOPQRSTUVWXZ

Example
HELLO
Information Security

FBJJN

Chapter 2 Classical Encryption Methods

15

General Monoalphabetic Cipher


Better substitution Method: Select a secret word/key (avoid repeating words)
Example: Choose secret words `star wars'. `star wars' has the letters a, r and s repeated, so we use only the letters s, t, a, r, w. Write alphabets into a rectangle, e.g. STARW BCDEF GHIJK LMNOP QUVXY Z
Information Security Chapter 2 Classical Encryption Methods

16

General Monoalphabetic Cipher The substitution table


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 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 S B G L Q Z T C H M U A D I N V R E J O X W F K P Y

Example
I KNOW ONLY THAT I KNOW NOTHING H UINF NIAP OCSO H UINF INOCHIT

Information Security

Chapter 2 Classical Encryption Methods

17

General Monoalphabetic Cipher Monoalphabetic ciphers are easy to break because they reflect the frequency data of the original alphabet A countermeasure is to provide multiple substitutes, known as homophones, for a single letter. e.g: letter e be assigned different cipher symbols such as: 16,74,35 and 21, with each homophone used in rotation
Information Security Chapter 2 Classical Encryption Methods

18

Playfair: A Multiple Letter Encryption Cipher


The best-known multiple-letter cipher. The algorithm is based on the use of a 55 matrix of letters constructed using a key word.
M C E L U O H F P V N Y G Q W A B
I/J

S X

R D K T Z

Information Security

Chapter 2 Classical Encryption Methods

19

Playfair Cipher
The plaintext is encrypted a pair at a time, left over one needs to be paired by a filler letter. Repeating letters of the same pair are separated with a filler letter. Letters of a pair that fall in the same row are each replaced by the letter to the right. The row is circular with the 1st letter following the last one. Letters of a pair that fall in the same column are each replaced by the letter beneath. The column is circular with the 1st letter following the last one. Otherwise, each plaintext letter is replaced by the letter that lies in its own row and the column occupied by the other plaintext letter.
Information Security Chapter 2 Classical Encryption Methods

20

Playfair Cipher
An example: Whats the cipher text for encrypting Playfair Cipher by Playfair Cipher? Pair combination: pl ay fa ir ci ph er no filler letter needed.

Information Security

Chapter 2 Classical Encryption Methods

21

Hill Cipher: Another Multiletter Cipher


The plaintext is encrypted every m successive letters at a time for m ciphertext letters. The substitution is determined by m linear equations with each letter is assigned a numerical value (a=0, b=1, z=25). For m=3, the system is as follows: c1 = (k11p1 + k12p2 + k13p3) mod 26 c2 = (k21p1 + k22p2 + k23p3) mod 26 c3 = (k31p1 + k32p2 + k33p3) mod 26

Information Security

Chapter 2 Classical Encryption Methods

22

Hill Cipher
this can be expressed in terms of column vector and matrices: c1 k11 k12 k13 p1 c2 = k21 k22 k23 p2 mod 26 c3 k31 k32 k33 p3 or C=KP mod 26

Information Security

Chapter 2 Classical Encryption Methods

23

Polyalphabetic Substitution Cipher


Monoalphabetic substitution ciphers hide the distribution via the use of homomorphisms. Cryptanalysis: frequency distribution. Polyalphabetic substitution ciphers hide it by making multiple substitutions, using many alphabets. It has a flatter frequency distribution.
A set of substitution rules A key determines which rule to choose

Information Security

Chapter 2 Classical Encryption Methods

24

Polyalphabetic Cipher - Vigenre Cipher


Select a key from 26 letters Create a substitution table Example
Encryption: deceptivedeceptivedeceptive Key: Plaintext: wearediscoveredsaveyourself Ciphertext: zicvtwqngrzgvtwavzhcqyglmgj d+w=z mod26, e+e=i mod26, ... Decryption: w=z-d mod26, e=i-e mod26, ...
Information Security Chapter 2 Classical Encryption Methods

25

Transposition Techniques Transposition


plaintext permutation cipertext The simplest one: plaintext is written as a sequence of diagonals and then read off as a sequence of rows e.g: meet me after the toga party is written as: m e m a t r h t g p r y e t e f e t e o a a t the encrypted message is: mematrhtgpryetefeteoaat
Information Security Chapter 2 Classical Encryption Methods

26

Transposition Techniques
More complex one: write the message in a rectangle, row by row, read off column by column but permute the order of the columns Example: plaintext:
2 C U S R 4 O T E I 1 M E C T 3 P R U Y

encryption

decryption

2 M E C T

4 C U S R

1 P R U Y

3 O T E I

key ciphertext

COMPUTERSECURITY MECTCUSRPRUYOTEI Note: If the message length is not a multiple of a row, the last column is not full. Some infrequent letter(s) should be filled.
Information Security Chapter 2 Classical Encryption Methods

27

One-Time Pad
An encryption scheme (by Joseph Mauborgne,AT&T). What is one-time pad? A large non-repeating set of truly random key letters as long as the message, written on sheets of paper, and glued together in a pad. Encryption: Ciphertext_letter = (Plaintext_letter + Key_letter) mod 26 Ciphertext_bit = Plaintext_bit Key_bit Decryption: Plaintext_letter = ( Ciphertext_letter - Key_letter) mod 26 Plaintext_bit = Ciphertext_bit Key_bit
Information Security Chapter 2 Classical Encryption Methods

28

One-Time Pad

n o f

+
t b

t b f

on

Message : Key on pad: Ciphertext: O + T N + B E + F


Information Security

ONETIMEPAD TBFRGFARFM HOJNOREGFP

mod 26 = H mod 26 = O mod 26 = J ...


29

Chapter 2 Classical Encryption Methods

One-Time Pad
Each letter is used exactly once, for only one message. The sender encrypts the message and then destroys the used pages of the pad or used section of the tape. The receiver has an identical pad and uses the key on the pad. The receiver destroys the same pad pages or tape section after decrypting the message. A given ciphertext message is equally likely to correspond to any possible plaintext message of equal size. Since every key sequence is equally likely, an opponent has no information with which to cryptanalyse the ciphertext.
Information Security Chapter 2 Classical Encryption Methods

30

Das könnte Ihnen auch gefallen