🔐

Encryption & MACs Overview

Jun 23, 2025

Overview

This lecture covers the roles of symmetric and asymmetric encryption in secure communication, explains message authentication codes (MACs), and describes how they help ensure message integrity and authenticity.

Symmetric vs. Asymmetric Encryption

  • Asymmetric encryption enables secure communication over untrusted channels but is computationally expensive and complex.
  • Symmetric encryption is faster and more efficient, especially for encrypting large amounts of data.
  • Secure systems often use asymmetric encryption to exchange the symmetric key, then switch to symmetric encryption for bulk data transfer.

Key Exchange and Hybrid Approaches

  • Asymmetric encryption is commonly used as a key exchange mechanism to securely transmit the symmetric key.
  • After the key is shared, most communication uses fast symmetric encryption.

Message Authentication Codes (MACs)

  • A MAC verifies message authenticity and integrity, confirming the sender and ensuring no unauthorized changes.
  • The secret key used to generate the MAC is also used to verify it, similar to symmetric encryption.
  • MACs require the secret key to be agreed upon or securely exchanged beforehand.

HMAC and CMAC

  • HMAC (Keyed Hash Message Authentication Code) combines a secret key with a cryptographic hash function (e.g., SHA-1, MD5) to generate a MAC.
  • The MAC is sent with the message; the receiver computes the MAC on the received message and compares it for authentication.
  • CMAC (Cipher-based Message Authentication Code) uses symmetric encryption ciphers like DES or AES instead of hash functions.
  • CBCMAC (Cipher Block Chaining MAC) uses block ciphers in CBC mode, chaining encrypted blocks for integrity and authenticity.

Key Terms & Definitions

  • Symmetric Encryption — Encryption using a single shared key for both encryption and decryption.
  • Asymmetric Encryption — Encryption using a public-private key pair for secure communication.
  • MAC (Message Authentication Code) — A code guaranteeing message authenticity and integrity, generated and verified with the same key.
  • HMAC — A MAC based on a hash function combined with a secret key.
  • CMAC — A MAC based on a symmetric key block cipher.
  • CBCMAC — A MAC using block cipher in CBC mode for message integrity.

Action Items / Next Steps

  • Review how hybrid encryption schemes combine symmetric and asymmetric methods.
  • Study the process of generating and verifying MACs, especially HMACs and CBCMACs.