Question: Use python please Problem 4: Write a program to implement a CBC-MAC for arbitrary length messages using AES as block cipher. Input: your program should
Problem 4: Write a program to implement a CBC-MAC for arbitrary length messages using AES as block cipher. Input: your program should take command line arguments, ask the user if they want to generate or verify the authentication tag, if they want to generate the tag, it would take message as an input, and if they want to verify the tag, it would take both the message and the tag as input. Output: If the user wants to generate the tag, your program should print the authentication tag and if the user wants to decrypt the message, it should print "valid" if the tag is valid and print "invalid" if it is not. Problem 4: Write a program to implement a CBC-MAC for arbitrary length messages using AES as block cipher. Input: your program should take command line arguments, ask the user if they want to generate or verify the authentication tag, if they want to generate the tag, it would take message as an input, and if they want to verify the tag, it would take both the message and the tag as input. Output: If the user wants to generate the tag, your program should print the authentication tag and if the user wants to decrypt the message, it should print "valid" if the tag is valid and print "invalid" if it is not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
