Integrity

Integrity refers to the process of preserving the accuracy and completeness of data over its entire lifecycle so that it cannot be modified in an unauthorized or undetected manner. This modification can happen maliciously (e.g., by an intermediary in the network) or inadvertently (e.g., because of a software or hardware failure).

Achieving integrity

Note: We have discussed in the previous chapter some techniques that can protect against accidental modifications, such as checksums and cyclic redundancy checks, so here we will focus on malicious modification that is more relevant in the context of security.

Hash value

A simple approach to protect the integrity of data is to calculate the hash value for a piece of data and send both the data and the hash, as shown in the following illustration:

Get hands-on with 1400+ tech skills courses.