Kunerth's algorithm

Last updated

Kunerth's algorithm is an algorithm for computing the modular square root of a given number. [1] [2] The algorithm does not require the factorization of the modulus, and relies on modular operations that is often easy when the given number is prime.

Contents

Algorithm

To find y from a given value

it takes the following steps:

  1. find the modular square root of . This step is quite easy, irrespectively of how big N when is a prime.
  2. solve a quadratic equation associated with the modular square root of . Most of Kunerth's examples in his original paper solve this equation by having C be a integer square and thus setting z to zero.
    Expand out the following equation to obtain the quadratic
    One can always make sure that the quadratic can be solved by adjusting the modulus N in the above equation. Thus
    will ensure a quadratic of .
    One can then adjust F to make sure that is a square. For large moduli, such as , can have their square roots computed quickly via this method.
    The parameters of the polynomial expansion are quite flexible, in that can be done, for instance. It is quite easy to choose X and Y such that is a square. The modular square root of can be taken this way.
  3. Having solved the associated quadratic equation we now have the variables w and set v = r (if C in the quadratic is a natural square).
  4. Solve for variables and the following equation:
  5. Obtain a value for X via factorization of the following polynomial:
    obtaining an answer like
  6. Obtain the modular square root by the equation. Remember to set X such that the term above is zero. Thus X would be 37/9 or -1/25.

Example

To obtain first obtain .

Then expand the polynomial:

into

Since, in this case the C term is a square, we take and compute (in general, ).

Solve for and the following equation
getting the solution and . (There may be other pairs of solutions to this equation.)
Then factor the following polynomial:
obtaining
Then obtain the modular square root via
Verify that

In the case that has no answer, then can be used instead.

See also

Related Research Articles

<span class="mw-page-title-main">Quadratic reciprocity</span> Gives conditions for the solvability of quadratic equations modulo prime numbers

In number theory, the law of quadratic reciprocity is a theorem about modular arithmetic that gives conditions for the solvability of quadratic equations modulo prime numbers. Due to its subtlety, it has many formulations, but the most standard statement is:

<span class="mw-page-title-main">Quadratic formula</span> Formula that provides the solutions to a quadratic equation

In elementary algebra, the quadratic formula is a formula that provides the solutions to a quadratic equation. Other ways of solving a quadratic equation, such as completing the square, yield the same solutions.

In mathematics, a reciprocity law is a generalization of the law of quadratic reciprocity to arbitrary monic irreducible polynomials with integer coefficients. Recall that first reciprocity law, quadratic reciprocity, determines when an irreducible polynomial splits into linear terms when reduced mod . That is, it determines for which prime numbers the relation

In mathematics, a quadratic irrational number is an irrational number that is the solution to some quadratic equation with rational coefficients which is irreducible over the rational numbers. Since fractions in the coefficients of a quadratic equation can be cleared by multiplying both sides by their least common denominator, a quadratic irrational is an irrational root of some quadratic equation with integer coefficients. The quadratic irrational numbers, a subset of the complex numbers, are algebraic numbers of degree 2, and can therefore be expressed as

The quadratic sieve algorithm (QS) is an integer factorization algorithm and, in practice, the second-fastest method known. It is still the fastest for integers under 100 decimal digits or so, and is considerably simpler than the number field sieve. It is a general-purpose factorization algorithm, meaning that its running time depends solely on the size of the integer to be factored, and not on special structure or properties. It was invented by Carl Pomerance in 1981 as an improvement to Schroeppel's linear sieve.

Pollard's rho algorithm for logarithms is an algorithm introduced by John Pollard in 1978 to solve the discrete logarithm problem, analogous to Pollard's rho algorithm to solve the integer factorization problem.

In mathematics, Hensel's lemma, also known as Hensel's lifting lemma, named after Kurt Hensel, is a result in modular arithmetic, stating that if a univariate polynomial has a simple root modulo a prime number p, then this root can be lifted to a unique root modulo any higher power of p. More generally, if a polynomial factors modulo p into two coprime polynomials, this factorization can be lifted to a factorization modulo any higher power of p.

