Question: Random monoalphabet cipher. The Caesar cipher, which shifts all letters by a fixed amount, is far too easy to crack. Here is a better idea.

Random monoalphabet cipher. The Caesar cipher, which shifts all letters by a fixed amount, is far too easy to crack. Here is a better idea. For the key, don’t use numbers but words. Suppose the keyword is FEATHER. Then first remove duplicate let ters, yielding FEATHR, and append the other letters of the alphabet in reverse order. Now encrypt the letters as follows:

A B C D E F G H I J K L

Write a program that encrypts or decrypts a file using this cipher. The keyword is specified with the -k command line option. The -d command line option specifies decryption. For example,

M N O P Q R S T U V W X

decrypts a file using the keyword FEATHER. It is an error not to supply a keyword.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z FEATHRZY X W V USO PO N M L K J I G D C B

Step by Step Solution

3.36 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The provided information suggests the need to create a Java program that performs encryption and decryption using a modified monoalphabetic substitution cipher based on a keyword The keyword is used t... View full answer

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 Java Programming Questions!