(Solved) : P720 Random Monoalphabet Cipher Caesar Cipher Shifts Letters Fixed Amount Far Easy Crack B Q41353714 . . .

...P7.20 Random monoalphabet cipher. The Caesar cipher, which shifts all letters by a fixed amount, is far too easy to crack.

In PYTHON.

…P7.20 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. As the key, don’t use numbers but words. Suppose the key word is FEATHER. Then first remove duplicate letters, yielding FEATHR, and append the other letters of the alphabet in reverse order: F E A T H RZY X W V USQPON M L K J I GDC B Now encrypt the letters as follows: 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 FEATH RZY X W V US Q P O N M L K J I GDCB Write a program that encrypts or decrypts a file using this cipher. For example, crypt -d -kFEATHER encrypt.txt output.txt decrypts a file using the keyword FEATHER. It is an error not to supply a keyword. Show transcribed image text …P7.20 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. As the key, don’t use numbers but words. Suppose the key word is FEATHER. Then first remove duplicate letters, yielding FEATHR, and append the other letters of the alphabet in reverse order: F E A T H RZY X W V USQPON M L K J I GDC B Now encrypt the letters as follows: 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 FEATH RZY X W V US Q P O N M L K J I GDCB Write a program that encrypts or decrypts a file using this cipher. For example, crypt -d -kFEATHER encrypt.txt output.txt decrypts a file using the keyword FEATHER. It is an error not to supply a keyword.

Expert Answer


Answer to …P7.20 Random monoalphabet cipher. The Caesar cipher, which shifts all letters by a fixed amount, is far too easy to c…