[Solved] Cryptanalysis

$25

File Name: Cryptanalysis.zip
File Size: 122.46 KB

SKU: [Solved] Cryptanalysis Category: Tag:
5/5 - (1 vote)

Cryptanalysis

Your country is at war and your enemies are using a secret code to communicate with each other. You have managed to intercept a message that read as follows::mmZdxZmx]ZpgyThe message is obviously encrypted using the enemys secret code. You have just learned that their encryption method is based upon the ASCII code. Individual characters in a string are encoded using this system. Forexample, the letter `A is encoded using the number 65 and `B is encoded using the number 66.Your enemys secret code takes each letter of the message and encrypts it as follows (using a secret key):If (OriginalChar + Key > 126) thenEncryptedChar = ((OriginalChar + Key) 127) + 32ElseEncryptedChar = (OriginalChar + Key)For example, if the enemy uses Key = 10 then the message Hey would beencrypted as:Character ASCIIH 72e 101y 121Encrypted H = (72 + 10) = 82 = R in ASCIIEncrypted e = (101 + 10) = 111 = o in ASCIIEncrypted y = 32 + ((121 + 10) 127) = 36 = $ in ASCIIConsequently, Hey would be transmitted as Ro$.Write a program that decrypts the intercepted message. You only know that the key used is a number between 1 and 100. Your program should try to decode the message using all possible keys between 1 and 100. Whenyou try the valid key, the message will make sense. For all other keys, the message will appear as gibberish.HINT: since the string has a nin it, be sure to escape it with an additional n. You will want to put the following into your Java program.:mmZ\dxZmx]Zpgy

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Cryptanalysis
$25