0% found this document useful (0 votes)
10 views11 pages

Block Cipher Modes and AES Overview

The document discusses various modes of operation for block ciphers, including ECB, CBC, CFB, and OFB, highlighting their characteristics, advantages, and disadvantages. It also covers the Advanced Encryption Standard (AES) and its comparison with the outdated Data Encryption Standard (DES), along with key cryptographic concepts like traffic confidentiality, key distribution, and public key cryptography, specifically the RSA algorithm. Additionally, it addresses symmetric vs asymmetric encryption, authentication applications, and IP Security (IPSec) protocols.

Uploaded by

ahwanbisht213
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views11 pages

Block Cipher Modes and AES Overview

The document discusses various modes of operation for block ciphers, including ECB, CBC, CFB, and OFB, highlighting their characteristics, advantages, and disadvantages. It also covers the Advanced Encryption Standard (AES) and its comparison with the outdated Data Encryption Standard (DES), along with key cryptographic concepts like traffic confidentiality, key distribution, and public key cryptography, specifically the RSA algorithm. Additionally, it addresses symmetric vs asymmetric encryption, authentication applications, and IP Security (IPSec) protocols.

Uploaded by

ahwanbisht213
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

Modes of Operation of Block Ciphers

Block ciphers are symmetric encryption algorithms that operate on fixed-size blocks of plain-
text, typically 64 or 128 bits, and transform them into ciphertext using a secret key. However,
since messages are usually much longer than one block, different modes of operation are de-
fined to securely extend the cipher’s functionality to larger data streams.
Each mode defines how blocks are linked, how initialization values are chosen, and how
errors or patterns are handled. Choosing the correct mode is crucial for ensuring confidentiality
and preventing leakage of data patterns.

1.1 Electronic Codebook (ECB) Mode

In ECB mode, the plaintext is divided into fixed-size blocks, and each block is encrypted inde-
pendently using the same key:
Ci = EK (Pi )

where Pi and Ci denote the plaintext and ciphertext blocks respectively, and EK represents
encryption with key K.

Characteristics
• Simple and easy to implement.

• Parallelizable, allowing fast processing.

Disadvantages
• Identical plaintext blocks produce identical ciphertext blocks.

• Patterns in data become visible, which can reveal information even without the key.

Use Case
ECB is generally discouraged for encrypting large data or images, but may be acceptable for
small, random pieces of data such as encryption keys.

1
1.2 Cipher Block Chaining (CBC) Mode

CBC mode introduces dependency between blocks. Each plaintext block is XORed with the
previous ciphertext block before encryption:

Ci = EK (Pi ⊕ Ci−1 )

The first block uses an Initialization Vector (IV) instead of C0 :

C1 = EK (P1 ⊕ IV )

Advantages
• Hides plaintext patterns effectively.

• Suitable for bulk data encryption such as files and databases.

Disadvantages
• Encryption is sequential; cannot be parallelized.

• Requires an unpredictable IV for security.

Applications
Widely used in file encryption systems and older VPN implementations.

1.3 Cipher Feedback (CFB) Mode

CFB mode converts a block cipher into a self-synchronizing stream cipher. The previous ci-
phertext block is encrypted and XORed with the plaintext:

Ci = Pi ⊕ EK (Ci−1 )

Properties
• Can operate in smaller units (e.g., 8 bits), suitable for streaming data.

• Errors propagate only for a limited number of blocks.

Applications
Used in real-time communication channels and secure messaging systems.

2
1.4 Output Feedback (OFB) Mode

OFB mode also turns a block cipher into a synchronous stream cipher. Instead of using cipher-
text feedback, it uses the output of the previous encryption as input:

Oi = EK (Oi−1 ), Ci = Pi ⊕ Oi

Advantages
• No error propagation between blocks.

• Pre-computation of key streams possible.

Disadvantages
• Loss of synchronization between sender and receiver causes data corruption.

1.5 Advanced Encryption Standard (AES)

AES is a symmetric block cipher standardized by NIST in 2001 to replace DES. It operates on
128-bit blocks and supports key lengths of 128, 192, or 256 bits.

Structure
AES uses a substitution-permutation network (SPN) involving:

• SubBytes: Non-linear byte substitution using S-boxes.

• ShiftRows: Row-wise permutation.

• MixColumns: Column mixing to improve diffusion.

• AddRoundKey: XOR of round key with the state.

Strength
AES is efficient on both hardware and software platforms and resistant to known cryptana-
lytic attacks. It is the global standard for secure communication (e.g., HTTPS, Wi-Fi, disk
encryption).

3
2. DES and AES

2.1 Data Encryption Standard (DES)

DES was developed in the 1970s by IBM and adopted by NIST as a federal standard. It is a 64-
bit block cipher using a 56-bit key based on the Feistel structure with 16 rounds of processing.
Each round involves substitution and permutation operations, with key-dependent transfor-
mations. However, advances in computing power made brute-force attacks feasible, rendering
DES insecure.

