Cryptography Beginner Tutorial (v) Message authentication Code mac-message authentication Code

Source: Internet
Author: User
Tags hmac

6 important tools in the Cryptography Toolkit:

    • symmetric password
    • Public Key Password
    • One-way hash function
    • Message Authentication Code
    • Digital signatures
    • Pseudo-random number generator

The Mac recognizes tampering and spoofing, which means that both the integrity of the message and authentication can be confirmed.

The input of the message authentication code includes a message of any length and a key shared between the sender and the recipient, which can output fixed-length data, which is the Mac.

A message authentication code is a one-way hash function associated with a key.

Application example of message authentication code
    • SWIFT (Society for Wordwide Interbank Financial Telecommunication, World Bank Financial Telecommunications Association)

Between the bank and the bank is through Swift to pass the transaction message. In order to confirm the integrity of the message and verify the message, the message authentication code is used in Swift.

    • Ipsec

IPSec is a way to add security to the Internet Basic Communication Protocol-IP Protocol (Internet Protocol).

    • SSL/TLS

Communication protocols that we use in scenarios such as online shopping.

Realization method of message authentication code
    • Implemented using a one-way hash function

Message authentication codes can be implemented using a one-way hash function such as SHA-1, MD5, which is called an HMAC.

    • Using a block cipher implementation

Message authentication codes can be implemented using block ciphers such as Des and AES.

    • Other implementation methods

A message authentication code can also be implemented using a stream password and a public key password.

Hmac

HMAC is a method of constructing a message authentication code using a one-way hash function, where h is the meaning of the hash.

The HMAC constructed using SHA-1, MD5, and RIPEMD-160 are called Hmac-sha-1, Hmac-md5, and HMAC-RIPEMD, respectively.

Attack on message authentication code
    • Replay attack
    • How to defend against replay attacks
    • Serial number
    • Time stamp
    • Nonce
    • Key speculation attack

Cryptography Beginner Tutorial (v) Message authentication Code mac-message authentication Code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.