Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Computer Science homework help

You are to implement a Message Authentication Code program in either C/C++ or Python.
See the following steps.
1. Accept a message as keyboard input to your program.
2. Accept a secret key for the sender/recipient as keyboard input to your program.
3. Your hash function H() is simply the checksum. To compute the checksum, you add all the characters of the string in ASCII codes. For example, the checksum of a string “TAMUC” would be 84 + 65 + 77 + 85 + 67 = 378.
Concatenate the secret key of the sender/recipient (from step 2) and the message (from step 1) and compute the checksum of the concatenated string. For ASCII codes, refer to the following website:
http://www.asciitable.com
4. Accept a secret key for the attacker as keyboard input to your program.
5. The attacker modifies the message from step 1. The original message can be modified any way you want.
6. Concatenate the secret key of the attacker (from step 4) and the modified message (from step 5) and compute the checksum of the concatenated string.
7. Concatenate the secret key of the sender/recipient (from step 2) and the modified message (from step 5) and compute the checksum of the concatenated string.
8. Compare the checksum from step 7 and the checksum from step 6. See if they match or not.
9. Compare the checksum from step 3 and the checksum from step 6. See if they match or not.
NOTE: your program should have separate functions for the checksum and the message modification by the attacker.