Department of Computer Science and Engineering (CSE)
CYBER LAW AND SECURITY
UNIT 1
University Institute of Engineering (UIE) 1
Department of Computer Science and Engineering (CSE)
Outline
• History
• Terms & Definitions
• Symmetric and Asymmetric Algorithms
• Attacks on Cryptosystems
2
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Speak Like a Crypto Geek
Plaintext – A message in its natural format readable by an
attacker
Ciphertext – Message altered to be unreadable by anyone
except the intended recipients
Key – Sequence that controls the operation and behavior of
the cryptographic algorithm
Keyspace – Total number of possible values of keys in a
crypto algorithm
3
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Introduction
• Increasingly used to protect information
• Can ensure confidentiality
– Integrity and Authenticity too
4
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Cryptosystem Services
• Confidentiality
• Integrity
• Authenticity
• Nonrepudiation
• Access Control
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Types of Cryptography
• Stream-based Ciphers
– One at a time, please
– Mixes plaintext with key stream
– Good for real-time services
• Block Ciphers
– Amusement Park Ride
– Substitution and transposition
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Encryption Systems
• Substitution Cipher
– Convert one letter to another
– Cryptoquip
• Transposition Cipher
– Change position of letter in text
– Word Jumble
• Monoalphabetic Cipher
– Caesar
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
BLOCK CIPHER
• A block cipher takes a block of plaintext bits and
generates a block of cipher text bits, generally of same
size.
• The size of block is fixed in the given scheme. The choice
of block size does not directly affect to the strength of
encryption scheme. The strength of cipher depends up on
the key length.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Block Size
• Avoid very small block size − Say a block size is m bits. Then
the possible plaintext bits combinations are then 2m.
If the attacker finds the plain text blocks similar to some
previously sent ciphertext blocks, then the attacker can use a
type of ‘dictionary attack’ making use of dictionary of
plaintext/ciphertext pairs sent using that encryption key.
• A larger block size makes attack harder as the dictionary
needs to be larger.
• Do not have very large block size − With very large block
size, the cipher becomes inefficient to operate. Such plaintexts
will need to be padded before being encrypted.
• Multiples of 8 bit − A preferred block size is a multiple of 8 as
it is easy for implementation as most computer processor
handle data in multiple of 8 bits.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Padding in Block Cipher
• Block ciphers process blocks of fixed sizes (say 64 bits).
• The length of plaintexts is mostly not a multiple of the block
size. For example, a 150-bit plaintext provides two blocks of
64 bits each with third block of balance 22 bits.
• The last block of bits needs to be padded up with redundant
information so that the length of the final block equal to block
size of the scheme.
• In our example, the remaining 22 bits need to have additional
42 redundant bits added to provide a complete block. The
process of adding bits to the last block is referred to
as padding.
• Too much padding makes the system inefficient. Also, padding
may render the system insecure at times, if the padding is
done with same bits always.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Block Cipher Schemes
• There is a huge numberof block ciphers schemes that are
in use. Most popular ones are discussed below
• Digital Encryption Standard (DES) − The popular block
cipher of the 1990s which is known as a ‘broken’ block
cipher, due primarily to its small key size.
• Triple DES − It is a scheme based on repeated DES
applications. It is still a respected block ciphers but
inefficient compared to the new faster block ciphers
available.
• Advanced Encryption Standard (AES) − It is a relatively
new block cipher based on the encryption
algorithm Rijndael that won the AES design competition.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Continued….
• IDEA − It is a quiet strong block cipher with a block size of 64
and a key size of 128 bits.
• Various applications make use of IDEA encryption, including
early versions of Pretty Good Privacy (PGP) protocol. Because
of patent issues it has got restricted users.
• Twofish − This scheme of block cipher uses block size of 128
bits and a key of variable length. It was one of the AES finalists.
It is based on the earlier block cipher Blowfish with a block
size of 64 bits.
• Serpent − A block cipher with a block size of 128 bits and key
lengths of 128, 192, or 256 bits, which was also an AES
competition finalist. It is a slower but has more secure design
than other block cipher.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Feistel Block Cipher
• Feistel Cipher is not a specific scheme of block cipher.
• It is a design model from which many different block
ciphers are derived.
• DES is just one example of a Feistel Cipher.
• A cryptographic system based on Feistel cipher structure
uses the same algorithm for both encryption and
decryption.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Continued…
• Encryption Process
• The encryption process uses the Feistel structure
consisting multiple rounds of processing of the plaintext,
each round consisting of a “substitution” step followed by
a permutation step.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Decryption Process
• The process of decryption in Feistel cipher is no
different.
• In this case, the ciphertext block is fed into the start of
the Feistel structure and then the process thereafter is
exactly the same as described in the given illustration.
• The point where the process differs is that the subkeys
used in encryption are used in the reverse order.
• The final swapping of ‘L’ and ‘R’ in last step of the Feistel
Cipher is essential.
• If these are not swapped then the resulting ciphertext
could not be decrypted using the same algorithm.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Advanced Encryption System
• The Advanced Encryption Standard (AES) is a symmetric-
key block cipher published by the National Institute of
Standards and Technology (NIST) in December 2001.
History
Criteria
Rounds
Data Units
Structure of Each Round
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Rounds
• AES is a non-Feistel cipher that encrypts and decrypts a
data block of 128 bits. It uses 10, 12, or 14 rounds. The key
size, which can be 128, 192, or 256 bits, depends on the
number of rounds.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
General design of AES encryption cipher
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
History
• In February 2001, NIST announced that a draft of the
Federal Information Processing Standard (FIPS) was
available for public review and comment. Finally, AES was
published as FIPS 197 in the Federal Register in December
2001.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Criteria
• The criteria defined by NIST for selecting AES fall into three
areas:
• 1. Security
• 2. Cost
• 3. Implementation.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Structure of Each Round
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Structure of each round at the encryption site
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Substitution
• AES, like DES, uses substitution. AES uses two invertible
transformations.
• SubBytes
• The first transformation, SubBytes, is used at the
encryption site. To substitute a byte, we interpret the byte
as two hexadecimal digits.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
SUBBYTES
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
SECURITY IMMUNE AES
• AES was designed after DES. Most of the known attacks on
DES were already tested on AES.
• Brute-Force Attack
• AES is definitely more secure than DES due to the larger-size
key.
• Statistical Attacks
• Numerous tests have failed to do statistical analysis of the
ciphertext
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
COST
• The algorithms used in AES are so simple that they can be
easily implemented using cheap processors and a minimum
amount of memory.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Data Encryption Standard
• The Data Encryption Standard (DES) is a symmetric-
key block cipher published by the National
• Institute of Standards and Technology (NIST).
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
ENCRYPTION AND DECRYPTION
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
ROUNDS OF DES
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
INITIAL PERMUTATION
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
ONE ROUND OF DES
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
CONTINUED…
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
WEAKNESS IN DES
• PRONE TO BRUTE FORCE ATTACK
• KEY LENGTH WEAKNESS
Therefore TRIPLE DES IS INTRODUCED
University Institute of Engineering (UIE)