About Lesson
Block Ciphers vs. Stream Ciphers
Symmetric encryption algorithms can be categorized into two types based on how they process the data: block ciphers and stream ciphers.
Block Ciphers:
- Block ciphers process data in fixed-size blocks (e.g., 128 or 256 bits) at a time.
- If the message is shorter than the block size, padding is added to fill the block.
- Block ciphers use modes of operation to handle data that exceeds a single block, such as Electronic Codebook (ECB) or Cipher Block Chaining (CBC).
- Examples: AES (Advanced Encryption Standard), DES (Data Encryption Standard), and Triple DES (3DES).
Stream Ciphers:
- Stream ciphers encrypt data bit by bit or byte by byte, making them suitable for real-time applications like video streaming or voice calls.
- Stream ciphers use a keystream, which is combined with the plaintext to produce the ciphertext.
- Examples: RC4 and Salsa20.