What is the Difference Between Stream Cipher and Block Cipher

The main difference between stream cipher and block cipher is that the stream cipher converts the plain text to cipher text by taking one byte of plain text at a time, while the block cipher converts the plain text to cipher text by taking a block of plain text at a time.

Cipher is a set of mathematical rules or algorithms that helps to convert a plain text into an unreadable format, which is cipher text. In symmetric key ciphers, a single key is used for encryption and decryption. In overall, there are two types of symmetric key ciphers as stream ciphers and block ciphers. Furthermore, it is possible to apply this categorization to both modern ciphers and traditional ciphers.

Key Areas Covered

1. What is Stream Cipher
      -Definition, Functionality
2. What is Block Cipher
      -Definition, Functionality
3. Difference Between Stream Cipher and Block Cipher
     -Comparison of key differences

Key Terms

Block Cipher, Stream Cipher, Symmetric Key Cipher

Difference Between Stream Cipher and Block Cipher - Comparison Summary

What is Stream Cipher

In a stream cipher, the plain text is converted into cipher text by considering one byte at a time. A stream cipher uses a pseudorandom bit generator for encryption and decryption. It is capable of generating a random stream of bits called key stream. Furthermore, the cipher performs an Exclusive OR (XOR) to create the cipher text. In other words, it performs XOR on each bit of the key with the plain text to produce the cipher text.

Difference Between Stream Cipher and Block Cipher

What is Block Cipher

In block cipher, the plain text is divided into large blocks of size (64 bit or higher) and each block is encoded separately. The same encryption key is used for each block. Moreover, the encryption key helps to find which mathematical function to use on each block. However, using strong algorithms makes it difficult to find out the mathematical functions used on each block. Therefore, in block cipher, it might be difficult to reverse the encrypted text.

Difference Between Stream Cipher and Block Cipher

Definition

A stream cipher is a type of symmetric-key cipher that converts the plain text into cipher text by converting one byte of plain text at a time. In contrast, a block cipher is a symmetric key cipher that converts the plain text into cipher text by converting plaintext block-wise at a time. Thus, this is the main difference between stream cipher and block cipher.

Functionality

Stream cipher involves in dividing the plain text to bytes to convert it into cipher text while block cipher involves in dividing the plain text to large block sizes to convert it into cipher text.

Complexity

Complexity is another difference between stream cipher and block cipher. A stream cipher is complex than block cipher.

Bits

Stream cipher uses 8 bits of plain text at a time while block cipher uses 64 bit or more of plain text at a time.

Ability to reverse the plaintext

It is easier to reverse the encrypted text to plain text in a stream cipher. On the other hand, it is difficult to reverse the encrypted text to plain text in the block cipher. Hence, this is also a difference between stream cipher and block cipher.

Conclusion

In brief, the two types of symmetric key ciphers are stream ciphers and block ciphers. The main difference between stream cipher and block cipher is that the stream cipher converts the plain text to cipher text by taking one byte of plain text at a time, while the block cipher converts the plain text cipher to text by taking of block of plain text at a time.

References:

1.Thareja, Reema. Stream and Block Cipher, YouTube, 19 Nov. 2016, Available here.

Image Courtesy:

1.”1091256″ via Pixabay

About the Author: Lithmee

Lithmee holds a Bachelor of Science degree in Computer Systems Engineering and is reading for her Master’s degree in Computer Science. She is passionate about sharing her knowldge in the areas of programming, data science, and computer systems.

Leave a Reply