0% found this document useful (0 votes)
38 views16 pages

Week14-Block Ciphers

The document discusses secret key cryptography and various secret key encryption algorithms and techniques, including: - Secret key cryptography uses the same key for encryption and decryption and keeps the key secret. It is fast and used for encrypting large volumes of data. - Transposition ciphers rearrange plaintext values. Stream ciphers encrypt data one bit at a time using a keystream. Block ciphers encrypt fixed-size blocks using substitution and permutation. - The Vernam cipher adds pad values to plaintext numeric values for encryption. Stream ciphers generate a keystream from a seed key to encrypt the plaintext bit-by-bit, while block ciphers operate on fixed-size blocks using substitution and permutation rounds.

Uploaded by

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

Week14-Block Ciphers

The document discusses secret key cryptography and various secret key encryption algorithms and techniques, including: - Secret key cryptography uses the same key for encryption and decryption and keeps the key secret. It is fast and used for encrypting large volumes of data. - Transposition ciphers rearrange plaintext values. Stream ciphers encrypt data one bit at a time using a keystream. Block ciphers encrypt fixed-size blocks using substitution and permutation. - The Vernam cipher adds pad values to plaintext numeric values for encryption. Stream ciphers generate a keystream from a seed key to encrypt the plaintext bit-by-bit, while block ciphers operate on fixed-size blocks using substitution and permutation rounds.

Uploaded by

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

CRYPTOGRAPHY

Secret Key
Cryptography
Secret Key Cryptography
• Both encryption and decryption keys are the same and are kept secret
• The secret key must be known at both ends to perform encryption or
decryption (Fig)
• Secret Key algorithms are fast and they are used for
encrypting\decrypting high volume data
• Secret key cryptography is classified into two types
• Block Ciphers
• Stream Ciphers
Transposition Cipher
• Easy to understand, but if properly used,
produces ciphertext that is difficult to
decipher
• Rearranges values within a block to create
ciphertext
• Can be done at the bit level or at the byte
(character) level
• To make the encryption even stronger, the
keys and block sizes can be made much
larger
Principles of Information 3
Security, Fourth Edition
Exclusive OR (XOR)
• Function of Boolean algebra; two bits
are compared
– If two bits are identical, result is binary
0
– If two bits not identical, result is binary
1
• A very simple symmetric cipher that
is used in many applications where
security is not a defined requirement
Principles of Information 4
Security, Fourth Edition
Table 8-3 XOR Truth
Table

Principles of Information 5
Security, Fourth Edition
Vernam Cipher
• Developed at AT&T
• Uses set of characters once per encryption process
• To perform:
– The pad values are added to numeric values that
represent the plaintext that needs to be encrypted
– Each character of the plaintext is turned into a number
and a pad value for that position is added
– The resulting sum for that character is then converted
back to a ciphertext letter for transmission
– If the sum of the two values exceeds 26, then 26 is
subtracted from the total

Principles of Information 6
Security, Fourth Edition
Book or Running Key Cipher
• Uses text in book as key to decrypt a
message
• Ciphertext contains codes representing
page, line, and word numbers
• Algorithm is the mechanical process of:
– Looking up the references from the
ciphertext
– Converting each reference to a word by
using the ciphertext’s value and the key
• Typical sources are dictionaries and
Principles of Information 7
thesauruses
Security, Fourth Edition
Stream Ciphers
Plaintext bits

Encryption Ciphertext bits


Keystream bits

• A stream cipher is a type of symmetric encryption in


which input data is encrypted one bit (sometime one
byte) at a time
• Examples of stream ciphers include SEAL, TWOPRIME,
RC4, A5
Stream Ciphers
Plaintext bits (P)
Ciphertext bits(C)
Seed key Encryption
Keystream bits (K)
Key
Generator

• To encrypt plaintext stream


– A random set of bits is generated from a seed key, called
keystream which is as long as the message
– Keystream bits are added modulo 2 to plaintext to form the
ciphertext stream
• To decrypt ciphertext stream
– use the same seed key to generate the same keystream used in
encryption
– Add the keystream modulo 2 to the ciphertext to retrieve the
plaintext
– i.e. C = P ⊕ K ⇒ C ⊕ K = (P ⊕ K) ⊕ K = P
Block Cipher
Plaintext block Encryption Ciphertext block
e.g. 64 bits E e.g. 64 bits

Key K

• A block cipher is a type of symmetric encryption which operates on


blocks of data. Modern block ciphers typically use a block length of
128 bits or more
• Examples of block ciphers include DES, AES, RC6, and IDEA
• A block cipher breaks message into fixed sized blocks
• Takes one block (plaintext) at a time and transform it into another
block of the same length using a user provided secret key
• Decryption is performed by applying the reverse transformation to
the ciphertext block using the same secret key
• Most symmetric block ciphers are based on a Feistel Cipher Structure
(Explained in next slides)
Properties of Good Ciphers:
Confusion and Diffusion
• In cryptography, confusion and diffusion are two properties of the
operation of a secure cipher which were identified by Shannon in
his paper, "Communication Theory of Secrecy Systems" published
in 1949
• Confusion refers to making the relationship between the key and
the ciphertext as complex and involved as possible
• Substitution is one of the mechanism for primarily confusion
• Diffusion refers to the property that redundancy in the statistics
of the plaintext is "dissipated" in the statistics of the ciphertext
• Transposition (Permutation) is a technique for diffusion
• Associate dependency of bits of the output to the bits of input
• In a cipher with good diffusion, flipping an input bit should change
each output bit with a probability of one half
Motivation for Feistel Cipher
Structure
💧 In 1949, Claude Shannon also introduced the idea of
substitution-permutation (S-P) networks which form the basis of modern
block ciphers
💧 S-P networks are based on the two primitive cryptographic operations:
substitution (S-box) & permutation (P-box)
💧 provide confusion and diffusion of message
Motivation for Feistel Cipher
Structure
• S-P network: a special form of ⊕
substitution-transposition product cipher
• Product cipher
– Two or more simple ciphers are performed in
sequence in such a way that the final result or
product is cryptographically stronger than any
of the component ciphers ⊕

• Feistel cipher
– In 1970’s, Horst Feistel (IBM T.J. Watson
Research Labs) invented a suitable (practical)
structure which adapted Shannon’s S-P ⊕
network
– Encryption and decryption use the same
structure
Feistel Cipher Structure
Plaintext (2w bits)

L0 R0
Round 1
w bits w bits
Ideas for each round:
1. partition input block into two halves
Round 2
2. process through multiple rounds
which
perform a substitution on left data half
based on a round function of right
half &
subkey
3. then have permutation swapping
halves Round n
Ln Rn
w bits w bits

Ciphertext (2w bits)


Feistel Cipher Design Principles
💧 Block size
– increasing size improves security, but slows cipher
💧 Key size
– increasing size improves security, makes exhaustive key searching
harder, but may slow cipher
💧 Number of rounds
– increasing number improves security, but slows cipher
💧 Subkey generation
– greater complexity can make analysis harder, but slows cipher
💧 Round function
– greater complexity can make analysis harder, but slows cipher
💧 Fast software en/decryption & ease of analysis
– are more recent concerns for practical use and testing
Feistel Cipher Decryption

You might also like