
- Cryptography - Home
- Cryptography - Origin
- Cryptography - History
- Cryptography - Principles
- Cryptography - Applications
- Cryptography - Benefits & Drawbacks
- Cryptography - Modern Age
- Cryptography - Traditional Ciphers
- Cryptography - Need for Encryption
- Cryptography - Double Strength Encryption
- Cryptosystems
- Cryptosystems
- Cryptosystems - Components
- Attacks On Cryptosystem
- Cryptosystems - Rainbow table attack
- Cryptosystems - Dictionary attack
- Cryptosystems - Brute force attack
- Cryptosystems - Cryptanalysis Techniques
- Types of Cryptography
- Cryptosystems - Types
- Public Key Encryption
- Modern Symmetric Key Encryption
- Cryptography Hash functions
- Key Management
- Cryptosystems - Key Generation
- Cryptosystems - Key Storage
- Cryptosystems - Key Distribution
- Cryptosystems - Key Revocation
- Block Ciphers
- Cryptosystems - Stream Cipher
- Cryptography - Block Cipher
- Cryptography - Feistel Block Cipher
- Block Cipher Modes of Operation
- Block Cipher Modes of Operation
- Electronic Code Book (ECB) Mode
- Cipher Block Chaining (CBC) Mode
- Cipher Feedback (CFB) Mode
- Output Feedback (OFB) Mode
- Counter (CTR) Mode
- Classic Ciphers
- Cryptography - Reverse Cipher
- Cryptography - Caesar Cipher
- Cryptography - ROT13 Algorithm
- Cryptography - Transposition Cipher
- Cryptography - Encryption Transposition Cipher
- Cryptography - Decryption Transposition Cipher
- Cryptography - Multiplicative Cipher
- Cryptography - Affine Ciphers
- Cryptography - Simple Substitution Cipher
- Cryptography - Encryption of Simple Substitution Cipher
- Cryptography - Decryption of Simple Substitution Cipher
- Cryptography - Vigenere Cipher
- Cryptography - Implementing Vigenere Cipher
- Modern Ciphers
- Base64 Encoding & Decoding
- Cryptography - XOR Encryption
- Substitution techniques
- Cryptography - MonoAlphabetic Cipher
- Cryptography - Hacking Monoalphabetic Cipher
- Cryptography - Polyalphabetic Cipher
- Cryptography - Playfair Cipher
- Cryptography - Hill Cipher
- Polyalphabetic Ciphers
- Cryptography - One-Time Pad Cipher
- Implementation of One Time Pad Cipher
- Cryptography - Transposition Techniques
- Cryptography - Rail Fence Cipher
- Cryptography - Columnar Transposition
- Cryptography - Steganography
- Symmetric Algorithms
- Cryptography - Data Encryption
- Cryptography - Encryption Algorithms
- Cryptography - Data Encryption Standard
- Cryptography - Triple DES
- Cryptography - Double DES
- Advanced Encryption Standard
- Cryptography - AES Structure
- Cryptography - AES Transformation Function
- Cryptography - Substitute Bytes Transformation
- Cryptography - ShiftRows Transformation
- Cryptography - MixColumns Transformation
- Cryptography - AddRoundKey Transformation
- Cryptography - AES Key Expansion Algorithm
- Cryptography - Blowfish Algorithm
- Cryptography - SHA Algorithm
- Cryptography - RC4 Algorithm
- Cryptography - Camellia Encryption Algorithm
- Cryptography - ChaCha20 Encryption Algorithm
- Cryptography - CAST5 Encryption Algorithm
- Cryptography - SEED Encryption Algorithm
- Cryptography - SM4 Encryption Algorithm
- IDEA - International Data Encryption Algorithm
- Public Key (Asymmetric) Cryptography Algorithms
- Cryptography - RSA Algorithm
- Cryptography - RSA Encryption
- Cryptography - RSA Decryption
- Cryptography - Creating RSA Keys
- Cryptography - Hacking RSA Cipher
- Cryptography - ECDSA Algorithm
- Cryptography - DSA Algorithm
- Cryptography - Diffie-Hellman Algorithm
- Data Integrity in Cryptography
- Data Integrity in Cryptography
- Message Authentication
- Cryptography Digital signatures
- Public Key Infrastructure
- Hashing
- MD5 (Message Digest Algorithm 5)
- SHA-1 (Secure Hash Algorithm 1)
- SHA-256 (Secure Hash Algorithm 256-bit)
- SHA-512 (Secure Hash Algorithm 512-bit)
- SHA-3 (Secure Hash Algorithm 3)
- Hashing Passwords
- Bcrypt Hashing Module
- Modern Cryptography
- Quantum Cryptography
- Post-Quantum Cryptography
- Cryptographic Protocols
- Cryptography - SSL/TLS Protocol
- Cryptography - SSH Protocol
- Cryptography - IPsec Protocol
- Cryptography - PGP Protocol
- Image & File Cryptography
- Cryptography - Image
- Cryptography - File
- Steganography - Image
- File Encryption and Decryption
- Cryptography - Encryption of files
- Cryptography - Decryption of files
- Cryptography in IoT
- IoT security challenges, Threats and Attacks
- Cryptographic Techniques for IoT Security
- Communication Protocols for IoT Devices
- Commonly Used Cryptography Techniques
- Custom Building Cryptography Algorithms (Hybrid Cryptography)
- Cloud Cryptography
- Quantum Cryptography
- Image Steganography in Cryptography
- DNA Cryptography
- One Time Password (OTP) algorithm in Cryptography
- Difference Between
- Cryptography - MD5 vs SHA1
- Cryptography - RSA vs DSA
- Cryptography - RSA vs Diffie-Hellman
- Cryptography vs Cryptology
- Cryptography - Cryptology vs Cryptanalysis
- Cryptography - Classical vs Quantum
- Cryptography vs Steganography
- Cryptography vs Encryption
- Cryptography vs Cyber Security
- Cryptography - Stream Cipher vs Block Cipher
- Cryptography - AES vs DES ciphers
- Cryptography - Symmetric vs Asymmetric
Cryptography - Stream Cipher vs Block Cipher
Stream ciphers and Block ciphers are variants of symmetric key ciphers and are essentially used for encryption. It is converting (plaintext to ciphertext) more direct services must be used most of the time.
Understanding this chapter would enable you knows what stream ciphers are made of and why they do not resemble block ciphers.
What is Stream Cipher?
A stream cipher is an encryption method that combines a pseudorandom cipher digit stream with plain text digits. This pseudorandom encryption digit stream is applied one bit at a time to each binary digit. This encryption method employs an endless amount of pseudorandom cipher digits for each key.
- A stream cipher employs a key-based algorithm to encrypt an arbitrary amount of plain text one bit at a time.
- The pseudorandom cipher numbers should be unpredictable, and the key should never be used more than once for this type of encryption to be secure.
- The pseudorandom cipher digits are created using digital shift registers and several random seed values.
- Stream cipher is also known as State cipher. The name "state cipher" comes from the fact that each number's encryption depends on the current state of the cipher.
- The RC4 stream cipher is widely used in the software.
With a properly designed pseudorandom number generator, a stream cipher can be as safe as a block cipher of equal key length. The main advantage of a stream cipher is that it uses far less code and it is faster than block ciphers.
What is Block Cipher?
A block cipher is a symmetric cryptographic method that encrypts a fixed-size data block using a shared, secret key. Plaintext is used during the encryption process, and the encrypted text that comes is called ciphertext. The same key is used to encrypt both the plaintext and the ciphertext.
Data blocks of a fixed size are processed by a block cipher. A message's size usually is greater than the block size. As a result, the long message is split up into a number of consecutive message blocks, each of which is processed separately by the cipher.
A block cipher encrypts and decrypts its input one block at a time, rather than one bit at a time, using a shared secret key. Padding is unnecessary because the block's size is set. This algorithm is symmetric. Encryption uses a common key to convert textual input into cyphertext (encrypted text). During decryption, it uses the same key to transmit the cyphertext back into the original plaintext. The length of the input and the output are identical.
- The block cipher algorithm (AES) is commonly known under the names Data Encryption Standard (DES), TripleDES, and Advanced Encryption standard.
- A stream cipher is the inverse of a block cipher working on its input bit by bit using a shared key.
- Asymmetric or public-key cryptography are alternatives to block ciphers. This approach encrypts the plaintext with a public key and decrypts the ciphertext using a private key.
There are different modes of operation of a block cipher −
- Electronic Code Book (ECB) Mode
- Cipher Block Chaining (CBC) Mode
- Cipher Feedback (CFB) Mode
- Output Feedback (OFB) Mode
- Counter (CTR) Mode
These modes are a general block cipher's rules of operation. It is interesting to note that the various modes create different features that increase the block cipher's overall security.
Difference between Block Cipher and Stream Cipher
The below table shows the major differences between a block cipher and a stream cipher −
Key | Block Cipher | Stream Cipher |
---|---|---|
Definition | Block Cipher is the type of encryption where the conversion of plaintext is performed by taking its block at a time. | Stream Cipher is the type of encryption where the conversion of plaintext is performed by taking one byte of the plaintext at a time. |
Conversion of Bits | Since Block Cipher converts blocks at a time, it converts a more significant number of bits than Stream Cipher, which can convert 64 bits or more. | In the case of Stream Cipher, however, only 8 bits can be transformed at a time. |
Principle | Block Cipher uses both "confusion" and "diffusion" principle for the conversion required for encryption. | Stream Cipher uses only confusion principle for the conversion. |
Algorithm | For encryption of plain text Block Cipher uses Electronic Code Book (ECB) and Cipher Block Chaining (CBC) algorithm. | Stream Cipher uses CFB (Cipher Feedback) and OFB (Output Feedback) algorithm. |
Decryption | As a combination of more bits get encrypted in case of Block Cipher, so the reverse encryption or decryption is comparatively complex as compared to that of Stream Cipher. | Stream Cipher uses XOR for the encryption which can be easily reversed to the plain text. |
Implementation | Feistel Cipher is the most common Block Cipher implementation. | The main implementation of Stream Cipher is Vernam Cipher. |
Summary
Block ciphers are used to encrypt and decrypt data which operates in pre defined and fixed sizes using one key unlike the stream cipher that does so bit by bit. In confusion and diffusion, block ciphers use techniques such as ECB and CBC. On the other hand, Stream ciphers operate on fewer bits, and they only rely on confusion; they generally use XOR-operation for the encryption.