0% found this document useful (0 votes)
8 views

(Self Study) Lecture Slides for Week -3

The document discusses transposition ciphers, including keyless and keyed variations, explaining how plaintext is arranged and transmitted. It also covers cryptanalysis techniques, highlighting vulnerabilities such as statistical and pattern attacks. Additionally, it addresses modern symmetric-key block ciphers, their encryption methods, and the importance of padding and bit-level operations.

Uploaded by

Tahsk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

(Self Study) Lecture Slides for Week -3

The document discusses transposition ciphers, including keyless and keyed variations, explaining how plaintext is arranged and transmitted. It also covers cryptanalysis techniques, highlighting vulnerabilities such as statistical and pattern attacks. Additionally, it addresses modern symmetric-key block ciphers, their encryption methods, and the importance of padding and bit-level operations.

Uploaded by

Tahsk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Transposition ciphers • If row is fixed, column can vary

• Text is written column by column, send row by row


• Changes the location of the symbols • If column is fixed, row can vary
• E.g., symbol in first position -> in tenth position, • Text is written row by row, send column by column
symbol in eighth position -> first position

• Keyless Transposition ciphers: ‘rail fence cipher’ Number of rows = 2 (fixed),


Number of columns = ceil (length of plaintext / 2)
• Text is written column by column into a table
• Text is transmitted row by row by the sender
• E.g., plaintext = “meet me at the park” m e m a t e a k
ciphertext = “MEMATEAKETETHPR” e t e t h p r
• To decrypt, the receiver divides the ciphertext in half
(since number of rows = 2 is fixed in rail fence cipher)
• First half -> first row, Second half -> second row
• Then, the receiver reads the received ciphertext in
zigzag.
Reading in zigzag
• Cryptanalysis
• If an attacker knows rail fence cipher is used, it can be
broken -> # of rows is fixed, no keys!
Transposition ciphers
• Keyless Transposition ciphers (cont…)
• Plaintext written row by row
• Send column by column
• Sender and receiver agrees on the number of
columns Number of columns = x = 4 (e.g.),
• E.g., Number of rows = ceil (length of plaintext / x) = 4
• Plaintext = “meet me at the park”
• Ciphertext = “MMTAEEHREAEKTTP”
• To decrypt (reverse process)
• Arrange the received ciphertext column by
column
• Read it row by row

• If row is fixed, column can vary


• Text is written column by column, send row by row
• If column is fixed, row can vary
• Text is written row by row, send column by column
Transposition ciphers
• Keyed Transposition ciphers
• divide the plaintext into groups of predetermined size, called blocks
• use a key to permute the characters in each block separately
• Plaintext = “enemy attacks tonight” (insert a bogus character ‘z’ if plaintext is not multiple of block size)

Key for
permutation
Transposition ciphers: ‘Keyless + Keyed’ combination
• First, the text is written into a table row by row.
• Second, the permutation is done by reordering
the columns.
• Third, the new table is read column by column.
• Called keyed columnar transposition ciphers or
just columnar transposition ciphers.

• Sending part (column by column) is


what makes it different from the
previous slide
• Same permutation is applied across
all blocks (written on different rows)
Transposition ciphers: ‘Key’ in ‘Keyless + Keyed’ combination
• It is customary to create two keys (one for
encryption and one for decryption) instead of the
key mapping shown.
• Encryption and decryption key entry shows the
source column number. Destination column
number is understood from the index/position of
the entry.
• How do we get the decryption key from the
encryption key?
• Write index below the encryption key
• Swap the key with the index (key becomes
index and index becomes key)
• Sort the pairs (of key and index) based on
index

Index is 1, so 4 is moved to the first position


Do the same for the others..
Transposition ciphers: Cryptanalysis
• Statistical attack
• transposition cipher does not change the frequency of letters in the ciphertext.
• if the length of the ciphertext is long enough, vulnerable to statistical attack.
• Pattern attack
• The ciphertext created from a keyed transposition cipher has some repeated patterns.
• An attacker can guess the block size and permuting the characters in the group can give a clue.
• Brute force attack
• In keyed transposition cipher, the number of keys can be huge (1! + 2! + 3! + . . . + L!), where L is the length of
the ciphertext
• (1! + 2! + 3! + . . . + L!) ??

One column # of columns = length of ciphertext


Only one row

#of columns correspond to size of block to which the


plaintext is divided, i.e., # of columns = 2 means block
size is also 2.
Stream ciphers, Block ciphers

Ciphers

Stream ciphers Block ciphers

• Encryption and decryption are done one symbol at • group of plaintext symbols of size m (m > 1) are
a time encrypted together creating a group of ciphertext of
• We have a plaintext stream, a ciphertext stream, the same size
and a key stream

• E.g., Monoalphabetic ciphers (additive,


multiplicative, affine), Vigenere ciphers

• E.g., Hill ciphers


Modern (Symmetric-key) Block Ciphers
• Traditional symmetric-key ciphers that we have studied so far are character-oriented ciphers.
• We need bit-oriented ciphers. Why?
• information to be encrypted is not just text; it can also consist of numbers, graphics, audio, and video
data.
• convenient to convert these types of data into a stream of bits, to encrypt the stream, and then to send
the encrypted stream.
• at the bit level, each character is replaced by 8 (or 16) bits, which means that the number of symbols
becomes 8 (or 16) times larger.
• Mixing a larger number of symbols increases security.

• Symmetric-key modern block cipher encrypts an n-bit block of plaintext or decrypts an n-bit block of
ciphertext.
• Encryption or decryption algorithm uses a k-bit key.
• Decryption algorithm must be the inverse of the encryption algorithm
• Both operations must use the same secret key
• Padding must be added to make the block n-bit.
Modern (Symmetric-key) Block Ciphers
• How many padding bits must be added to a message of 100 characters if 8-bit ASCII is used for
encoding and the block cipher accepts blocks of 64 bits?
• 32 bits -> total of 832 bits or thirteen 64-bit blocks.

• Modern block ciphers are designed as substitution ciphers


• a 1-bit or a 0-bit in the plaintext can be replaced by either a 0 or a 1.
• plaintext and the ciphertext can have a different number of 1’s.

• What if they are designed as transposition cipher?


• bits are only reordered (transposed) -> there is the same number of 1’s in the plaintext and in
the ciphertext.
• preserving the number of 1’s or 0’s -> vulnerable to exhaustive-search attacks.

• What search? The transposition key


that maps the ciphertext to plaintext
Modern (Symmetric-key) Block Ciphers
• Suppose that we have a block cipher where n = 64. If there are 10 1’s in the ciphertext, how
many trial-and-error tests does Eve (an attacker) need to do to recover the plaintext from the
intercepted ciphertext in each of the following cases?
a. The cipher is designed as a substitution cipher.
• Needs to try all 264 64-bit blocks to find one that makes sense.
b. The cipher is designed as a transposition cipher.
• Number of 1’s and 0’s remain the same in the ciphertext
• Needs to launch an exhaustive-search attack using only those 64-bit blocks that have
exactly 10 1’s
• (64!) / [(10!) (54!)] = 151,473,214,816 out of 264.

This is m+nCn or m+nCm


(combination) which are equal
From 64 different locations we
need to choose 10 different
locations in multiple ways.

You might also like