[go: up one dir, main page]

0% found this document useful (0 votes)
47 views22 pages

Crypt - Lecture 07 (Transposition Ciphers)

This lecture introduces the basics of cryptography, focusing on transposition ciphers, including the Reverse Cipher and Row Transposition Cipher. The Reverse Cipher simply reverses the order of letters in a message, while the Row Transposition Cipher rearranges letters in a grid based on a key. Additionally, the Double Transposition Cipher is discussed, which involves permuting both rows and columns for enhanced security.

Uploaded by

fortest1073
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)
47 views22 pages

Crypt - Lecture 07 (Transposition Ciphers)

This lecture introduces the basics of cryptography, focusing on transposition ciphers, including the Reverse Cipher and Row Transposition Cipher. The Reverse Cipher simply reverses the order of letters in a message, while the Row Transposition Cipher rearranges letters in a grid based on a key. Additionally, the Double Transposition Cipher is discussed, which involves permuting both rows and columns for enhanced security.

Uploaded by

fortest1073
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/ 22

Lecture – 07

Introduction of Cryptography
(Encryption Basics & Classical Ciphers)

Course Instructor: Hina Alam


(hina.alam@ucp.edu.pk)
Transposition Ciphers
Agenda
Contents
1. Reverse Cipher
2. Row Transposition (Columnar Transposition)
3. Double Transposition
Reverse Cipher (aka Mirror Cipher)

The Reverse Cipher is the simplest form of a transposition cipher.

▪ All it does is reverse the order of the letters in the message

How It Works:

Encryption:

● Take the original message.

● Reverse the characters.

Decryption:

● Reverse it again.

● You get the original message back.


Write the message backwards….

Key-space: 1

Why
?
Example

Original Message: MEET ME AT MIDNIGHT

▪ Encrypted with Reverse Cipher:

We just reverse all the characters (including spaces):

THGINDIM TA EM TEEM
Transposition Ciphers:
Row Transposition Cipher
Transposition Ciphers: Row Transposition Cipher
Also known as Columnar Transposition Cipher.
• A transposition cipher used in World War I and II as a hand cipher.
• The key determines the number of columns and their order.
• Involves rearranging the letters of the plaintext in a grid based on the key.
Key Concept:
➢The plaintext is written row-wise in a grid, where the number of columns corresponds to the
length of the key.

➢Each letter in the key represents a column number, dictating the order in which the
columns will be read.
Steps for Row Transposition Cipher
1. Write the Plaintext Row-wise.
2. Reorder the Columns.
3. Read the Ciphertext Column-wise.

Key-space:

➢ The number of possible keys is determined by the number of permutations of the key.
➢ If the key length is n, the key-space is n! (factorial of n), as there are that many ways to arrange
the columns.
Example 01 -
Encryption
Example 02 -
Encryption
▪ Plaintext: attackXatXdawn

▪ Keyword: 3421567

▪ Cipher Text = ?

Key 3 4 2 1 5 6 7
a t t a c k X
Row Wise

Plain Text a t X d a w n
Cipher Text:
Rearrange
adtXaattcakwXn
Rearrange
the Key 1 2 3 4 5 6 7
a t a t c k X
Row Wise

Plain Text d X a t a w n
Example 02 -
Decryption
▪ Plaintext: ?

▪ Keyword: 3421567

▪ Cipher Text: adtXaattcakwXn

Rearrange
the Key 1 2 3 4 5 6 7
a t a t c k X
Row Wise

Plain Text d X a t a w n

Rearrange

Plaintext:

attackXatXdawn
Rearrange
3 4 2 1 5 6 7
the Key
a t t a c k X
Row Wise

Plain Text a t X d a w n
Example

▪ Plaintext: a convenient way to the permutation

▪ Keyword: COMPUTER

▪ Cipher Text = ?
What if the key is not
given?
Transposition Ciphers:
Double Transposition Cipher
Double Transposition Cipher

– Used in WW2 for secure communication.


• Key defines matrix size and permutation process.

Steps:

➢Permute the rows of the matrix.

➢Permute the columns of the matrix.


Example 01 -
Encryption

First transposition
Example 02 -
Decryption
▪ Plaintext: ?

▪ Keyword: 35142(rows) - 132(columns)

3 2
1

Permute Rows Permute


Columns

Plaintext:

attackXatXdawn

You might also like