Question: 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
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
Get step-by-step solutions from verified subject matter experts