2.2 Advanced Encryption Standard (AES)

AES was selected through an open competition to replace DES. It offers stronger security and
better performance.

Comparison Between DES and AES


• Block Size: DES uses 64 bits; AES uses 128 bits.

• Key Size: DES uses 56 bits; AES uses 128, 192, or 256 bits.

• Structure: DES is Feistel-based; AES is a substitution-permutation network.

• Security: AES resists differential and linear cryptanalysis; DES is vulnerable.

AES is now universally adopted for data security.

4
3. Cryptography Concepts

3.1 Traffic Confidentiality

Traffic confidentiality hides not just message contents but also communication patterns. Ob-
servers should not be able to deduce who is communicating, how often, or when.
Methods include:

• Padding messages to uniform length.

• Generating dummy traffic.

• Mixing real and fake packets.

3.2 Key Distribution

Key distribution is a critical challenge in symmetric cryptography. Common approaches:

• Physical exchange of keys.

• Key Distribution Centers (KDCs) as in Kerberos.

• Asymmetric encryption (e.g., Diffie–Hellman or RSA) to share symmetric keys.

3.3 Random Numbers

Random numbers are essential for secure cryptographic operations such as key generation, IVs,
and nonces. Predictable random numbers can compromise security.

3.4 Pseudo-Random Number Generation

Linear Congruential Generator (LCG)


An LCG is defined as:
Xn+1 = (aXn + c) mod m

Although fast, LCGs are predictable if parameters or states are known, making them unsuitable
for cryptography.

5
Blum Blum Shub (BBS)
A cryptographically secure PRNG:

Xn+1 = Xn2 mod M

where M = pq and p, q are large primes with p, q ≡ 3 (mod 4). The least significant bits of Xn
form the pseudo-random output. Its security relies on the hardness of integer factorization.

6
4. Public Key Cryptography

Public key cryptography introduced a paradigm shift by using two keys: a public key for en-
cryption and a private key for decryption. It solves the problem of secure key distribution.

4.1 RSA Algorithm

Developed by Rivest, Shamir, and Adleman, RSA is based on the mathematical difficulty of
factoring large numbers.
Steps:

1. Choose primes p, q.

2. Compute n = pq and ϕ(n) = (p − 1)(q − 1).

3. Select public exponent e, where gcd(e, ϕ(n)) = 1.

4. Compute private exponent d = e−1 mod ϕ(n).

5. Encryption: C = M e mod n

6. Decryption: M = C d mod n

4.2 Security of RSA

RSA’s security depends on the infeasibility of factoring large numbers (2048 bits or more).
Weak keys or poor random number generation can break it.

4.3 Key Management

Involves:

• Generation of secure keys.

• Distribution and certification.

• Secure storage and periodic renewal.

7
4.4 Diffie–Hellman Key Exchange

This protocol allows two parties to derive a shared secret over an insecure channel:

K = g ab mod p

Though it does not provide authentication by itself, it forms the basis of modern key exchange
mechanisms like TLS.

8
5. Symmetric vs Asymmetric Cryptography

5.1 Symmetric Encryption

Uses the same key for both encryption and decryption. Fast and suitable for large data volumes.
Examples: AES, DES, Blowfish.

5.2 Asymmetric Encryption

Uses a pair of keys: one public, one private. Provides confidentiality and digital signatures but
is computationally expensive.
Examples: RSA, ECC, Diffie–Hellman.

5.3 Comparison

• Symmetric is faster but requires secure key exchange.

• Asymmetric is slower but solves the distribution problem.

• Hybrid systems (like TLS) use both: asymmetric for exchanging symmetric keys.

9
6. Authentication Applications

6.1 Kerberos

Kerberos is a network authentication protocol using secret-key cryptography. It involves a Key


Distribution Center (KDC) that issues time-limited tickets to authenticate users without sending
passwords.

6.2 X.509 Directory Authentication

Defines a framework for public key certificates used in PKI. Certificates bind an identity to a
public key, verified by a Certificate Authority (CA).

6.3 S/MIME (Secure/Multipurpose Internet Mail Extensions)

S/MIME enhances email security through:

• Encryption for confidentiality.

• Digital signatures for authenticity.

• Message digests for integrity.

10
7. IP Security (IPSec)

7.1 Architecture

IPSec secures IP communication by authenticating and encrypting packets. It works at the


network layer and is transparent to applications.

7.2 Authentication Header (AH)

Provides data origin authentication and integrity for IP packets but does not encrypt payloads.

7.3 Encapsulating Security Payload (ESP)

Encrypts IP packet payloads and optionally provides authentication, ensuring confidentiality


and integrity.

7.4 Security Associations (SA)

Each SA defines parameters (encryption algorithms, keys, lifetime). SAs are unidirectional and
identified by a Security Parameter Index (SPI).

7.5 Key Management

IKE (Internet Key Exchange) automates negotiation and management of keys for IPSec con-
nections.

11

You might also like