You are on page 1of 25

Overview of Cryptographic

Techniques

Vikas Kaul

1
Outline

I. Introduction to Cryptography
II. Conventional Encryption Principles
III. Characteristics of Cryptographic Techniques
IV. Symmetric Encryption
V. Asymmetric Encryption
VI. Classical Encryption Algorithms
VII. Block vs Stream Ciphers
VIII. Results and Conclusion
IX. References

2
I. Introduction to Cryptography
 Plaintext - original message

 Cipher text - coded message

 Cipher -algorithm for transforming plaintext


to cipher text
 Key - info used in cipher known only to
sender/receiver
 Encipher(encrypt) - converting plaintext to
cipher text
 Decipher(decrypt) - recovering cipher text
from plaintext
 Cryptography - study of encryption
principles/methods
 Cryptanalysis (codebreaking) – the study of
principles/ methods of deciphering cipher
text without knowing key
 Cryptology - the field of both cryptography
and cryptanalysis

3
II. Conventional Encryption Principles

An encryption scheme contains five basic


parameters:
 Plaintext
 Encryption algorithm

 Secret Key

 Ciphertext

 Decryption algorithm

4
III.Characteristics of Cryptographic
Techniques
Classified along three independent dimensions:
 The type of operations used for transforming plaintext to
ciphertext
 substitution / transposition / product
 The number of keys used
 symmetric (single key)
 asymmetric (two-keys)
 The way in which the plaintext is processed
 block
 stream

5
IV. Symmetric Encryption

 In classical cryptography,the
same secret key is used for
encryption and decryption.
 sender and recipient share a
common key
 It is for this reason that
classical cryptography is also
referred to as symmetric key
cryptography.
 Also called conventional /
secret-key / single-key.

6
V. Asymmetric Encryption
 The encryption and
decryption keys are
different.
 Also one of the key is placed
in the public domain.
 Called asymmetric key
cryptography, public key
cryptography, etc.
VI.Classical Ciphers

Caesar Cipher
Monoalphabetic Cipher
Playfair Cipher
Polyphabetic Cipher
Vigenère Cipher
Transposition Cipher
Rail Fence Cipher

Cryptography -Part -I 8
Caesar Cipher
 Earliest known substitution cipher by Julius Caesar
 Letters of plaintext are replaced by other letters or by numbers or symbols
 Replaces each letter by 3rd letter after
 Example:
meet me after the toga party
PHHW PH DIWHU WKH WRJD SDUWB
 Mathematically give each letter a number
abcdefghij k l m n o p q r s t 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 have Caesar cipher as:
c = E(p) = (p + k) mod (26)
p = D(c) = (c – k) mod (26)
 Key space: {0, 1, ..., 25}
 Vulnerable to brute-force attacks.

9
Monoalphabetic Cipher
 Rather than just shifting the alphabet
 Could shuffle (jumble) the letters arbitrarily
 Each plaintext letter maps to a different random ciphertext letter
 Hence key is 26 letters long
 Example:
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN

Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA

10
Playfair Cipher
 Not even the large number
of keys in a mono
alphabetic cipher provides
security
 One approach to improving
security was to encrypt
multiple letters
 a 5X5 matrix of letters
based on a keyword
 fill in letters of keyword
(minus duplicates)
 fill rest of matrix with other
letters
 eg. using the keyword
MONARCHY

11
Playfair Cipher
Rules:
• If a pair is a repeated letter, insert filler like 'X’.
• If both letters fall in the same row, replace each with the
letter to its right (circularly).
• If both letters fall in the same column, replace each with the
the letter below it (circularly).
• Otherwise, each letter is replaced by the letter in the same
row but in the column of the other letter of the pair.
Issue:
The cryptanalysis of the Playfair cipher is also aided by the fact
that a digram and its reverse will encrypt in a similar
fashion.That is, if AB encrypts to XY, then BA will encrypt
to YX.
Plaintext:"Hide the gold in the tree stump“

KEY: Group of 2 letters:


HI DE TH EG OL DI NT HE TR EX ES TU MP
Polyalphabetic Ciphers
 In a polyalphabetic cipher the substitution rule changes
continuously from one character position to the next in the
plaintext according to the elements of the encryption key.
 The Vigenere cipher is an example of a polyalphabetic cipher.
 If the encryption key will be shorter than the message to be
encrypted, for the Vigenere cipher the key is repeated.

14
Vigenere Cipher
Polyalphabetic substitution based
on the following tableau
For example, the first letter of the
plaintext, A, is paired with L, the
first letter of the key. So use
row L and column A of the
Vigenère square, namely L.

Plaintext: ATTACKATDAW

