What's the difference between Message Digest, Message Authentication Code, and HMAC?

后端 未结 2 1807
孤独总比滥情好
孤独总比滥情好 2020-12-22 18:09

My understanding of a message digest is that it\'s an encrypted hash of some data sent along with the encrypted data so you may verify that the data has not been tampered wi

2条回答
  •  时光说笑
    2020-12-22 18:36

    • A Message Digest is simply a hash of a message. It's the output of a cryptographic hash function applied to input data, which is referred to as a message.
    • A Message Authentication Code (MAC) is a piece of information that proves the integrity of a message and cannot be counterfeited easily.
    • A HMAC is a specific kind of MAC defined by RFC 2104.

    Wikipedia has good articles covering all these terms: see Message Digest, Message Authentication Code, and HMAC.

提交回复
热议问题