Message authentication code

a MAC consists of 3 algorithms:

  • key-gen
  • tag gen
  • verification

3 types of combining MAC with encryption:

  • encrypt then auth
  • auth then encrypt
  • encrypt and auth