Lecture 2 - SRTY 6002 - Symmetric Ciphers 11 - 20221030
Lecture 2 - SRTY 6002 - Symmetric Ciphers 11 - 20221030
SRTY-6002
Lecture 2
Symmetric Ciphers 1
Classical Encryption Techniques
Definitions
Cryptanalysis Cryptology
• Techniques used for • The areas of
deciphering a message cryptography and
without any knowledge of cryptanalysis
the enciphering details
© 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Symmetric Cipher Model
• Sender and receiver must have obtained copies of the secret key in a secure fashion and
must keep the key secure
© 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Cryptographic Systems
• Characterized along three independent dimensions:
The type of
operations used for The way in which
The number of
transforming the plaintext is
keys used
plaintext to processed
ciphertext
Symmetric,
single-key,
Substitution secret-key, Block cipher
conventional
encryption
Asymmetric,
two-key, or
Transposition Stream cipher
public-key
encryption
Cryptanalysis and Brute-Force Attack
• Unconditionally secure
• No matter how much time an opponent has, it is impossible for him or her to
decrypt the ciphertext simply because the required information is not there
• Computationally secure
• The cost of breaking the cipher exceeds the value of the encrypted information
• The time required to break the cipher exceeds the useful lifetime of the
information
Brute-Force Attack
Brute-Force
Cryptanalysis
of
Caesar Cipher
• Easy to break because they reflect the frequency data of the original
alphabet
• Countermeasure is to provide multiple substitutes (homophones) for a
single letter
• Digram
• Two-letter combination
• Most common is th
• Trigram
• Three-letter combination
• Most frequent is the
Playfair Cipher
• Fill in letters of keyword (minus duplicates) from left to right and from top to
bottom, then fill in the remainder of the matrix with the remaining letters in
alphabetic order
• Using the keyword MONARCHY:
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
© 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Hill Cipher
• The one-time pad offers complete security but, in practice, has two
fundamental difficulties:
• There is the practical problem of making large quantities of random keys
• Any heavily used system might require millions of random characters on a regular basis
• Mammoth key distribution problem
• For every message to be sent, a key of equal length is needed by both sender and receiver
• Because of these difficulties, the one-time pad is of limited utility
• Useful primarily for low-bandwidth channels requiring very high security
• The one-time pad is the only cryptosystem that exhibits perfect secrecy (see
Appendix F)
Rail Fence Cipher
A block of
plaintext is
Typically a
treated as a
block size of 64
whole and used
or 128 bits is
to produce a
used
ciphertext block
of equal length
The majority of
As with a
network-based
stream cipher,
symmetric
the two users
cryptographic
share a
applications
symmetric
make use of
encryption key
block ciphers
© 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Table 4.1 - Encryption and Decryption Tables for Substitution Cipher of Figure 4.2
Feistel Cipher
• Feistel proposed the use of a cipher that alternates substitutions and
permutations
• Each plaintext element or group of elements is
Substitutions uniquely replaced by a corresponding
ciphertext element or group of elements
Diffusion
• The statistical structure of the plaintext is dissipated into long-range statistics of
the ciphertext
• This is achieved by having each plaintext digit affect the value of many ciphertext
digits
Confusion
• Seeks to make the relationship between the statistics of the ciphertext and the
value of the encryption key as complex as possible
• Even if the attacker can get some handle on the statistics of the ciphertext, the
way in which the key was used to produce that ciphertext is so complex as to
make it difficult to deduce the key
© 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Feistel Cipher Design Features
• Block size • Round function F
• Larger block sizes mean greater • Greater complexity generally means
security but reduced greater resistance to cryptanalysis
encryption/decryption speed for a given • Fast software
algorithm encryption/decryption
• Key size • In many cases, encrypting is
• Larger key size means greater security embedded in applications or utility
but may decrease encryption/decryption functions in such a way as to
speeds preclude a hardware
implementation; accordingly, the
• Number of rounds speed of execution of the algorithm
• The essence of the Feistel cipher is that becomes a concern
a single round offers inadequate • Ease of analysis
security but that multiple rounds offer
• If the algorithm can be concisely
increasing security
and clearly explained, it is easier to
• Subkey generation algorithm analyze that algorithm for
• Greater complexity in this algorithm cryptanalytic vulnerabilities and
should lead to greater difficulty of therefore develop a higher level of
cryptanalysis assurance as to its strength
Feistel Example
Data Encryption Standard (DES)
DES Example
Note: DES subkeys are shown as eight 6-bit values in hex format
Table 4.3 Avalanche Effect in DES: Change in Plaintext
Table 4.4 Avalanche Effect in DES: Change in Key
Table 4.5 - Average Time Required for Exhaustive Key Search
Strength of DES
•Timing attacks
•One in which information about the key or the
plaintext is obtained by observing how long it takes
a given implementation to perform decryptions on
various ciphertexts
•Exploits the fact that an encryption or decryption
algorithm often takes slightly different amounts of
time on different inputs
•So far it appears unlikely that this technique will ever
be successful against DES or more powerful
symmetric ciphers such as triple DES and AES
Block Cipher Design Principles: Number of Rounds
In general, the
criterion should be
If DES had 15 or
that the number of
fewer rounds,
The greater the rounds is chosen so
differential
number of rounds, the that known
cryptanalysis would
more difficult it is to cryptanalytic efforts
require less effort than
perform cryptanalysis require greater effort
a brute-force key
than a simple brute-
search
force key search
attack
Block Cipher Design Principles: Design of Function F
• With any Feistel block cipher, the key is used to generate one subkey
for each round
• In general, we would like to select subkeys to maximize the difficulty of
deducing individual subkeys and the difficulty of working back to the
main key
• It is suggested that, at a minimum, the key schedule should guarantee
key/ciphertext Strict Avalanche Criterion and Bit Independence Criterion
Block Ciphers and Data Encryption Standard Summary