9.9 Computer Problems

    1. Paul Revere’s friend in a tower at MIT says he’ll send the message one if (the British are coming) by land and two if by sea. Since they know that RSA will be invented in the Boston area, they decide that the message should be encrypted using RSA with n=712446816787 and e=6551. Paul Revere receives the ciphertext 273095689186. What was the plaintext? Answer this without factoring n.

    2. What could Paul Revere’s friend have done so that we couldn’t guess which message was encrypted? (See the end of Subsection 9.2.2.)

  1. In an RSA cryptosystem, suppose you know n=718548065973745507, e=3449, and d=543546506135745129. Factor n using the ar1 method of Subsection 9.4.2.

  2. Choose two 30-digit primes p and q and an encryption exponent e. Encrypt each of the plaintexts cat, bat, hat, encyclopedia, antidisestablishmentarianism. Can you tell from looking at the ciphertexts that the first three plaintexts differ in only one letter or that the last two plaintexts are much longer than the first three?

  3. Factor 618240007109027021 by the p1 method.

  4. Factor 8834884587090814646372459890377418962766907 by the p1 method. (The number is stored in the downloadable computer files ( bit.ly/2JbcS6p) as n1.)

  5. Let n=537069139875071. Suppose you know that

    8597532444316624624361062612(modn).

    Factor n.

  6. Let n=9857398791388749507. Find x and y with x2y2(mod n) but x  ±y(mod n).

    1. Suppose you know that

      3333526707050932(mod670726081).

      Use this information to factor 670726081.

    2. Suppose you know that 326707260782(mod 670726081). Why won’t this information help you to factor 670726081?

  7. Suppose you know that

    29582301488665(mod3837523)219164601(mod3837523).

    How would you use this information to factor 3837523? Note that the exponent 1916460 is twice the exponent 958230.

    Alice and Bob have the same RSA modulus n, given to them by some central authority (who does not tell them the factorization of n). Alice has encryption and decryption exponents eA and dA, and Bob has eB and dB. As usual, eA and eB are public and dA and dB are private.

    1. Suppose the primes p and q used in the RSA algorithm are consecutive primes. How would you factor n=pq?

    2. The ciphertext 10787770728 was encrypted using e=113 and n=10993522499. The factors p and q of n were chosen so that qp=2. Decrypt the message.

    3. The following ciphertext c was encrypted mod n using the exponent e:

      n=152415787501905985701881832150835089037858868621211004433e=9007c=141077461765569500241199505617854673388398574333341423525.

      The prime factors p and q of n are consecutive primes. Decrypt the message. (The number n is stored in the downloadable computer files (bit.ly/2JbcS6p) as naive, and c is stored as cnaive.) Note: In Mathematica®, the command Round[N[Sqrt[n],50]] evaluates the square root of n to 50 decimal places and then rounds to the nearest integer. In Maple, first use the command Digits:=50 to obtain 50-digit accuracy, then use the command round(sqrt(n*1.)) to change n to a decimal number, take its square root, and round to the nearest integer. In MATLAB, use the command digits(50);round(vpa(sqrt(ʼn’))).

  8. Let p=123456791, q=987654323, and e=127. Let the message be m=14152019010605.

    1. Compute me(mod p) and me(mod q); then use the Chinese remainder theorem to combine these to get cme(mod pq).

    2. Change one digit of me(mod p) (for example, this could be caused by some radiation). Now combine this with me(mod q) to get an incorrect value f for me(mod pq). Compute gcd(cf,pq). Why does this factor pq?

    The method of (a) for computing me(mod pq) is attractive since it does not require as large multiprecision arithmetic as working directly mod pq. However, as part (b) shows, if an attacker can cause an occasional bit to fail, then pq can be factored.

  9. Suppose that p=76543692179, q=343434343453, and e=457. The ciphertext cme(mod pq) is transmitted, but an error occurs during transmission. The received ciphertext is 2304329328016936947195. The receiver is able to determine that the digits received are correct but that last digit is missing. Determine the missing digit and decrypt the message.

  10. Test 38200901201 for primality using the Miller-Rabin test with a=2. Then test using a=3. Note that the first test says that 38200901201 is probably prime, while the second test says that it is composite. A composite number such as 38200901201 that passes the Miller-Rabin test for a number a is called a strong a-pseudoprime.

  11. There are three users with pairwise relatively prime moduli n1, n2, n3. Suppose that their encryption exponents are all e=3. The same message m is sent to each of them and you intercept the ciphertexts cim3(mod ni) for i=1, 2, 3.

    1. Show that 0m3<n1n2n3.

    2. Show how to use the Chinese remainder theorem to find m3 (as an exact integer, not only as m3(mod n1n2n3)) and therefore m. Do this without factoring.

    3. Suppose that

      n1=2469247531693, n2=11111502225583, n3=44444222221411

      and the corresponding ciphertexts are

      359335245251, 10436363975495, 5135984059593.

      These were all encrypted using e=3. Find the message.

    1. Choose a 10-digit prime p and and 11-digit prime q. Form n=pq.

    2. Let the encryption exponent be e=65537. Write a program that computes the RSA encryptions of all plaintexts m with 1m<104. (Do not store or display the results.) The computer probably did this almost instantaneously.

    3. Modify your program in (b) so that it computes the encryptions of all m with 1m<108 and time how long this takes (if this takes too long, use 107; if it’s too fast to time, use 109).

    4. Using your timing from (c), estimate how long it will take to encrypt all m with 1m<n (a year is approximately 3×107 seconds).

    Even this small example shows that it is impractical to make a database of all encryptions in order to attack RSA.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.243.184