• Networking
  • Programming
  • DBMS
  • Operating System
  • Internet
  • Hardware
  • Software

Tech Differences

Know the Technical Differences

Difference Between Block Cipher and Stream Cipher

Block cipher vs stream cipherBlock Cipher and Stream Cipher are the methods used for converting the plain text into cipher text directly and belong to the family of symmetric key ciphers.

The major difference between a block cipher and a stream cipher is that the block cipher encrypts and decrypts a block of the text at a time. On the other hand, stream cipher encrypts and decrypts the text by taking the one byte of the text at a time.

Content: Block Cipher Vs Stream Cipher

  1. Comparison Chart
  2. Definition
  3. Key Differences
  4. Conclusion

Comparison Chart

Basis for comparisonBlock cipherStream cipher
Basic

Converts the plain text by taking its block at a time.
Converts the text by taking one byte of the plain text at a time.
Complexity
Simple design

Complex comparatively
No of bits used
64 Bits or more
8 Bits
Confusion and Diffusion

Uses both confusion and diffusionRelies on confusion only
Algorithm modes used

ECB (Electronic Code Book)
CBC (Cipher Block Chaining)
CFB (Cipher Feedback)
OFB (Output Feedback)
Reversibility
Reversing encrypted text is hard.

It uses XOR for the encryption which can be easily reversed to the plain text.
Implementation
Feistel Cipher
Vernam Cipher

Definition of Block Cipher

Block Cipher takes a message and break it into a fixed size of blocks and converts one block of the message at an instant. For example, we have a message in plain text “STREET_BY_STREET” required to be encrypted. Using bock cipher, “STREET” must be encrypted at first, followed by “_BY_” and finally at last “STREET”.

In actual practice, communication takes place only in bits. Therefore, STREET actually means the binary equivalent of ASCII character of STREET. Subsequently, any algorithm encrypts these; the resultant bits are transformed back into their ASCII equivalent.

An evident problem regarding the usage of Block ciphers is repeating text, for which the same cipher is generated. Hence, it would give a hint to the cryptanalyst which makes it is easier to figure out the recurring strings of plain text. As a result, it can reveal the whole message.

To overcome from this problem the chaining mode is used. In this technique, the preceding block of cipher text is mixed with the current block, so as to the cipher text vague, this avoids the recurring patterns of blocks with the same content.

Definition of Stream Cipher

Stream Cipher typically encrypts one byte of the message at that moment instead of using blocks. Let’s take an example, suppose the original message (plain text) is “blue sky” in ASCII (i.e. text format). When you convert these ASCII into equivalent binary values, it will give the output in 0’s and 1’s form. Let it be translated in 010111001.

st

For encryption and decryption, a pseudorandom bit generator is used in which a key and plain text are loaded. A pseudorandom bit generator creates a stream of 8-bit numbers that are seemingly random known as keystream. Let the input key is 100101011. Now the key and plaintext are XORed.

The XOR logic is simple to understand. XOR produces an output of 1 when one input is 0, and the other is 1. The output is 0 if either both the inputs are 0 or both the inputs are 1.

  • Confusion is a method which guarantees that a cipher text gives no clue about the original plain text.
  • Diffusion is a strategy used to enhance the redundancy of the plain text by spreading it across rows and columns.

Key Differences Between Block Cipher and Stream Cipher

  1. Block cipher technique involves encryption of one block of text at a time, i.e. singly. Similarly, decrypt the text by taking one block after another. In contrast, Stream cipher technique involves encryption and decryption of one byte of the text at a time.
  2. Block cipher uses both confusion and diffusion while stream cipher relies only on confusion.
  3. The usual size of the block could be 64 or 128 bits in the Block cipher. As against, 1 byte (8 bits) at a time is converted in the stream cipher.
  4. Block cipher uses ECB (Electronic Code Book) and CBC (Cipher Block Chaining) algorithm modes. On the contrary, Stream cipher uses CFB (Cipher Feedback) and OFB (Output Feedback) algorithm modes.
  5. Stream cipher uses XOR function for converting the plain text into cipher text, that is the reason why it is easy to reverse the XORed bits. Whereas Block cipher does not use XOR for doing so.
  6. Block cipher uses the same key to encrypt each block while stream cipher uses a different key for each byte.

Conclusion

Block Cipher and Stream Cipher differ in the way in which plain text is encrypted and decrypted. The idea behind block cipher is to divide the plain text into blocks further encrypt those blocks. While stream cipher converts plain text bit by bit similar to stream.

Related Differences:

  1. Difference Between Confusion and Diffusion
  2. Difference Between Super Key and Candidate Key
  3. Difference Between Primary key and Foreign key in DBMS
  4. Difference Between Substitution Technique and Transposition Technique
  5. Difference Between DES (Data Encryption Standard) and AES (Advanced Encryption Standard)

Comments

  1. sairam says

    May 7, 2018 at 3:08 am

    Thank you.

    Reply
  2. Malick says

    May 26, 2018 at 9:07 am

    The content contain all the valuable information. Thank you

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top 10 Differences

  • Difference Between OLTP and OLAP
  • Difference Between while and do-while Loop
  • Difference Between Guided and Unguided Media
  • Difference Between Preemptive and Non-Preemptive Scheduling in OS
  • Difference Between LAN, MAN and WAN
  • Difference Between if-else and switch
  • Difference Between dispose() and finalize() in C#
  • Difference Between for and while loop
  • Difference Between View and Materialized View
  • Difference Between Server-side Scripting and Client-side Scripting

Recent Addition

  • Difference Between Java and Python
  • Difference Between PHP and HTML
  • Difference Between GPS and GNSS 
  • Difference Between Virtualization and Containerization
  • Difference Between Storage and Memory

Categories

  • Artificial Intelligence
  • DBMS
  • Hardware
  • Internet
  • Networking
  • Operating System
  • Programming
  • Software

Copyright © 2025 · Tech Differences · Contact Us · About Us · Privacy