This is a Computer Science slide that gives information about Cryptography and its benefits to the general public. If anyone wants an understanding in Cryptography he / she can rely on this document as a reference.
2. Introduction
Block cipher operation involves encrypting data in fixed-size blocks to produce
ciphertext using a cryptographic key and algorithm. Block ciphers take a fixed
size of input and produce an output of the same size. There are different modes
of operation for block ciphers
3. Background
Introduction of Block Ciphers:
The concept of block ciphers was introduced to overcome the limitations of early
ciphers. In a block cipher, plaintext is divided into blocks of a fixed size, and each
block is encrypted separately. The first widely used block cipher was the Data
Encryption Standard (DES), developed by IBM in the 1970s.
4. Background
Advancements in Block Ciphers:
Over time, block ciphers have evolved to become more secure and efficient. DES
was replaced by the Advanced Encryption Standard (AES) in 2001, which uses a
larger block size and key length. Other notable block ciphers include Blowfish,
Twofish, and Serpent.
5. Types of block cipher mode of operations
Electronic Code Book (ECB),
Cipher Block Chaining (CBC),
Cipher Feedback Mode (CFB),
Output Feedback Mode (OFB),
Counter Mode (CTR).
6. Electronic Code Book (ECB)
ECB is the simplest mode of operation, where each block of plaintext is encrypted independently.
Encrypts each block independently, leading to repeated ciphertext for repeated plaintext blocks, which is
a security vulnerability.
It has the disadvantage of not hiding patterns in the plaintext, as identical plaintext blocks will result in
identical ciphertext blocks.
Each block of plaintext is encrypted independently using the same key.
Identical plaintext blocks result in identical ciphertext blocks, which can leak information and
patterns.
9. Cipher Block Chaining (CBC),
In CBC mode, each plaintext block is XORed with the previous ciphertext block before being
encrypted.
This helps to obscure patterns in the plaintext and makes the ciphertext more secure.
Uses an Initialization Vector (IV) and chains the ciphertext of each block to the next, preventing
repeating patterns.
Both encryption and decryption require the IV.
Provides better security than ECB and hides patterns in the plaintext.
12. Cipher Feedback Mode (CFB),
CFB mode uses the output of the encryption function to modify the plaintext, creating a
self-synchronizing stream cipher.
It is useful for encrypting data that does not come in fixed-size blocks, such as a serial
data stream.
Convert a block cipher into a stream cipher, encrypting/decrypting bit-streams directly
rather than fixed-size blocks.
Also provide the advantages of parallel processing and pre-computation.
14. Output Feedback Mode (OFB),
OFB mode generates a keystream independent of the plaintext or
ciphertext, which is then XORed with the plaintext to produce the
ciphertext.
This makes OFB mode resistant to errors in the ciphertext, as a single bit
error will only affect the corresponding bit in the plaintext.
Convert a block cipher into a stream cipher, encrypting/decrypting
bit-streams directly rather than fixed-size blocks.
Also provide the advantages of parallel processing and pre-
computation.
16. Counter Mode (CTR).
CTR mode uses a counter value that is incremented for each block, which is then encrypted and XORed
with the plaintext to produce the ciphertext.
CTR mode is parallelizable, meaning that each block can be encrypted independently, which can improve
performance.
Uses an incrementing counter instead of chaining, allowing parallel
encryption/decryption independent of block order.
Provides advantages of parallel processing and pre-computation over chained
modes like CBC.