You are on page 1of 27

Chapter 1

Basic to edit Master subtitle style Click Encryption Concepts

4/22/12

Some terminologies
Sender, S usually is referred as Alice. Is a

person who sends a message

Recipient, R usually is referred as Bob. Is

a person who receives a message sent by Alice


Attacker or also called as an

intruder/interceptor

4/22/12

Some terminologies
Encryption: or also called as encoding,

encipherment

Definition: process of scrambling a message so that

its meaning is not obvious/unreadable/cannot be understood

Decryption: also called as decoding,

decipherment.

A reverse process of encryption

A system for encryption and decryption is called a cryptosystem


4/22/12

Some terminologies
Plaintext, p: original form of a message Ciphertext, c: the encrypted form of a

message message

Key: a device to encrypt and decrypt the

In mathematical form, K
Plain text e C = E k(M) y Encrypt Ciphe rtext ion

K e y Decrypt ion

Original plaintext

4/22/12

Some terminologies
Cryptanalysis: by an attacker, trying to find

out the original message by studying the encryption and encrypted messages. called a cryptanalyst

A person who does the cryptanalysis is Tries to break the algorithm

4/22/12

The intruder
Block message: prevent it from reaching R,

affecting availability

Intercept message: read or listen it,

affecting the confidentiality


Modify message: seize or change it in some

way, affecting the integrity


Fabricate an authentic-looking message:

arrange for it to be delivered as is it came from S, affecting the authenticity


4/22/12

Therefore the security objectives


Confidentiality Integrity Authenticity Availability

(CIAA)

4/22/12

Two types of cryptosystem:


Symmetric encryption: Encryption and

decryption are using the same key. It is a mirror-image process.


Eg: Data Encryption Standard (DES),

Advanced Encryption Standard (AES)

Asymmetric encryption: encryption and

decryption are using different keys and process.

Alice encrypts a message using Bobs public

key and Bob decrypt the message using his private key
4/22/12

4/22/12

Two ways of doing encryption algorithm


Substitution: a process of exchanging a

series of bits to another series of bits


Provide diffusion

Permutation: or also called as transposition,

a process of rearranging the order of bits


Provide confusion

Both diffusion and confusion are cryptographic concepts introduced by Shannon.


4/22/12

Confusion
The cipher must show an avalanche effect. The desired effect is called Strict Avalanche

Criterion (SAC)

Definition: if a single bit is complemented in input

bits, it will cause each of the output bit to change with a probability of half (0.5)

Avalanche effect can be achieved using

permutation.

4/22/12

Example of encryption using substitution technique 1) Caesar Cipher


Each letter is translated to the letter a fixed

number of places after it in the alphabet.

Caesar used a shift of 3 Encryption using caesar cipher:

c i= E(pi) = pi + 3
Decryption using caesar cipher:

p i= D(ci) = ci - 3
4/22/12

Caesar Cipher
Full translation chart of caesar cipher:
Plaintext Ciphertext

A B C D E F G H I d e f g h i j k l

K L M N O P Q R S T U V W X Y Z s t u v w x y z a b c

m n o p q r

Eg: using this encryption, the message TREATY IMPOSSIBLE Would be encoded as P: T R E A T Y I M P O S S I B L E c: w u h d w b l p s r v v l e o h 4/22/12

weaknesses of Ceasar cipher


The same letters always translated to the

same another letters plaintext

The ciphertexts retain the space as in the Therefore a cryptanalyst can easily derive a

pattern from ciphertext if the plaintext is in english words

4/22/12

Example of encryption using substitution technique 1) Vernam Cipher


A type of one-time pad (OTP) encryption OTP is considered as a perfect cipher. OTP involves an arbitrary long

nonrepeating sequence of numbers that are combined with the plaintext. nonrepeating key, and this key is not reused. In other words, the key is only used once.
4/22/12

Different message will be using different

Vernam cipher

Eg:
Plaintext V E R N A M C I P H E R 8 15 7 4 17 Numeric equivalent 21 4 17 13 + random number = sum = mod 26 Ciphertext 0 12 2

76 48 16 82 44

3 58 11 60 5 48 88

97 52 33 95 44 15 60 19 75 12 52 105 19 0 7 t a 17 18 15 8 19 23 12 0 1 4/22/12 h r s p i t x m a b

Example of encryption using permutation technique 1) columnar transpositions


Rearrange the characters of the plaintext

into columns

4/22/12

Example of columnar transposition


Plaintext: THIS IS TO SHOW HOW A COLUMNAR TRANSPOSITION WORKS. We arrange the letters in five columns as:
T S O A M R O O K H T W C N A S N S I O H O A N I W x S S O L R S T O x I H W U T P I R x The resulting ciphertext would then be read down the columns as: tsoamrook htwcnasns iohoaniwx xsolrstox ihwutpirx
4/22/12

Good Encryption algorithm


Shannon proposed several characteristics

on a good cipher:

1. The amount of secrecy needed should

determine the amount of labor appropriate for the encryption and decryption
2. The set of eys and the enciphering algorithm

should be free from complexity


3. The implementation of the process should be

as simple as possible
4. Errors in ciphering should not propagate and

cause corruption of further information in the 4/22/12 message

Stream cipher
Caesar and vernam cipher are stream

ciphers

The cipher operates bit by bit More suitable for communication

Find out what are the 4/22/12 disadvantages and advantages of

Block cipher
The cipher operates on a block of bits Harder for a cryptanalyst to break the code. A block cipher encrypts a group of plaintext

symbols as one block. Columnar transposition are examples of block ciphers.

4/22/12

Example of block ciphers


Data Encryption Standard (DES) Two fundamental building blocks of

encryption: substitution and transposition two techniques, one of top of the other, for a total of 16 cycles. The key is 64 bits long purpose chip.
4/22/12

The strength: repeated application of these

Encrypt the plaintext as blocks of 64 bits. Suitable for implementation on a single-

DES

Figure 2-8Cycles of Substitution and Permutation.


4/22/12

Example of block cipher


Advanced Encryption Standard (AES) Invented by two Belgian cryptographers,

Vincent Rijmen and Joan Daemen

Fast algorithm, has strong mathematical

foundation; uses substitution, transposition, and the shift, exclosive OR, and addition operations.

It also repeats cycles, or also called rounds. There are 10,12 or 14 cycles for keys of

128, 192 and 256 bits respectively.


4/22/12

AES
Consists of four steps:
Byte substitution; uses substitution box

structure similar to the DES, substituting each byte of a 128 bit block according to a substitution table

Shift row: a transposition step. Mix column: this step involves shifting left and

exclusive-Oring bits with themselves.

Add subkey: Here, a portion of the key unique

to this cycle is exclusive-Ored with the cycle result.


4/22/12

AES

Figure:AES Algorithm. You may go here http://www.cs.bc.edu/~ straubin/cs381-05/blockciphers/rijndael_ingles2004.swf to experience the simulation of AES 4/22/12

Comparison of DES and AES


Date Block size Key length DES 1976 64 bits 56 bits (effective length) Substitution and permutation Confusion and diffusion Open Closed AES 1999 128 bits 128, 192, 256 (and possibly more) bits Substitution, shift, bit mixing Confusion and diffusion Open 4/22/12 Open

Encryption primitives Cryptographic primitives Design Design

You might also like