Data Privacy and Integrity
Data privacy and integrity use encryption techniques to make sure unauthorized entities can’t see or modify sensitive data. These techniques are also used when a principal needs to prove it originated a message. Encryption can either use the same key to encrypt and decrypt a message, or use a public-private key pair, where encrypted data using the public key can only be decrypted using the private key, and vice versa.
Data integrity is maintained by using one-way hash functions. These functions generate fixed-length output from input. When sending a message, the sender runs the one-way hash function on the message, encrypts the resulting hash value, and sends the resulting message identification code (MIC) along with the message. The recipient runs the same function on the message, decrypts the MIC, and sees if the results match. A match indicates that the message has not been tampered with.