Professional Documents
Culture Documents
L5 Modern Block Cipher
L5 Modern Block Cipher
• Symmetric-key cipher:
• The original message from Alice to Bob is called plaintext;
• the message that is sent through the channel is called the ciphertext.
• To create the ciphertext from the plaintext, Alice uses an encryption algorithm and a
shared secret key.
• To create the plaintext from ciphertext, Bob uses a decryption algorithm and the
same secret key.
• Kerckhoff’s principle
• A cryptosystem should be secure even if everything about the system, except
the key, is public knowledge.
• Padding:
• If the message has fewer than n bits, padding must be done to make it n bits.
• If the message size is not a multiple of n, then it should be divided into n bit blocks
and the last block should be padded.
• Solution:
• Encoding 100 characters using 8-bit ASCII results in an 800-bit message. The
plaintext must be divisible by 64. If | M | and |Pad| are the length of the
message and the length of the padding,
• Transposition Ciphers:
• Involves rearrangement of bits, without changing the value
• Consider an n bit cipher
• How many such rearrangements are possible?
• n!
• How many key bits are necessary?
• ceil[log2 (n!)]
• Solution :
• The set of permutation tables has 3! = 6 elements.
• Key : ceil(log26)=3 bits
• Solution:
• Figure next shows the model and the set of permutation tables.
• The key is also much longer, [log2(40,320)] = 16 bits.
• In the first case, Eve has no idea how many 1’s are in the plaintext. Eve needs to
try all possible 264 64-bit blocks to find one that makes sense.
• In the second case, Eve knows that there are exactly 10 1’s in the plaintext. Eve
can launch an exhaustive-search attack using only those 64-bit blocks that have
exactly 10 1’s.
• Confusion: it hides the relationship between the ciphertext and the key
• Confusion refers to making the relationship between the key and the ciphertext
as complex and as involved as possible
• a single bit change in key - changes roughly half of the bits in corresponding
cipher text,
• Non-Linear Sbox
• In a non-linear S-Box, each of the elements cannot be expressed as above
• Eg.
Dr. Reema Patel, B.Tech,SOT,PDPU,IS-2019 34
SBox - Example
• The following table defines the input/output relationship for an S-box of size 3 × 2 (3 bits input, 2 bits
output). The leftmost bit of the input defines the row; the two rightmost bits of the input define the
column. The two output bits are values on the cross section of the selected row and column.
• Based on the table, an input of 010 yields the output 01. An input of 101 yields the output of 00.
• If S : A → A is a cipher, consider
• Sk = S × S × . . . × S : A → A
• More S-Boxes
• More rounds
1. Feistel ciphers
• Ex. DES (Data Encryption Standard)
• Function f(k):
• takes the first and third bits of the key,
• interprets these two bits as a decimal number,
• squares the number,
• interprets the result as a 4-bit binary pattern
• The function extracts the first and third bits of key: 11 in binary or 3 in decimal.