Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions Please work on this assignment individually In this assignment, you will review Java programming skills. Read Java API documentation of BigInteger class by clicking

image text in transcribed
image text in transcribed
image text in transcribed
Instructions Please work on this assignment individually In this assignment, you will review Java programming skills. Read Java API documentation of BigInteger class by clicking here Please take a look at the attached sample program. See what it does. Now write a program using Biginteger class to read four BigIntegers (m, e, d and n) and perform the following computations: 1. compute and print e d 2. compute and print d or e 3. compute m and d xor d and print the result 4. compute m xor e xor e and print the 5. Shift m to the right by 3 and print the 6. Shift m to the left by 4 and print the 7. With the original value of m, compute result result result the value c me mod n and then print c (hint: use modPow method) 8. compute g-cd mod n and then print g 9. "bullet proof" your code so that your program won't crash no matter what the input is. Instead, the program displays an error message giving useful feedback to the us 10. Test your program with the following numbers: 1. choose a value for m as you like 2. e-65537 3. d-89489425009274444368228 54592177309391966958606588 42574454978544564876748396 29818390934941973262879616 79797060891728367987549933 15741611138540888132754881 10588247193077582527278437 90650401568062342355006724 00424666656542323835029222 15493623289472138866445818 78912794612340780772570262 6644091036502372545139713 4. n-145906768007583323230186 93934907063529240187237535 71643995818710198734387990 05358938369571402670149802 12181808629246742282815702 29220767469065434012248896 72472407926969987100581290 10319931785875366371086235 76565105078837142971156373 42788911463535102712032765 16651841172685983798867211 1837205085526346618740053 5. Repeat above steps (10.1 through 10.5) with different values of m. (with values of d, e, and n being as indicated above). For different values of m, observe the corresponding values of g. What relationship do you see between g and m? 11. Submit the following: a) your program source code (java) file. b) a separate text or word document or PDF file including the output of your program runs and the observation made in step 10. Besides reviewing Java, this assignment will also help you to learn Just in Time (Biglnteger class, bit-wise operations, etc.) and solve a problem, which is generally practiced in the industry today. If you are curious about what is Just in Time Learning,read more about it here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions