NEW
Also known as: ECB
A block cipher mode that encrypts each block independently, revealing patterns in structured data and generally discouraged for confidentiality.
DESCRIPTION
Electronic Codebook (ECB) is the simplest block cipher mode: each plaintext block is encrypted independently with the same key. While easy to implement and parallelize, ECB leaks patterns because identical plaintext blocks produce identical ciphertext blocks. This makes it unsuitable for most confidentiality purposes. ECB might appear in niche contexts like encrypting random data or as a building block in educational examples, but it should be avoided for real-world messages. Modern systems prefer modes that randomize encryption, such as CBC with IVs or AEAD modes like GCM.
ALTERNATIVE DEFINITIONS
NIST
In the ECB mode, the message is divided into blocks, and each block is encrypted independently.
Captures the defining independence of block encryption in ECB.
Wikipedia
Electronic codebook (ECB) mode encrypts identical plaintext blocks into identical ciphertext blocks, making it unsuitable for many uses.
Emphasizes pattern leakage and unsuitability for general confidentiality.
RELATED TERMS
Cipher Feedback Mode Output Feedback Mode Initialization Vector Padding Pattern Leakage Symmetric Block Cipher Algorithms Authenticated Encryption AES-GCM
COMPETING TERMS
KNOWLEDGE AREAS
Data Security Software Engineering
TARGET AUDIENCE
Security Architect Cybersecurity Engineer Software Developer DevOps Engineer
EXTERNAL SOURCES
- Wikipedia - Block cipher mode of operation
- NIST - Definition and properties of ECB mode
- Stanford University - Applied crypto notes discussing ECB pitfalls
TOP QUESTIONS
Why is Electronic Codebook discouraged?
ECB exposes patterns because identical plaintext blocks yield identical ciphertext, undermining confidentiality for structured data.
Category: Risks
Is Electronic Codebook ever acceptable?
Rarely. It may be acceptable for encrypting data with high entropy or as a building block in constructions, but generally avoid it.
Category: Opinion
What is a better alternative to Electronic Codebook?
Use CBC with random IVs or authenticated modes like GCM that randomize and protect integrity.
Category: Alternatives
What common mistake occurs with Electronic Codebook?
Encrypting images or structured records, revealing visible patterns and sensitive structure.
Category: Mistakes
Does Electronic Codebook require an IV or nonce?
No. ECB does not use an IV, which contributes to its pattern leakage.
Category: Definition
Is Electronic Codebook parallelizable?
Yes. ECB can be parallelized across blocks, but this benefit does not outweigh its security drawbacks.
Category: Performance
How is Electronic Codebook taught?
Often as a cautionary example demonstrating why modes like CBC or GCM are necessary.
Category: Example
What happens if padding is mismanaged in Electronic Codebook?
Padding errors can cause data corruption; even with correct padding, ECB’s pattern leakage remains.
Category: Mistakes
Is Electronic Codebook compliant with modern standards?
Standards define it, but guidance typically discourages its use for confidentiality in real-world applications.
Category: Compliance