Question: PLEASE WRITE IN PYTHON USING JUPYTER NOTEBOOK Create a function affineDecrypt (ciphertext, a,b ) that returns the cipher text encrypted using key (a,b). You must

 PLEASE WRITE IN PYTHON USING JUPYTER NOTEBOOK Create a function affineDecrypt

PLEASE WRITE IN PYTHON

USING JUPYTER NOTEBOOK

Create a function affineDecrypt (ciphertext, a,b ) that returns the cipher text encrypted using key (a,b). You must verify that the gcd(a,26)=1. If this is not the case, the function must raise ValueError with message "The given key is invalid. The gcd (a,26) must be 1." . You may NOT use any built-in functions as part of your implementation, but you may use any functions you implemented in previous coding assignments. Please make sure to copy and paste them into this file, so that they are uploaded to CodePost when you submit your pa3.py file. def affinedecrypt (ciphertext, a,b) : "" "decrypts the string 'ciphertext', which was encrypted using an affine transforma INPUT : ciphertext - a string of encrypted letters a - integer satisfying gcd (a,26)=1. b - integer ouTPUT: The decrypted message as a string of characters "" pass

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!