Question: MASM Assembly language -- Message Encryption Pgm You are to write a program to input a text and a key and encrypt the text. I
MASM Assembly language -- Message Encryption Pgm
You are to write a program to input a text and a key and encrypt the text. I will supply you an encryption key consisting of multiple characters. Use this key to encrypt and decrypt the plain text by XOR-ing each character of the key against a corresponding byte in the message. Repeat the key as many times as necessary until all plain text bytes are translated. Suppose, for example, the key were equal to "ABXmv#7", you would then repeat the key down the text until the entire text was encrypted. This is how the key would align with the plain text bytes:
Plain Text: T h i s i s a P l a i n t e x t m e s s a g e . Key: A B X m v # 7 A B X m v # 7 A B X m v # 7 A B X m v # 7
Input file will be a Text line (one line) next input is the key. The file will have several sets of inputs.
Example Line One text abcKEY The second line of text KEYzyz133*$ ...
Output: print out line of original text, the encrypted text the decrypted text. A space line or two next lines...
Input file:
This is the first line of text to encrypt so have at it and have fun. AV)$'932jk My name is Secret Agent and I'm a counter spy for a large organization, the Itty Bitty Tinny Space ship to Mars program. (9^54~JHT<>"]}aqd The quarterly report in-house and confidential is being released on April 15 after the sun flair passes, Venus and mars are snuggle buddies and Haleys comet passed Jupiter. KiKjva*)(82199{}|x The 2017 thru 2022 future accounting target is $204,000,000 in cost projections, with #100,500,000 in expenses showing $103,500,000 profit. I think this will be good for us and bad for them. KHJ99*&$-";lkj:B:1](t& I wish to conclude that this message will self destruct in 20 seconds and will have an impact for the next 25 years, 157 days, 16.5 hours, 23 minutes and then start over. Keep this under raps. 8&45$:Aa~
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
