Question: You will implement the following encryption scheme we discussed in class: E _ k ( x ) = ax + b mod 2 6 ,

You will implement the following encryption scheme we discussed in class:
E_k(x)= ax + b mod 26, where key k =(a, b)
Implement a cipher to operate on numbers in Z26={0,1,...,25}. Encryption is provided:
def encrypt(x, a, b):
return (a * x + b)%26
Write a function named "decrypt" that completes the encrypt function. You will need a helper function or data structure for decryption; name it "INVERSE".

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!