Question: . ( RSA Library ) Implement a library called rsa.py that provides functions needed for developing the RSA cryp tosystem. The library must support the
RSA Library
Implement a library called rsa.py that provides functions needed for developing the RSA cryp tosystem. The library must support the following API: rsa keygenlo hi generates and returns the publicprivate keys as a tuple ned picking prime numbers p and q needed to generate the keys from the interval lo hi encryptx n e encrypts x int using the public key n e and returns the encrypted value decrypty n d bitLengthn decbinn width bindecn decrypts y int using the private key n d and returns the decrypted value returns the least number of bits needed to represent n returns the binary representation of n expressed in decimal, having the given width and padded with leading zeros returns the decimal representation of n expressed in binary
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
