1.36. Square roots. In this problem, we'll see that it is easy to compute square roots modulo a prime pwith p3(mod4).
(a) Suppose p3(mod4). Show that(p+1)/4 is an integer.
(b) We say x is a square root of a modulo p if a=x2(modp). Show that if p3(mod4)and if a has a square root modulo p, thena(p+1)/4 is such a square root.

Short Answer

Expert verified
  1. p+14is showed as integer.
  2. It is proved that, if p3mod4and if a has a square root modulo p, then ap+14is such a square root is depicted.

Step by step solution

01

Step 1: Introduction to the Concept

After one number is divided by another, the modulo operation yields the remainder or signed remainder of the division (called the modulus of the operation).

02

Step 2: Solution Explanation

a)

The following is a representation of the provided equation "p3mod4"

p=3+4k--------1

  • Because "x1modN" is the same as "x=1+kN"
  • It's worth noting that "k" is an integer.

On both sides of the equation (1), add "1".

p+1=4k+3+1p+1=4k+4p+1=4k+1p+14=k+1--------2

"k+1" is also an integer because "k" is an integer. (k+1) equalsp+14 according to equation (2).

As a result,p+14 is an integer.

03

Step 3: Solution Explanation

b)

From Fermat's "Little Theorem",

ap-1=1modp------3

The following equation has been derived based on equation (3):

ap-1=1modpap-1-1=0modp

Multiply "12" by both sides of the above expression's power values.

ap-12-112=0modpap-12-1=0modpap-12-1ap-12+1=0modp

Moving the negative set of valueap-12-1 to the right side of the equation is not a valid solution.

ap-12+1=0ap-12+1modpap-12+1=0modpap-12=-1modp

Thus, the above equation will not satisfy the Fermat's "Little Theorem".

Moving the positive set of value ap-12+1to the right side of the equation as follows,

ap-12-1=0ap-12+1modpap-12-1=0modpap+12-a=0modpap+12=amodp

The equation above demonstrates this ap+12=amodp, and it may be written as follows:

ap+142=amodp.

When you move the square from left to right, it is converted to square root.

ap+14=amodp

When "a" has a square root modulo “ap+14”is a square root.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Show that any binary integer is at most four times as long as the corresponding decimal integer. For very large numbers, what is the ratio of these two lengths, approximately?

Wilson's theorem says that a numberis prime if and only if
(N-1)!=-1(modN).

(a) If is prime, then we know every number1x<p is invertible modulo . Which of thesenumbers is their own inverse?
(b) By pairing up multiplicative inverses, show thatrole="math" localid="1658725109805" (p-1)!=-1(modp) for prime p.
(c) Show that if N is not prime, then(N-1)!(modN) .(Hint: Considerd=gcd(N,(N-1)!.)
(d) Unlike Fermat's Little Theorem, Wilson's theorem is an if-and-only-if condition for primality. Why can't we immediately base a primality test on this rule?

The grade-school algorithm for multiplying two n-bit binary numbers x and y consist of addingtogethern copies of r, each appropriately left-shifted. Each copy, when shifted, is at most 2n bits long.
In this problem, we will examine a scheme for adding n binary numbers, each m bits long, using a circuit or a parallel architecture. The main parameter of interest in this question is therefore the depth of the circuit or the longest path from the input to the output of the circuit. This determines the total time taken for computing the function.
To add two m-bit binary numbers naively, we must wait for the carry bit from position i-1before we can figure out the ith bit of the answer. This leads to a circuit of depthΟ(m). However, carry-lookahead circuits (see
wikipedia.comif you want to know more about this) can add inΟ(logn)depth.

  1. Assuming you have carry-lookahead circuits for addition, show how to add n numbers eachm bits long using a circuit of depth Ο(lognlogm).
  2. When adding three m-bit binary numbers x+y+z, there is a trick we can use to parallelize the process. Instead of carrying out the addition completely, we can re-express the result as the sum of just two binary numbersr+s, such that the ith bits of r and s can be computedindependently of the other bits. Show how this can be done. (Hint: One of the numbers represents carry bits.)
  3. Show how to use the trick from the previous part to design a circuit of depthΟ(logn)for multiplying two n-bit numbers.

A positive integer N is a power if it is of the formqk , where q,role="math" localid="1658399000008" k are positive integers and k>1.

(a) Give an efficient algorithm that takes as input a number and determines whether it is a square, that is, whether it can be written asq2 for some positive integer q. What is the running time of your algorithm?

(b) Show that if N=qk (with role="math" localid="1658399171717" N,q , andk all positive integers), then either role="math" localid="1658399158890" klogNorN=1.

(c) Give an efficient algorithm for determining whether a positive integerN is a power. Analyze its running time.

Suppose that instead of using a compositeN=pqin the RSA cryptosystem (Figure 1.9), we simply use a prime modulus p . As in RSA, we would have an encryption exponent e, and the encryption of a message mmodpwould be memodp.Prove that this new cryptosystem is not secure, by giving an efficient algorithm to decrypt: that is, an algorithm that given and p,e,andmemodp as input, computes . Justify the correctness and analyze the running time of your decryption algorithm.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free