I'm not quite sure if I understood integrity deep enough.
Let's suppose that Alice and Bob are using a public-key algorithm and using signatures to assure their data integrity. A hacker was able to get their private keys, and is eavesdropping on their channel. The hacker is doing the following:
- Receive the message sent from Alice to Bob.
- Decipher it (he has Bob's private key).
- Read the message.
- Recipher it and rehash it (only the parts from the message which should be hashed. e.g the header).
- Resend it to Bob.
Let's exclude the point that Bob would receive the message twice, let's suppose that the hacker has the possibility to remove the original message from Alice after that he received it.
Would Bob be able to detect that someone else did read this message? If so, how?