0% found this document useful (0 votes)
18 views30 pages

435 Ciphers

Uploaded by

mislam.zidan05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views30 pages

435 Ciphers

Uploaded by

mislam.zidan05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Ciphers/Cryptography Algorithms

Contents
1. Cipher/Cryptographic Algorithms
2. Types of Ciphers
3. Types of Classical Ciphers
4. Types of Modern Ciphers
5. Block Ciphers
6. Stream Ciphers
7. Some commonly used Algorithms
8. Key size and Speeds of Algorithms
9. DES
10. AES
Cryptographic Algorithms:
A Cryptographic algorithm or Ciphers is a set of well-defined but complex
mathematical instructions used to encrypt or decrypt data. The encryption and
decryption processes depend on a crypto-graphic key selected by the entities
participating in the encryption and decryption process.
Types of Ciphers:
Ciphers

Classical Modern

Substitution Cipher Transposition Ciphers


1.Caesar Cipher
2. Monoalphabetic Cipher
3. Polyalphabetic Cipher
4. Playfair Cipher
Symmetric Key Asymmetric Key
5. Hill Cipher

Block Ciphers Stream Ciphers


Types of Classical Ciphers/Encryption
Techniques:
Classical ciphers are the most basic type of ciphers which operate on alphabets (A-
Z). Implementation of these ciphers is generally either by hand or with simple
mechanical devices. Because these ciphers are easily deciphered, they are
generally unreliable.

Types of Classical Ciphers:


1. Substitution Cipher/Techniques
2 . Transposition Cipher/Techniques
Substitution Cipher:
The user replaces units of plaintext with cipher text, according to a regular system.
Units may be single letters, pairs of letters or combinations of them and so forth.
The recipient performs inverse substitution to decipher the text.

For Example: “HELLO WORLD” can be encrypted as “PSTER HGFST”

Type of Substitution Cipher


1.Caesar Cipher
2. Monoalphabetic Cipher
3. Polyalphabetic Cipher
4. Playfair Cipher
Caesar Cipher:

The Caesar cipher is one of the earliest known and simplest ciphers. It is a type of substitution
cipher in which each letter in the plaintext is 'shifted' a certain number of places down the
alphabet.

Rule-1
Example:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Plain Text: CUB
Cipher Text: FXE
Here Key is: 3
Rule-2
A=1 B=2 C=3 D=4 E=5 F=6 G=7 H=8 I=9 J=10 K=11 L=12 M=13 N=14 0=15 P=16
Q=17 R=18 S=19 T=20 U=21 V=22 W=23 X=24 Y=25 Z=26
Here Key (K) =4
Key- Numerical (K)
C=(P+K) mod26
Here, C = Cipher Text, P= Plain Text, K = Value of key
Example
1. Plain text = HELLO
Key = 4
C(H) = (P+K) mod26 C(L) = (P+K) mod26 C(O) = (P+K) mod26
=(8+4) mod 26 =(12+4) mod 26 =(15+4) mod26
= 12 mod26 = 16 mod26 =19 mod26
=12 =16 =19
=L =P =S

C(E) = (P+K) mod26 C(L) = (P+K) mod26


=(5+4) mod 26 =(12+4) mod 26
= 9 mod26 = 16 mod26
=9 =16
=I =P
PT= HELLO and CT=LIPPS
Rule-3
Plain Text = ZOO
Key = 4

C(Z) = (P+K) mod26 C(O) = (P+K) mod26


=(26+4) mod26 =(15+4) mod26
=30 mod26 =19 mod26
=4 = 19
=D =S

C(O) = (P+K) mod26 Plain Text = ZOO


=(15+4) mod26 Cipher Text = DSS
=19 mod26
= 19
=S
Monoalphabetic Cipher:
Example-1
 A Monoalphabetic substitution cipher, relies on a fixed replacement structure. The substitution
is fixed for each letter of the alphabet. If “a” is encrypted to “r” then every time we see the
letter “a” in the plain text, we replace it with the letter “r” in the cipher text.
Plaintext: bac
Ciphertext: brc
Example-2
 Use the letter randomly or anyone for the cipher text.
