Question: 3 . Write a program called FindKeyLength.java or findkeylength.py based on the following pseudocode to determine the likely length of the key used to create

3. Write a program called FindKeyLength.java or findkeylength.py based on the following pseudocode to determine the likely length of the key used to create the above ciphertext. This is the technique described in section 2.3.1. You may hardcode the ciphertext as a string in the program.
for displacement =1 to 15 do
coincidenceCount =0
for index =0 to ciphertext length -1 do
displacedIndex =(index + displacement)% ciphertext length
if ciphertext[index]== ciphertext[displacedIndex] then
coincidenceCount++;
print displacement, coincidenceCount
4. Which displacement has the highest coincidence count? This is the likely length of the keyword. Write down that length.
5. Please break the above ciphertext using an online resource to help. There are some sites that, given the ciphertext and the estimated key length, determine the key word and provide the plaintext. Format the plaintext by adding word spaces and punctuation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!