Skip to main content

Related Concepts

Jacobi Symbol; Prime Number; Quadratic Residue

Background

The Legendre symbol was introduced by A.M. Legendre in 1798.

Definition

The Legendre symbol of an integer x modulo a prime p is 0 if x is divisible by p, and otherwise + 1 if x has a square root modulo p, and − 1 if not.

Theory

Let p be an odd prime number and let x be an integer. If x is a quadratic residue, i.e., if x is relatively prime to p and the equation (Modular arithmetic)

$$x \equiv {y}^{2}\mbox{ mod }p$$

has an integer solution y, then the Jacobi symbol of x modulo p, written as (x ∕ p) or \(\left (\frac{x} {p}\right )\), is + 1. If x is a quadratic nonresidue â€“ i.e., x is relatively prime to p and has no square roots â€“ then its Legendre symbol is − 1. If x is not relatively prime to p then \(\left (\frac{x} {p}\right ) = 0\).

The Legendre symbol may be efficiently computed using the Quadratic Reciprocity Theorem or by modular exponentiation (Exponentiation Algorithms) as

$$\left (\frac{x} {p}\right...

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 799.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 949.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer Science+Business Media, LLC

About this entry

Cite this entry

Kaliski, B. (2011). Legendre Symbol. In: van Tilborg, H.C.A., Jajodia, S. (eds) Encyclopedia of Cryptography and Security. Springer, Boston, MA. https://doi.org/10.1007/978-1-4419-5906-5_418

Download citation

Publish with us

Policies and ethics