Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN PYTHON PLEASE! From what I'm seeing you can use any cypher of your choosing as long as we can type it in. Make sure

IN PYTHON PLEASE!

From what I'm seeing you can use any cypher of your choosing as long as we can type it in. Make sure to include input validation for the encrypting part tho!!

CANNOT USE FUNCTIONS!!

image text in transcribed
- Create one dictionary of the substitution key This will be used to both encovet and deconet the messoges. There are 26 t unique possibilities: - Allow the use to choose to encrypt or decrypt a message. - Display the result of your algorithm. - Allow the user to continue until stopped. - Case is irrelevant. To test your program: - Encrypt a message. - Input the outputted sypher and decrypt. - You should get the original message back. The basic idea of a substitution cipher is a simple one: take one letter in your message, let's say 'A', and replace it with a different letter, such as 'E': Sounds familiar? Both the Atbash and Caesar ciphers used this basic principle, however they both have one weakness: predictability. Figure out how a handful of letters had been encrypted and you can pretty much break the entire message. (Leam more about how these ciphers work in my previous post Encryption 101: Aack to basics.) The substitution cipher, however, takes this idea to the next level and provides a 'random' alphabet to encrypt the message. In other words, each letter is encrypted with its own key. The table below displays an alphabet that I chose at random, simply placing letters in different locations until it was complete. This new alphabet makes figuring out the relationship between the plaintext and the ciphertext a lot harder, as the confusion that the cipher provides has been increased. The diffusion, however, is stil fairy low - changing one letter in the plaintext will still only change one letter in the cigtertext-but this won't really increase in complexity until we start looking at more modern examples. However, while the Athash cipher had just one key and the Caesar cipher had 25, the substitution cipher has 26 (factorlal) unique keys. This works out to about 403,291,461,126,605,635,584,000,000 different ways to write the alphabet! As you can see, the number of koys increases rapidly the more the ciphers advance

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

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

Students also viewed these Databases questions