Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your country is at war and your enemies are using a secret code tocommunicate with each other. You have managed to intercept amessage that reads
Your country is at war and your enemies are using a secret code tocommunicate with each other. You have managed to intercept amessage that reads as follows:
:mmZdxZmxZpgy
The message is obviously encrypted using the enemy's secret code.You have just learned that their encryption method is based uponthe ASCII code. Individual characters in a string are encoded usingthis system. For example, the letter A is encoded using thenumber and B is encoded using the number and so on Googlefor the ASCII table for conversion.
Your enemy's secret code takes each letter of the message andencrypts it as follows:
If OriginalChar Key then
EncryptedChar OriginalChar Key
Else
EncryptedChar OriginalChar Key
For example, if the enemy uses Key then the message "Hey"would be encrypted as:
ASCII Conversion
H
e
y
Encrypted H R in ASCII
Encrypted e o in ASCII
Encrypted y $ in ASCII
Consequently, "Hey" would be transmitted as Ro$
Write a program that decrypts the intercepted message. You onlyknow that the key used is a number between and Your programshould try to decode the message using all possible keys between and When you try the valid key, the message will make sense.For all other keys, the message will appear as gibberish.
Can I get this program to be able to be ran in C
Step 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