I'm taking the course computer networks and we currently had our second lecture. We got the following question:

What are the differences between integrity and confidentiality of a message? Is confidentiality possible without integrity? What about integrity without confidentiality? Explain.

From what I understand the main difference between confidentiality and integrity is that "confidentiality" should prevent from spying on the message / intruders. And "integrity" is to ensure that the original message hasn't been altered in any way (modification/deletion/insertion).

What I'm unsure about: Does confidentiality mean that a possible interuder can't decode the ciphertext, or does this mean he can't even intercept the cipher?

To the two questions about the dependecies of integrity and confidentiality: At first I thought: If an intruder can't intercept the message (break confidentiality), there's no way he can alter the message in any way (break integrity). But the more I think about that, the less certain I become. Especially when I think about deletion of a message.

Thanks a lot in advance for clearing things up.

P.S: I hope "confidentiality" and "integrity" are the right terms in English. We learned "Vertraulichkeit" & "Integrität" in German.

  • $\begingroup$ "Confidentiality" usually means that that attacker can't decode the ciphertext. We rarely talk about the attacker being unable to intercept a message. $\endgroup$ Commented Sep 26, 2017 at 22:03

1 Answer 1


Confidentiality means that only the sender and receiver know the message. We ensure confidentiality by encrypting the message.

Integrity roughly means that the message being sent cannot be modified in transit. In more detail, it means that there is a way for the receiver to check that the message has not been tampered with. We ensure integrity by adding a hash or checksum to the message.

The two properties are completely independent:

  • Confidentiality without integrity: Suppose I am sending you a cryptographic key, encrypted using a key we share. An attacker replaces the message with garbage having the same format. You will not notice any difference. The attacker has no way to read the original message, but they can modify it without you knowing it.

  • Integrity without confidentiality: I can send you a signed message by encrypting a hash of the message using my private key. Anybody can verify that the hash matches the message using my public key, but I'm the only person who can sign it. There is no way to modify the message without invalidating the signature, but the message itself is free for all to see.

  • $\begingroup$ Signing is not encrypting a hash. Signing is not "encrypting using the private key". crypto.stackexchange.com/q/43894/351, crypto.stackexchange.com/q/2123/351 $\endgroup$
    – D.W.
    Commented Sep 27, 2017 at 7:17
  • $\begingroup$ If I gave a class in cryptography that's how I would describe it. You compute the hash of the message, and then you do something with it that requires the private key and only you can do it. If you don't like the name encryption you can substitute some other name (say, decryption). $\endgroup$ Commented Sep 27, 2017 at 7:29
  • $\begingroup$ I hear you. The operation that you do with it is not the same operation as encryption, nor is it the same operation as decryption. (It is the same only for RSA, and only for the textbook version of RSA -- i.e., the simplified version of RSA that is presented in textbooks, but isn't actually secure.) I know many teachers do teach it that way, but my personal impression is that it causes as much confusion as clarity. Anyway, it's a minor detail. $\endgroup$
    – D.W.
    Commented Sep 27, 2017 at 15:24
  • 1
    $\begingroup$ A nice addition would be to talk about how integrity and authentication interact. In a non-adversarial context, a checksum may be added to ensure integrity without providing any notion of authentication. In an adversarial context, of course, the attacker can simply replace the message entirely and calculate a new checksum. It may be worth emphasizing that you virtually never want confidentiality without integrity. Cryptographic protocols that skimp on the integrity aspect (even just partially in many cases) are often very broken. $\endgroup$ Commented Sep 27, 2017 at 23:30
  • 1
    $\begingroup$ As a simple example of the last, say I'm sending a message to General Alice: "The attack is coming from the east." I sign and encrypt it. Agent Mallory intercepts it, and while she doesn't know what it says, she imagines it will create confusion if she reroutes it, and so she sends it to General Bob who dutifully verifies its authenticity. In this case, though, we've lost the integrity of the intended recipient. If I had signed and encrypted, "General Alice, the attack is coming from the east," General Bob would not have been misled. $\endgroup$ Commented Sep 27, 2017 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.