## Block cipher vs stream cipher: What are the main differences?

**Advanced Encryption Standard (AES).** One of the most popular block cipher variants, AES can be used in various applications and many different industries, stretching from IT and cybersecurity to finance. In fact, AES is commonly used by top-level governmental and military agencies for secure communications. **Data Encryption Standard (DES).** Developed in the 70s, DES was one of the first cryptographic algorithms used for commerce and government affairs. It created a precedent for a new modern cryptographic algorithm to be developed. However, it’s no longer considered a secure method of encryption to use in modern applications. **Triple Data Encryption Algorithm (Triple DES).** Triple DES was created when DES could no longer secure against modern cryptography threats. It applies the DES algorithm to each plaintext block three times during the encryption process. However, Triple DES is now overshined by AES, an algorithm offering both better performance and more robust security.

**Rivest Cipher 4 (RC4).** An algorithm used for cryptographic applications in the past, RC4 was lauded for its simplicity and efficiency. However, modern cryptographic threats have pinpointed its vulnerabilities, and RC4 is no longer recommended to be used for secure encryption. **Salsa20.** Salsa20 became a popular encryption algorithm in the 00s thanks to its good performance, simple usage, and strong security. It stands out for its ability to serve as a base when building other cryptographic protocols. It’s still widely used for various applications. **Grain-128.** This algorithm was specifically designed to work in environments with limited computing resources. It’s typically used for devices that run on radio frequency and low-power sensors. Grain-128 is lightweight, efficient, and can offer robust security.

**Electronic codebook (ECB).** It’s one of the weakest operation modes because it encrypts and decrypts data blocks independently in the same exact way, making it easy for hackers to detect patterns. **Cipher block chaining (CBC).** This operation mode works by connecting plaintext blocks with previously encrypted plaintext blocks. However, this mode is slow and susceptible to manipulation. **Cipher feedback (CFB).** The CFB operates similarly to a stream cipher: It generates a keystream to encrypt the plaintext block using XOR. CFB’s main drawback is that an error in one blockchain can be carried into the next one. **Output feedback (OFB).** This mode works similarly to CFB by transforming a block cipher into a stream cipher. However, it does that without processing the plaintext in fixed-size blocks before encrypting it. **Counter (CTR).** The CTR mode transforms a block cipher into a synchronous stream cipher. It was designed to encrypt plaintext data of various lengths in situations when the streamed data is of variable length, for instance, in disk and network encryption.

**Synchronous.** As the name implies, synchronous stream ciphers require that both the sender and the receiver of the encrypted data would be in sync. These ciphers operate with the keystreams that don’t rely on the previous plaintext or ciphertext. **Asynchronous.** This stream cipher doesn’t rely on synchronization and is a good solution for mobile networks or variable-speed data transmission. Asynchronous stream ciphers usually generate their keystream based on the plaintext and previous ciphertext bits.

The post Block cipher vs stream cipher: What are the main differences? first appeared on NordVPN.

Advanced Encryption Standard block cipher cipher Comparisons cryptographic key cryptography Data Encryption Standard Grain-128 Rivest Cipher 4 Salsa20 stream cipher symmetric cryptography symmetric key symmetric key algorithm Tools Triple Data Encryption Algorithm