This chapter explains how to compute square roots of polynomials modulo an irreducible polynomial so that points on elliptic curves over extension fields can be found. The overall goal is the same as in the earlier discussion of square roots over prime fields: given an elliptic curve equation, determine whether a chosen value on the right-hand side is a quadratic residue and, if so, recover the corresponding \(y\)-coordinate. Because the field elements are now polynomials rather than integers, the method adapts familiar ideas from finite-field arithmetic to the polynomial setting.
The mathematical core of the chapter is the use of the resultant to test whether a polynomial has a square root modulo the field-defining polynomial. The resultant is zero when two polynomials share a factor, and here it is used to decide whether a polynomial is a quadratic residue. To compute it efficiently, the chapter introduces pseudo-division, which mimics polynomial division by scaling with leading coefficients rather than performing ordinary division. These tools together provide the machinery needed to reduce the square-root problem to a residue test and then to carry out the actual computation when a root exists.
The implementation portion then walks through the routines needed in code: computing the content of a polynomial, performing pseudo-division, computing the resultant, checking quadratic residuosity, and finally extracting the square root. The square-root algorithm closely parallels Tonelli-Shanks from the prime-field case, with special handling for the polynomial field element and a fast path when the field size is congruent to 3 mod 4. Once these routines are in place, the chapter shows how they support generating random points on elliptic curves over extension fields, which are later useful for pairing-based cryptographic calculations.
Polynomial square root algorithm for finding \(y\) value of point on elliptic curve
Polynomial quadratic residue algorithm to determine whether a polynomial has a square root
Resultant algorithm
Pseudo-division algorithm
Elliptic curve \(y^2=x^3-5 x +5\)
Summary
The resultant of two polynomials is a single value modulo the field prime of the coefficients. The resultant is used to determine whether a polynomial has a square root.
A polynomial \(A\) modulo a prime polynomial \(f\) has a square root when \[resultant(A, f)^{(p-1)/2}=1\]The polynomial \(A\) is called a quadratic residue when this is true. When true, we have a point on a field extension elliptic curve.
The content of a polynomial is the gcd of all its coefficients. Removing the content of a polynomial is an essential step in computing a square root.
The resultant is computed using pseudo-division and a reduction step. The resultant is used to determine whether a polynomial has a square root.
A polynomial \(A\) mod \(f\), which is a quadratic residue over an extension field that is congruent to 3 mod 4, has a square root computed using \[A^{(p^k+1)/4}\]Otherwise, the Tonelli-Shanks algorithm is used. This is the same process used in chapter 2 and has the same purpose: to find a point on an elliptic curve.
FAQ
What is the main goal of taking square roots of polynomials in this chapter?The goal is to compute the \(y\)-coordinate of a point on an elliptic curve when the field elements are polynomials modulo an irreducible polynomial. This is done by finding a square root of the right-hand side of the elliptic curve equation.How is polynomial square root computation similar to square roots modulo a prime number?The overall approach is the same: first determine whether the value is a quadratic residue, and if it is, compute the square root. The key difference is that the values are polynomials in a finite field extension rather than integers modulo a prime.What is polynomial pseudo-division?Polynomial pseudo-division is a division-like process used when ordinary polynomial division is not appropriate. It scales the dividend by a power of the divisor’s leading coefficient so that a quotient and remainder can still be computed without actual division in the usual sense.Why is pseudo-division needed in the resultant algorithm?Pseudo-division is used to reduce polynomials during the resultant computation. It allows the algorithm to continue using polynomial arithmetic over a finite field while maintaining the correct structure needed to compute the resultant.What is the resultant of two polynomials?The resultant is a single value derived from two polynomials, and it is zero when the polynomials share a common factor. In this chapter, it is used to help determine whether a polynomial is a quadratic residue.How does the resultant help determine whether a polynomial has a square root?The resultant of a polynomial \(a\) with the irreducible field polynomial \(f\) is raised to the power \((p-1)/2\). If the result is 1, then the polynomial is a quadratic residue and a square root can be computed.What does “content” mean for a polynomial?The content of a polynomial is the greatest common divisor of all its coefficients. For monic polynomials, the content is 1, which simplifies the resultant computation.What is a quadratic residue in the context of polynomial arithmetic?A polynomial is a quadratic residue if it can be expressed as the square of another polynomial modulo the irreducible polynomial. If it is a quadratic residue, then a square root exists in the field extension.When can the square root of a polynomial be computed using the simple power method?If \(p^k \equiv 3 \pmod 4\), then the square root can be computed directly using an exponentiation formula, similar to the prime-field case.What happens if the polynomial square root routine cannot find a valid solution during the Tonelli-Shanks-style loop?If the loop reaches the failure condition, the routine reports that the square root failed and exits. This should not happen if the input polynomial is truly a quadratic residue.
pro $24.99 per month
access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!