Skill 5.1.2
Integrity and authenticity
Key Concepts
Integrity is verified with hash functions: any change to the data produces a different digest. A plain hash does not prove who created the data, because an attacker can modify data and recompute the hash.
Authenticity adds proof of origin. A message authentication code such as HMAC combines a hash with a shared secret key, proving that a key holder created it. A digital signature uses the sender's private key and also provides non-repudiation. Authenticated encryption modes such as AES-GCM provide confidentiality and integrity together.