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 keybank reads: pay 9100.00 GBP to 12345678Related terms
- AEAD — Authenticated encryption with associated data: encryption that keeps data secret and also detects any change to it or to an attached readable header.
- CTR mode — Counter mode: a way of using a block cipher that encrypts a running counter to make keystream, then combines that with the message using XOR.
- XOR — Exclusive or: a bit operation that outputs 1 when two bits differ and 0 when they match.
- integrity — The guarantee that data has not been changed, by accident or on purpose, without the change being detected.
Taught in
- Symmetric Encryption: AES-GCM & ChaCha20 — Cybersecurity Fundamentals, GRC & Cryptography