Source: wikibot/message-authentication-codes

= Message authentication codes
{wiki=Message_authentication_codes}

Message Authentication Codes (MACs) are cryptographic constructs used to verify the integrity and authenticity of a message. A MAC is generated by applying a cryptographic hash function or a symmetric key algorithm to the message data combined with a secret key. This results in a fixed-size string of bits (the MAC), which is then sent along with the message. \#\#\# Key Features of MACs: 1. **Integrity**: MACs ensure that the message has not been altered in transit.