Plain text: BAD
Letter :ABCDEFGHIJKLM
Cipher text: B D F G H K M O P R T W
Plain text : BAD
Cipher text: DBG
Monoalphabetic Cipher:
Example-3

 Starting with a key and then follow the remaining alphabets.


Plain text: CUB
Keys: KEYWORD
Letters: 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: K E Y W O R D A B C F G H I J L M N P Q R S T U V X
Plain text : CUB
Cipher text: YRE
Polyalphabetic Cipher:
 Polyalphabetic cipher is a substitution cipher in which the cipher alphabet for
the plain alphabet may be different at different places during encryption process.
Example
Plain text: DAD
Secret: 5 4 3 2 1
1. A B C D E
2. B C D E F
3. C D E F G
4. D E F G H
5. E F G H I
Plain Text : DAD Cipher text: HDF
Playfair cipher:
The Playfair cipher is a digraph substitution cipher. It employs a table where one
letter of the alphabet is omitted and the letters are arranged in a 5 5 grid. Typically
the “J” is removed from the alphabet and “I” takes its place in the text that is to be
encoded.
Algorithms:
1. 5 5 matrix table is used
2. Need a key with alphabetic letters
3. Enter characters of keyword in matrix row wise from left to right
4. The letter “I” and “J” count as one letter
5. First fill the matrix table with a key
6. Fill remaining space in matrix with rest of English alphabets
7. repetition letter never use in second time
Example
Key- PLAYFAIR P L A Y F
I/J R B C D
Plain Text-Name E G H K M
ABCDEFGHIJKLMNOPQRSTUVWXYZ N O Q S T
U V W X Z
Encryption Process:

1. Broke the plain text in group of two alphabets. P L A Y F


I/J R B C D
Example: NAME- NA ME E G H K M
N O Q S T
2. If both alphabets are same(or only one is left) add an X after first alphabet.
U V W X Z

Example: ALICE- AL IC EX
HELLO- HE LL O- HE LX LO
3. If both alphabets in the pair appear in the same row of matrix, replace them with alphabets to
their immediate right resp
Example: LY-AF
4. If both alphabets in the pair appear in the same Column of matrix, replace them with
alphabets to their immediate bellow resp
Example: BQ – HW
5. If the alphabets are not in same row or column, replace them with alphabets in the same row
resp but at other pair of corners.
ABCDEFGHIJKLMNOPQRSTUVWXYZ
P L A Y F
I/J R B C D
Key- PLAYFAIR E G H K M
Plain Text- NAME – NA ME N O Q S T
U V W X Z
Cipher Text-
Hill Cipher:
Transposition Cipher:

Transposition Ciphers are a bit different to Substitution Ciphers. Whereas


Substitution ciphers replace each letter with a different letter or symbol to produce
the ciphertext, in a Transposition cipher, the letters are just moved around.

example of a transposition cipher, is to reverse the order of the letters in a


plaintext. So "a simple example" becomes "ELPMAXE ELPMIS A". Another, similar,
way to encrypt a message would be to reverse the letters of each word, but not the
order in which the words are written. In this case "a simple example" becomes "A
ELPMIS ELPMAXE". Both of these are available in the activity at the bottom of the
page.
Modern Ciphers:
Design of modern ciphers helps to withstand a wide range of attacks. Modern
ciphers provide message secrecy, integrity and authentication of the sender. The
user can calculate the modern ciphers with the help of a one-way mathematical
function that is capable of factoring large prime numbers.

Types of Modern Ciphers

1. Symmetric key algorithms


2. Asymmetric key algorithms
Based on the type of key used:

Based on the type of key used

1. Symmetric key algorithms


2. Asymmetric key algorithms

1. Symmetric key algorithms (Private-key Cryptography): Uses same key for encryption and
decryption.
2. Asymmetric key algorithms (Public-key Cryptography): Uses two different keys for
encryption and decryption.
Symmetric key algorithms:

Type of Symmetric key algorithms

1. Block Ciphers
2. Stream Ciphers
1. Block Ciphers:
2. Stream Ciphers
Some commonly used Algorithms:
Key size and Speeds of Algorithms:
DES(Data Encryption Standard):
AES(Advanced Encryption Standard):
RC4,RC5,RC6,MD5, Algorithms:

You might also like