0% found this document useful (0 votes)
3 views

unit 1 Difference between Block Cipher and Stream Cipher

Block ciphers and stream ciphers are both types of symmetric key ciphers used for encrypting plaintext into ciphertext. Block ciphers encrypt data in fixed-size blocks, typically 64 or 128 bits, while stream ciphers encrypt data one bit or byte at a time, making them suitable for real-time applications. The choice between the two depends on the specific needs for security, efficiency, and the nature of the data being encrypted.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

unit 1 Difference between Block Cipher and Stream Cipher

Block ciphers and stream ciphers are both types of symmetric key ciphers used for encrypting plaintext into ciphertext. Block ciphers encrypt data in fixed-size blocks, typically 64 or 128 bits, while stream ciphers encrypt data one bit or byte at a time, making them suitable for real-time applications. The choice between the two depends on the specific needs for security, efficiency, and the nature of the data being encrypted.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Difference between Block Cipher and Stream Cipher

Block Cipher and Stream Cipher are the types of symmetric key cipher. These two block ciphers
are used to transform plain text into ciphertext. The difference between a Block cipher and a Stream
cipher is that the former transforms the plain text into cipher text by taking the plain text
block by block. On the other hand, a block cipher produces cipher text from plain text by
taking one byte of plain text at a time. In this article, we will see the difference between Block
Cipher and Stream Cipher in detail.

Block Cipher:-
A block cipher encrypts data in fixed-size blocks usually 64 or 128 bits at a time. The
encryption algorithm processes each block of data separately using the cryptographic key to
transform the plaintext into the cipher text. Block ciphers function on complex
mathematical computation and permutation to ensure that the data encrypted is safe. The
choice of block size does not directly affect the strength of the encryption scheme. The
strength of the cipher depends upon the key length. However, any size of the block is
acceptable. The following aspects can be kept in mind while selecting the size of a block:
Avoid very small block sizes, Do not have very large block sizes, and Multiples of 8-bit.

Key Features of Block Ciphers


 Fixed Block Size: The Data is encrypted in a fixed-size block.
 Complex Operations: In block
ciphers, substitution combined with permutation forms the operation to achieve encryption.
 Modes of Operation: Block ciphers employ several modes such as ECB (Electronic
Codebook) and CBC (Cipher Block Chaining) for enhanced security.
Examples: AES (Advanced Encryption Standard), DES (Data Encryption Standard) and
Blowfish.

Stream Cipher:-
A stream cipher encrypts data one bit or one byte at a time rather than in fixed-size blocks. It
generates a key stream that is combined with the plaintext to the produce cipher text. Stream
ciphers are made for the scenarios where data needs to be encrypted in the continuous stream
making them suitable for the real-time applications.
It can be categorized into the synchronous, self-synchronizing and one-time pad types. The
Synchronous encryption requires independently generated key stream from both the plaintext
and the cipher text. They have to be in the same state, with the same key, in order to decode the
data properly.

Key Features of Stream Ciphers


 Continuous Encryption: The data is encrypted in a stream that runs continuously, a bit
or byte at a time
 Keystream Generation: To create encryption keys, the Stream ciphers use a
pseudorandom keystream generator.
 Efficiency: Stream ciphers are generally more efficient for encrypting data of variable
length and in the streaming applications.
Examples: RC4, Salsa20, and ChaCha20.
Difference Between Block Cipher and Stream Cipher

Block Cipher Stream Cipher

Stream Cipher Converts the plain text


Block Cipher Converts the plain text into cipher text
into cipher text by taking 1 bit plain text
by taking plain text’s block at a time.
at a time.

Block cipher uses either 64 bits or more than 64 bits. While stream cipher uses 8 bits.

The complexity of block cipher is simple. While stream cipher is more complex.

Block cipher uses confusion as well as diffusion. While stream cipher uses only confusion.

While in-stream cipher, reverse


In block cipher, reverse encrypted text is hard.
encrypted text is easy.

The algorithm modes which are used in block cipher The algorithm modes which are used in
are ECB (Electronic Code Book) and CBC (Cipher stream cipher are CFB (Cipher Feedback)
Block Chaining). and OFB (Output Feedback).

Block cipher works on transposition techniques While stream cipher works on


like rail-fenc etechnique, columnar transposition substitution techniques like Caesar
technique, etc. cipher, polygram substitution cipher, etc.

While stream cipher is fast in comparison


Block cipher is slow as compared to a stream cipher.
to block cipher.

Suitable for applications that require strong Suitable for applications that require
encryption, such as file storage and internet strong encryption, such as file storage
communications. and internet communications.
Block Cipher Stream Cipher

More secure than stream ciphers when the same key Less secure than block ciphers when the
is used multiple times. same key is used multiple times.

key length is typically 128 or 256 bits. key length is typically 128 or 256 bits.

Operates on fixed-length blocks of data. Encrypts data one bit at a time.

You might also like