Electronic Codebook
The simplest of the encryption modes is the electronic codebook (ECB) mode (named after conventional physical codebooks. The message is divided into blocks, and each block is encrypted separately.
WARNING
ECB is not recommended for use in cryptographic protocols!
The disadvantage of this method is a lack of diffusion, wherein it fails to hide data patterns when it encrypts identical plaintext blocks into identical ciphertext blocks.
Encryption
Decryption
Relevant Note(s): Cipher Block Chaining