Message Authentication Codes are the codes which plays their role in two important functions : Authentication Detection and Falsification Detection.
Where do we need these codes ?
Suppose a User A send message to user B with message – ‘abc’. A encrypts the message using Shared – Key Cryptosystem for encrypting the message. A sends the key to B using a source key. Key exchange is based on different protocols such as Public – Key Cryptosytem. B uses the key to decrypt the Ciphertext and obatins the message.
All this does not happen so easily. There lies a problem.
If a malicious user X has falsified the ciphertext during the transmission. Then in that case, B has no way to realize that it has been falsified.When B decrypts the message, it will get the wrong message. Unknown to the fact B will think wrong information to be the right. Although you can decrypt or encrypt the data later on but these operations, you are applying on the wrong data.
Here we need to detect the falsification in the message B has got.
Here A will create a key (used to create Message Authentication Code) and sends the key to B. A will create a value using Ciphertext and key and the value is obtained. This value Created by Cipertext + Key = Message Authentication Code. B has to check whether the ciphertext is falsified or not using Message Authentication Code. Now B can clearly know that whether the ciphertext is falsified or not.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- How message authentication code works?
- hmac - Keyed-Hashing for Message Authentication
- What is HMAC(Hash based Message Authentication Code)?
- PGP - Authentication and Confidentiality
- Authentication in Computer Network
- Password Authentication Protocol (PAP)
- Types of Two-factor Authentication
- Difference between Authentication and Authorization
- What is AAA (Authentication, Authorization, and Accounting)?
- 3D passwords-Advanced Authentication Systems
- Challenge Handshake Authentication Protocol (CHAP)
- Computer Network | AAA (Authentication, Authorization and Accounting)
- Challenge Response Authentication Mechanism (CRAM)
- AAA (Authentication, Authorization and Accounting) configuration (locally)
- Message switching techniques
- Difference between Message and Packet Switching
- Message Digest in Information security
- Internet Control Message Protocol (ICMP)
- Digital Data Communications Message Protocol (DDCMP)
- Transforming a Plain Text message to Cipher Text
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.