Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use python program to answer it thanks Part VI: The Double Cipher: Decryption (20 points) Write a function de.decry pt 0 that takes the

Please use python program to answer it thanks
image text in transcribed
Part VI: The Double Cipher: Decryption (20 points) Write a function de.decry pt 0 that takes the following arguments, in this onder 1. encrypted: an encrypted message to be decrypted 2. filename: a file that contains the 6 x 6 encryption key Your function should take the encrypted string and then decrypt it by applying the mechanism explained in part V backwards: (1) map encrypted letters to row/column pairs; (2) separate the row/column pairs into a list of single numbers; (3) divide the list of numbers in half and overlay the halves to recover the original plaintext row/column pairs; and (4) map the plaintext row/column pairs to the unencrypted plaintext characters. In the end, return the decrypted message. Examples: Return Value STONYBROOK' SUFFOLKCOUNTY CSE101ISEASY Function Call dc decrypt J418FR9939,'keyl.txt) de.decrypt(GFOOKXEFOBTK3','keyl.txt' dc.decrypt('J6GI 6SJROSEY','key2.txt') Part VI: The Double Cipher: Decryption (20 points) Write a function de.decry pt 0 that takes the following arguments, in this onder 1. encrypted: an encrypted message to be decrypted 2. filename: a file that contains the 6 x 6 encryption key Your function should take the encrypted string and then decrypt it by applying the mechanism explained in part V backwards: (1) map encrypted letters to row/column pairs; (2) separate the row/column pairs into a list of single numbers; (3) divide the list of numbers in half and overlay the halves to recover the original plaintext row/column pairs; and (4) map the plaintext row/column pairs to the unencrypted plaintext characters. In the end, return the decrypted message. Examples: Return Value STONYBROOK' SUFFOLKCOUNTY CSE101ISEASY Function Call dc decrypt J418FR9939,'keyl.txt) de.decrypt(GFOOKXEFOBTK3','keyl.txt' dc.decrypt('J6GI 6SJROSEY','key2.txt')

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

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions