Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using python A polyalphabetic substitution cipher is made up of multiple simple substitution ciphers. For example, there might be five different simple substitution ciphers used:

image text in transcribedUsing python
A polyalphabetic substitution cipher is made up of multiple simple substitution ciphers. For example, there might be five different simple substitution ciphers used: the particular one used changes with the position of each character of the plaintext. For example: Assume we have a keyword: apple This keyword will repeat: appleappleapple.... The index of each letter in the keyword is the offset "n" (from your code in Lab1, but here you need to use the ASCII table). Our plaintext is: ENGINEER Our ciphertext will be: & > 753&53 if you use ord and chr with modulus 128 (the whole ASCII table) This is the encoding or encrypting part Now for the decrypting Assume you know the keyword: apple Given a ciphertext NT_Z._^PFZcMSEGQIOUcPFZT using ord and chr with modulus 128 What is the plaintext? In this lab, your job is to create the encryption and decryption function for the substitution cipher. Please allow the user to input any key. In the above example, it was APPLE, but it could be any keyword: WHITE, AVERYLONGWORDMANYTIMESOVER etc

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

More Books

Students also viewed these Databases questions

Question

Explain the causes of indiscipline.

Answered: 1 week ago

Question

4. Does cultural aptitude impact ones emotional intelligence?

Answered: 1 week ago