Block mode family

AES-ECB

Electronic Codebook mode: each block encrypted independently, leaking plaintext patterns

legacy 3 variants NIST SP 800-38A

Overview

ECB (Electronic Codebook) is the simplest block cipher mode: every 16-byte block is encrypted independently with the same key. It is defined in NIST SP 800-38A for completeness but is unsuitable for encrypting more than one block of data.

Because identical plaintext blocks produce identical ciphertext blocks, ECB reveals the structure of the data. The classic demonstration is an encrypted bitmap image whose outline remains clearly visible. ECB also allows blocks to be reordered, removed or replayed without detection. It is only safe for single, random blocks. It needs no IV.

NextSSL includes AES-128-ECB, AES-192-ECB and AES-256-ECB. ECB is legitimately used as a building block, for example to encrypt a single random block or to implement other modes, and for compatibility with formats that mandate it. Some test suites and hardware engines expose ECB only as a primitive. Equal inputs always give equal outputs.

History

1980–2001
  1. ECB, CBC, CFB and OFB defined for DES in FIPS 81

  2. Carried over to AES in NIST SP 800-38A

Security notes

ECB leaks equality of plaintext blocks and provides no integrity. It must not be used to encrypt messages longer than one block or any structured data. Use AES-GCM, ChaCha20-Poly1305 or another AEAD instead.

Typical uses

Single-block encryption as a primitiveImplementing and testing other modesLegacy format compatibility

Variants in NextSSL

3
AlgorithmTierSizes (bytes)StandardsAPI
AES-128-ECB
aes-128-ecb
legacy FIPS key 16 · nonce 0 · block 16 NIST SP 800-38A root
AES-192-ECB
aes-192-ecb
legacy FIPS key 24 · nonce 0 · block 16 NIST SP 800-38A root
AES-256-ECB
aes-256-ecb
legacy FIPS key 32 · nonce 0 · block 16 NIST SP 800-38A root

Frequently asked questions

Which AES-ECB variants does NextSSL include?

NextSSL registers 3 AES-ECB variants: aes-128-ecb, aes-192-ecb, aes-256-ecb.