bit-flipping attack

An attack that changes chosen bits of encrypted data so that, after decryption, the message says something different, without the attacker knowing the key.

In more detail

It works against encryption without an integrity check, especially stream-style modes such as CTR, where each ciphertext bit maps directly onto one plaintext bit. An attacker who knows the message format can, for example, turn a 0 into a 9 in a payment amount. Authenticated encryption such as AES-GCM stops it, because the edited ciphertext fails the tag check and nothing is released.

Examples

tampered[4] ^= ord("0") ^ ord("9")  # attacker knows the format, not the key
bank reads:  pay 9100.00 GBP to 12345678

Related terms

Taught in

References