Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Affine Cipher on the alphabet Z

Valid keys for Affine Cipher

Consider the Affine Cipher on the alphabetZ26={A,B, . . . ,Z}with the usual identificationA=0,B=1, . . . ,Z=25, and the encryption function with key(a,b):C=aM+b(mod 26).1. Which of the following keys are valid? and why? (i)(3, 8)(ii)(8, 3)(iii)(5, 0)(iv)(0, 5)(v)(13, 1)2. For each of the above valid keys, determine the decryption function formula. (Please showall your working steps. Without any working steps then you will get 0.)3. Implement the cipher using C++ or Java.The program should be able to do both encryption and decryption. Lowercase charactersa-z will be encrypted/decrypted to lowercase characters. Uppercase characters A-Z will beencrypted/decrypted to uppercase characters. Other characters not in the range (a-z,A-Z)will be unchanged.The program should accept the following parameters: a flag to indicate encryption or de-cryption, a secret key, an input file name, and an output file name. For example:myProgram -key 3 8 -encrypt -in file1.txt -out file2.txtmyProgram -key 3 8 -decrypt -in file2.txt -out file3.txtThe program should be able to detect invalid key and display an error message if it encoun-ters an invalid key. (0.5 marks)4. Test your program (both encryption and decryption) with the keys in question 1 in this part.

support
close