Data Integrity

The assurance that data remains accurate, complete, and uncorrupted throughout its entire lifecycle.

To maintain data integrity during transmission, protocols use Checksums (like CRC32) or Message Authentication Codes (MACs). To guarantee non-repudiation (proving who created the data), asymmetric cryptography is used to create digital signatures. In smart contracts, data integrity implies that the state of the contract changes exactly as defined by the code, with no possibility of arbitrary memory manipulation.

        graph LR
  Center["Data Integrity"]:::main
  Rel_data_recovery["data-recovery"]:::related -.-> Center
  click Rel_data_recovery "/terms/data-recovery"
  Rel_data_obfuscation["data-obfuscation"]:::related -.-> Center
  click Rel_data_obfuscation "/terms/data-obfuscation"
  Rel_data_replication["data-replication"]:::related -.-> Center
  click Rel_data_replication "/terms/data-replication"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧠 Knowledge Check

1 / 5

🧒 Explain Like I'm 5

Imagine you have a puzzle, and you take a picture of the finished puzzle. If your little brother later swaps out a few pieces, you can compare the puzzle to your picture and immediately know it was messed with. Data integrity is like taking that 'picture' (using math) so that computers always know if information has been changed, broken, or stolen.

🤓 Expert Deep Dive

The CIA Triad
Data Integrity is the 'I' in the core information security model known as the CIA Triad (Confidentiality, Integrity, Availability). It is crucial to distinguish integrity from confidentiality: a digitally signed public message has perfect integrity (it cannot be altered) but zero confidentiality (anyone can read it).

Cryptographic Proofs of Integrity
In Web3, integrity is the foundational property of the ledger. It relies on deterministic cryptographic hash functions (like SHA-256). Any alteration to a transaction—even changing a single bit—produces a completely different hash (the avalanche effect). Because blocks include the hash of the previous block, modifying historical data requires recalculating all subsequent blocks and out-pacing the computational power of the honest network (a 51% attack).

❓ Frequently Asked Questions

What is the difference between data integrity and data security?

Data security is the broad practice of protecting data from all threats. Data integrity is one specific pillar of security that ensures the data is accurate and hasn't been altered. Another pillar is confidentiality, which ensures the data is kept secret.

How does a blockchain ensure data integrity?

A blockchain uses cryptography (specifically hashing). Every block contains a mathematical 'fingerprint' of all the data inside it, plus the fingerprint of the previous block. If anyone tries to change past data, all the fingerprints break, instantly alerting the network to the tampering.

What is a checksum?

A checksum is a small-sized block of data derived from another block of digital data. It is used to detect errors that may have been introduced during transmission or storage.

📚 Sources