Most developers learn a hard lesson at some point in their careers: just because data is encrypted doesn't mean it’s safe from tampering.

It’s an easy trap to fall into. If an attacker doesn't have the secret key, they can't read the data. And if they can't read it, how could they possibly modify it to do something malicious?

But cryptography is unforgiving, and it treats secrecy and integrity as two entirely separate jobs. This exact misunderstanding is what makes the CBC (Cipher Block Chaining) Bit Flipping attack possible.

Here is a look at how an attacker can manipulate encrypted data without ever knowing the secret key.

The Problem with Chaining Blocks