In additive number theory, Fermat's theorem on sums of two squares states that an odd prime p can be expressed as:

In mathematics, a binary quadratic form is a quadratic homogeneous polynomial in two variables

Gauss's lemma in number theory gives a condition for an integer to be a quadratic residue. Although it is not useful computationally, it has theoretical significance, being involved in some proofs of quadratic reciprocity.

In number theory, the law of quadratic reciprocity, like the Pythagorean theorem, has lent itself to an unusually large number of proofs. Several hundred proofs of the law of quadratic reciprocity have been published.

The Tonelli–Shanks algorithm is used in modular arithmetic to solve for r in a congruence of the form r2n, where p is a prime: that is, to find a square root of n modulo p.

Cubic reciprocity is a collection of theorems in elementary and algebraic number theory that state conditions under which the congruence x3 ≡ p (mod q) is solvable; the word "reciprocity" comes from the form of the main theorem, which states that if p and q are primary numbers in the ring of Eisenstein integers, both coprime to 3, the congruence x3p is solvable if and only if x3q is solvable.

Quartic or biquadratic reciprocity is a collection of theorems in elementary and algebraic number theory that state conditions under which the congruence x4p is solvable; the word "reciprocity" comes from the form of some of these theorems, in that they relate the solvability of the congruence x4p to that of x4q.

Secret sharing consists of recovering a secret S from a set of shares, each containing partial information about the secret. The Chinese remainder theorem (CRT) states that for a given system of simultaneous congruence equations, the solution is unique in some Z/nZ, with n > 0 under some appropriate conditions on the congruences. Secret sharing can thus use the CRT to produce the shares presented in the congruence equations and the secret could be recovered by solving the system of congruences to get the unique solution, which will be the secret to recover.

In computational number theory, Cipolla's algorithm is a technique for solving a congruence of the form

In algebraic number theory the n-th power residue symbol is a generalization of the (quadratic) Legendre symbol to n-th powers. These symbols are used in the statement and proof of cubic, quartic, Eisenstein, and related higher reciprocity laws.

In algebraic number theory Eisenstein's reciprocity law is a reciprocity law that extends the law of quadratic reciprocity and the cubic reciprocity law to residues of higher powers. It is one of the earliest and simplest of the higher reciprocity laws, and is a consequence of several later and stronger reciprocity laws such as the Artin reciprocity law. It was introduced by Eisenstein, though Jacobi had previously announced a similar result for the special cases of 5th, 8th and 12th powers in 1839.

<span class="mw-page-title-main">Berlekamp–Rabin algorithm</span> Method in number theory

In number theory, Berlekamp's root finding algorithm, also called the Berlekamp–Rabin algorithm, is the probabilistic method of finding roots of polynomials over the field with elements. The method was discovered by Elwyn Berlekamp in 1970 as an auxiliary to the algorithm for polynomial factorization over finite fields. The algorithm was later modified by Rabin for arbitrary finite fields in 1979. The method was also independently discovered before Berlekamp by other researchers.

In mathematics, in number theory, Gauss composition law is a rule, invented by Carl Friedrich Gauss, for performing a binary operation on integral binary quadratic forms (IBQFs). Gauss presented this rule in his Disquisitiones Arithmeticae, a textbook on number theory published in 1801, in Articles 234 - 244. Gauss composition law is one of the deepest results in the theory of IBQFs and Gauss's formulation of the law and the proofs its properties as given by Gauss are generally considered highly complicated and very difficult. Several later mathematicians have simplified the formulation of the composition law and have presented it in a format suitable for numerical computations. The concept has also found generalisations in several directions.

References

  1. Adolf Kunerth, "Sitzungsberichte. Academie Der Wissenschaften" vol 78(2), 1878, p 327-338 (for quadratic equation algorithm), pp. 338–346 (for modular quadratic algorithm), available at Ernest Mayr Library, Harvard University
  2. Leonard Eugene Dickson, "History of Numbers", vol 2, pp. 382–384.