CSS Module 2 Part 1
CSS Module 2 Part 1
Stream cipher
8
5/18/2021 CSS Module 2 Rohini Bhosale
Difference between Block Cipher and Stream
Cipher
Sr. No Block Cipher Stream Cipher
The ECB method is ideal for a short amount of data, such as an encryption key.
Thus, if you want to transmit a DES key securely, ECB is the appropriate mode to use.
The most significant characteristic of ECB is that the same b-bit block of plaintext, if
it appears more than once in the message, always produces the same ciphertext.
For decryption, each cipher block is passed through the decryption algorithm. The
result is XORed with the preceding ciphertext block to produce the plaintext block.
To produce the first block of ciphertext, an initialization vector (IV)(no special
meaning , it is randomly generated) is XORed with the first block of plaintext.
On decryption, the IV is XORed with the output of the decryption algorithm to
recover the first block of plaintext. The IV is a data block that is that same size as
the cipher block.
The IV must be known to both the sender and receiver but be unpredictable by
a third party.
For maximum security, the IV should be protected against unauthorized changes.
This could be done by sending the IV using ECB encryption.
Because of the chaining mechanism of CBC, it is an appropriate mode for encrypting
messages of length greater than b bits.
CBC mode can be used for authentication.
The DES scheme is essentially a block cipher technique that uses b-bit
blocks.
However, it is possible to convert DES into a stream cipher, using either
the cipher feedback (CFB) or the output feedback mode.
Figure depicts the CFB scheme. In the figure, it is assumed that the unit
of transmission is s bits; a common value is s = 8. As with CBC, the
units of plaintext are chained together, so that the ciphertext of any
plaintext unit is a function of all the preceding plaintext. In this case,
rather than units of b bits, the plaintext is divided into segments of s
bits.
In addition, the contents of the shift register are shifted left by s bits
and C is placed in the rightmost (least significant) s bits of the shift
register.
This process continues until all plaintext units have been encrypted.
One advantage of the OFB method is that bit errors in transmission do not
propagate. For example, if a bit error occurs in C1 only the recovered value
of is P1 affected; subsequent plaintext units are not corrupted. With CFB, C1
also serves as input to the shift register and therefore causes additional
corruption downstream.
It is a block cipher
The most widely used encryption scheme is based on the
Data Encryption Standard (DES) adopted in 1977 by the
National Institute of Standards and Technology (NIST).
The algorithm itself is referred to as the Data Encryption
Algorithm (DEA).
For DES, data are encrypted in 64-bit blocks using a 56-bit
key. The algorithm transforms 64-bit input in a series of
steps into a 64-bit output. The same steps, with the same
key, are used to reverse the encryption.
IP(675a6967 5e5a6b5a) =
(ffb2194d 004df6fb)
With a key length of 56 bits, there are 256 possible keys, which is
approximately 7.2 x 1016.
• initial criteria:
➢ security – effort for practical cryptanalysis
➢ cost – in terms of computational efficiency
➢ algorithm & implementation characteristics
• final criteria
➢ general security
➢ ease of software & hardware implementation
➢ implementation attacks
➢ flexibility (in en/decrypt, keying, other factors)
AES Shortlist