Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hey guys just need help on swapping the nibbles Write an assembly language program to implement the following encryption/decryption algorithm. Your program will read in
Hey guys just need help on swapping the nibbles
Write an assembly language program to implement the following encryption/decryption algorithm. Your program will read in a key file, a message file to encrypt/decrypt, a user-entered password, and as an option, the number of rounds as in the following command line: (order is irrelevant) To encrypt: eryptor.exe - e - i - k - p [- r -o ] To decrypt: eryptor.exe -d -i - k - p [- r - o ] If no password is specified, the password will be "password" for that run of the program. The number of rounds " - r" is optional and will default to one with a maximum of three. I will provide a keyfile called "key.dat" and that should be used for testing your program, however you can rename it. The default output filename is the input filename with a ".enc" extension if encrypted and a ". dec" extension if decrypted. I provide a C shell program for every group to handle some of the mundane tasks such as parsing the command line input and hashing the password. The key file is 65537 bytes in length (indexed 0 to 65536) and that length is an integral part for allowing this simple algorithm to work - do not alter the length. Your program should read that key file into a global byte array that is exactly 65537 bytes in length. The SHA-256 hash will process the password and output 32 bytes of hash data into an array. This data will be used to get both the starting point and the hop count for the encryption/decryption. The first two bytes of the hash will be the starting point (0 - 65535) and the next two bytes will get the hop count (1 to 65536, use a zero to mean 65536). The following C code functionality must be accomplished in assembly language for(round = 0: roundStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started