Data integrity is the protection of data against creation, alteration, deletion, duplication or re-ordering by unauthorized entities (organizations, people, machines, processes). Integrity violation is always caused by active attacks. More specifically, integrity refers to the trustworthiness of information resources.
Data integrity is the assurance of non-alteration: the data (either in transit or in storage) has not been undetectably altered whether by accident or deliberately malign activity. Clearly, such assurance is essential in any kind of business or electronic commerce environment, but it is desirable in many other environments as well.
The integrity of an information system includes only preservation without corruption of whatever was transmitted or entered into the system, right or wrong. In order to thwart deliberate data manipulation by a determined adversary whose goal is to modify the content of the data for his or her own gain, cryptographic techniques are required. Thus, appropriate algorithms and keys must be employed and commonly understood between the entity wanting to provide data integrity and the entity wanting to be assured of data integrity.