Data Security l3
Data Security l3
DATA SECURITY
Encryption
Classical Encryption Techniques
Outline
2
Let us take a closer look at the essential elements of a symmetric encryption scheme, using Figure 2
A source produces a message in plaintext, X = [X1, X2, ..., XM].
The M elements of X are letters in some finite alphabet.
Traditionally, the alphabet usually consisted of the 26 capital letters. Nowadays, the binary alphabet {0, 1} is
typically used.
For encryption, a key of the form K = [K1, K2, ..., KJ] is generated. If the key is generated at the message
source, then it must also be provided to the destination by means of some secure channel. Alternatively, a third
party could generate the key and securely deliver it to both source and destination.
With the message X and the encryption key K as input, the encryption algorithm forms the ciphertext
Y = [Y1, Y2, ..., YN]. We can write this as
Y = E(K, X)
128 2128 = 3.4 x 1038 2127 µ s= 5.4 x 1024 years 5.4 x 1018 years
168 2168 = 3.7 x 1050 2167 µ s= 5.9 x 1036 years 5.9 x 1030 years
26 characters 26!= 4 x 1026 2 x 1026 µ s= 6.4 x 1012 years 6.4 x 106 years
(permutation)
Substitution Techniques
13
Example
plain: meet me after the toga party
cipher: PHHW PH DIWHU WKH WRJD
SDUWB
Note that the alphabet is wrapped
around, so that the letter following Z is
A. We can define the transformation by
listing all possibilities, as follows:
plain: 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
cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
15
ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFP
ESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWY
MXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTM
OHMQ
P 13.33 H 5.83 F 3.33 B 1.67 C 0.00
Z 11.67 D 5.00 W 3.33 G 1.67 K 0.00
M 6.67
Figure 3
17
Polyalphabetic Ciphers
18
Example:
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext:
ZICVTWQNGRZGVTWAVZHCQYGLMGJ
Transposition
21
Techniques
very different kind of mapping is
achieved by performing some sort of
permutation on the plaintext letters
rail fence technique
22