Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in Java to decrypt a simple substitution cipher. Your program should take the ciphertext as input, then 1. Compute and display letter

Write a program in Java to decrypt a simple substitution cipher. Your program should take the ciphertext as input, then

1. Compute and display letter frequency counts.

2. Allow the user to guess a key and display the results of the corresponding "decryption" with the putative key.

3. Allow the user to try step 2 as many times as needed until getting the correct plaintext (the text that makes sense). Alternatively, you can allow the user to try each mapping one by one. For example, the user can choose to substitute 'C' as 'a', and see the result after substitution. Your goal is to be able to find the key. Finally, output the correct key in all UPPERCASES, so that the first letter is the corresponding ciphertext for plaintext 'a', the second letter is mapping to 'b', ..., the 26th letter is mapping to 'z'.

For example, key=LHFGKTMPZECBQRIYAUSODJWNVX means...

image text in transcribed

[plaintextCIPHERTEXTaLbHcFdGeTfMhPhZjEkCmBnQoRpIqYrAsUtSuOvDwJxWyNzVX]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Design a training session to maximize learning. page 296

Answered: 1 week ago

Question

Design a cross-cultural preparation program. page 300

Answered: 1 week ago