Question: Problem 1 . ( Reverse ) Implement the function _ reverse ( ) in reverse.py that reverses the one - dimensional list a in place,
Problem Reverse Implement the function reverse in
reverse.py that reverses the onedimensional list in place, ie without creating a new list.
Problem Euclidean Distance Implement the function distance in
distance.py that returns the Euclidean distance between the vectors and represented as onedimensional lists of floats. The Euclidean distance is calculated as the square root of the sums of the squares of the differences between the corresponding entries. You may assume that and have the same length.Problem Transpose Implement the function transpose in transpose.py that creates and returns a new matrix that is the transpose of the matrix represented by the argument a Note that a need not have the same number rows and columns. Recall that the transpose of an mby n matrix A is an nby m matrix B such that BijAji where i n and j m
Problem Palindrome Implement the function isPalindrome in
palindrome.py that returns True if the argument is a palindrome ie reads the same forwards and backwards and False otherwise. You may assume that is all lower case and doesn't contain any whitespace characters
Assignment RSA Crpytosystem
Problem Sine Function Implement the function sin in
sinpy that calculates the sine of the argument in radians using the formula
cdots.Part II: RSA CryptosystemBackground: RSA RivestShamirAdleman cryptosystem is widely used for secure communication in browsers, bank ATM machines, credit card machines, mobile phones, smart cards, and operating systems. It works by manipulating integers. To thwart eavesdroppers, the RSA cryptosystem must manipulate huge integers hundreds of digits which is naturally supported by the int data type in Python. Your task is to implement a library that supports core functions needed for developing the RSA cryptosystem, and implement programs for encrypting and decrypting messages using RSA.
The Math Behind: The RSA cryptosystem involves three integers and that satisfy certain mathematical properties. The public key is made public on the Internet, while the private key is only known to Bob. If Alice wants to send Bob a message xin she encrypts it using the function
modn,
where for two distinct large prime numbers and chosen at random, and is a random prime number less than such that does not divide
For example, suppose and Then and Further suppose If Alice wants to send the message to Bob, she encrypts it as
mod
When Bob receives the encrypted message he decrypts it using the function
modn,
where din is the multiplicative inverse of emodm, ie is an integer that satisfies the equation edmodm
Continuing the example above, if then when Bob receives the encrypted message from Alice, he decrypts it to recover the original message as
mod
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
