Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use idle to create a code for a cryptography assignment! Don't leave out any details and label every party of the code. Thank you.

Please use idle to create a code for a cryptography assignment! Don't leave out any details and label every party of the code. Thank you.
image text in transcribed
image text in transcribed
1. In dass we wrote a Python function to encrypt a message using the Caesar apher. For this homework assignment, write a fundion to deaypt a message using the Caesar apher Assume that you are given the dphertet and the searet key, and your function will deaypt the dphentet to plaintext. Alter you have written the function, decrypt the following message, given the secret key 15: htrgti 2. We leamed in dass about the polyalphabetic dpher that uses a word as the key for shifting the plaintext and oreating diphertext. The Autokeydpheris another kind of polyalphabetic dpher that uses a keyword ANDthe plaintext to shift the plaintext. For example, given the following plaintext and keyword: hello plaintext keyword by we would encrypt the plaintext by shifting each leter by the corresponding letter of the keyword folowed by the plaintext as folows: byehe hello h would be shifted by b, e would be shifted by y, 1 would be shifted by e, the next 1 would be shined by h, and the o would be shifted by e the apherif the keyword is shorter than the plaintext, we repeat the keyword. Withthe Awtokey apher we place the keyword infront of the plaintext and use that as the key to encrypt the plaintext. So, using this example, the fest three letters ofthe aphertext would be the same as with the polyalphabetic opher above The last two leeters woud be dierent becausethekerword does not repeat. The opherted for the example above is: write a function to implement the Autokey clpher. It should take as input parameters the plaintext and the keyword and it should retum the ciphertext. Test your program using the following examples: Python a shel

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_2

Step: 3

blur-text-image_3

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

A=(x:N+,y:N+,z:N+)B=(x:N+)Q=(x=xx

Answered: 1 week ago