Key: LEMONLEMONL

Ciphertext: LXFOPVEFRNH
Hill Cipher
 The Hill cipher is a polygraphic
substitution cipher
 Each letter is represented by a
number modulo 26
 To encrypt a message, each block
of n letters is multiplied by an
invertible n × n matrix,
again modulus26
 To decrypt the message, each block is
multiplied by the inverse of the matrix
used for encryption.
 Unfortunately, the basic Hill cipher is
vulnerable to a known-plaintext attack
because it is completely linear.
Transposition Cipher
 Mapping is performed by some
sort of permutation on the
plaintext letters.
 Also called permutation
ciphers.
 Shuffle the plaintext, without
altering the actual letters used.
 Example: Row Transposition Ciphertext:
Ciphers. ETGTIMDFGXEMHHEMAIRDENOOYTITES
 The cipher can be made more
secure by performing multiple
rounds of such permutations.

17
Rail Fence Cipher
 The message is then read off in
rows. For example, if we have 3
"rails" and a message of 'WE ARE
DISCOVERED. FLEE AT ONCE',
the cipherer writes out.
 The rail fence cipher is not very
strong; the number of practical
keys (the number of rails) is small
enough that a cryptanalyst can try
them all by hand.
Block vs Stream Ciphers
 Block ciphers process messages in blocks,  Stream ciphers process messages a bit or
each of which is then en/decrypted byte at a time when en/decrypting
 like a substitution on very big characters  partition the text into small (e.g. 1
 64-bits or more bit)blocks and let the encoding of each
 Encipher, decipher multiple bits at once block depend on many previous blocks.
  for each block, a different “key” is
Each block enciphered independently
 Problem: identical plaintext blocks produce generated.
identical ciphertext blocks  High speed and low hardware complexity.
 Example: two database records  Usually simple and much faster
 MEMBER: HOLLY INCOME  Examples are FISH,SNOW,RC4 etc
$100,000
 MEMBER: HEIDI INCOME
$100,000
 Encipherment:
 ABCQZRME GHQMRSIB
CTXUVYSS RMGRPFQN
 ABCQZRME ORMPABRZ
CTXUVYSS RMGRPFQN
Examples :DES,RC5,Blowfish,IDEA r.
DES

Data Encryption Standard (DES) encrypts blocks of


size 64 bit.
Most popular block cipher for most of the last 30 years.
Nowadays considered insecure due to the small key
length of 56 bit.
But 3DES yields very secure cipher, still widely used
today.
Replaced by the Advanced Encryption Standard (AES)
in 2000
Overall Structure of DES
 There are 16 identical stages of
processing, termed rounds.
 There is also an initial and
final permutation, termed IP and FP,
which are inverses (IP "undoes" the
action of FP, and vice versa).
 Before the main rounds, the block is
divided into two 32-bit halves and
processed alternately; this criss-crossing
is known as the Feistel scheme.
 The F-function scrambles half a block
together with some of the key.
 The output from the F-function is then
combined with the other half of the
block, and the halves are swapped before
the next round.
The Feistel (F) function
The F-function, depicted in Figure ,
operates on half a block (32 bits) at a time
and consists of four stages:
Expansion: the 32-bit half-block is
expanded to 48 bits using the expansion
permutation, denoted E in the diagram.
Key mixing: the result is combined with
a subkey using an XOR operation. Sixteen
48-bit subkeys—one for each round—are
derived from the main key .
Substitution: after mixing in the
subkey, the block is divided into eight 6-
bit pieces before processing by the S-
boxes, or substitution boxes.
Permutation: finally, the 32 outputs
from the S-boxes are rearranged according
to a fixed permutation, the P-box.
Triple DES (3DES)
 Applies the Data Encryption Standard(DES)
cipher algorithm three times to each data
block.
 Triple DES uses a "key bundle" that
comprises three DES keys, K1, K2 and K3,
each of 56 bits (excluding parity bits).
The encryption algorithm is:
ciphertext = EK3(DK2(EK1(plaintext)))
 DES encrypt with K1, DES decrypt with K2,

then DES encrypt with K3.


 Each triple encryption encrypts one block
of 64 bits of data.
Keying options in 3DES

The standards define three keying options:


Keying option 1: All three keys are independent.
Keying option 2: K1 and K2 are independent, and K3 = K1.
Keying option 3: All three keys are identical, i.e. K1 = K2 = K3.
 Keying option 1 is the strongest, with 3 × 56 = 168
independent key bits.
 Keying option 2 provides less security, with 2 × 56 = 112 key
bits.
 Keying option 3 is equivalent to DES, with only 56 key bits.
THANK YOU

You might also like