subject

Write the egcd function using the hints in the editor file. write a function called multinv that is given two integers (a and n) and returns the multiplicative inverse of a mod n. hint: call egcd(a, n) and return the first element of the tuple that you get back, modulo n. write a function called decrypt that accepts three numbers (c, m, and k) and returns the corresponding plaintext (p) value as a number. you can assume the modulus (n) is 256. you will need to compute the multiplicative inverse of m mod 256 to decipher c. write a function called decryptstring that accepts a ciphertext byte string, a multiplier (m), and shift amount (k). it returns an array of integers containing the decrypted values. for example, decryptstring(b'\xa7j##\x80', 31, 15) should return [104, 101, 108, 108, 111]. finally, write a function called lineardecipher that accepts a ciphertext byte string, a multiplier (m), and a shift amount (k). it returns the corresponding plaintext byte string.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
question
Computers and Technology, 22.06.2019 22:00
What is the name of the option in most presentation applications with which you can modify slide elements? 1. the option enables you to modify a slide element in most presentation applications.
Answers: 3
question
Computers and Technology, 23.06.2019 01:10
Problem 1 - hashing we would like to use initials to locate an individual. for instance, mel should locate the person mark e. lehr. note: this is all upper case. generate a hash function for the above using the numbers on your telephone. you know, each letter has a number associated with it, so examine your telephone keypad. generate 512 random 3 letter initials and take statistics on a linked list array size 512 to hold this information report how many have no elements, 1 element, 2 elements, does this agree with the hashing statistics distribution?
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
1. you have a small business that is divided into 3 departments: accounting, sales, and administration. these departments have the following number of devices (computers, printers, etc.): accounting-31, sales-28, and administration-13. using a class c private network, subnet the network so that each department will have their own subnet. you must show/explain how you arrived at your conclusion and also show the following: all available device addresses for each department, the broadcast address for each department, and the network address for each department. also, determine how many "wasted" (not usable) addresses resulted from your subnetting (enumerate them).
Answers: 3
You know the right answer?
Write the egcd function using the hints in the editor file. write a function called multinv that is...
Questions
question
Mathematics, 03.05.2020 13:27
question
Mathematics, 03.05.2020 13:27
Questions on the website: 13722359