Overview

Appendix B. Hilbert class polynomials

This appendix explains how the book generates the Hilbert class polynomials needed when searching for pairing-friendly elliptic curves. These polynomials are part of the complex multiplication approach introduced earlier in the book, where the key step is solving for a curve’s j-invariant through the relevant class polynomial.

The code shown is a short PARI/GP program that loops through a selected set of discriminants and writes the corresponding Hilbert class polynomials to a file. The chosen discriminants are negative values congruent to 3 mod 4, covering the range from 7 to 163 in steps that match the values used elsewhere in the book’s curve-generation routines. The appendix notes that this range is enough for the book’s examples, but the method could be extended further.

The output file contains the polynomials in their raw integer form, before any reduction modulo a prime. This means the results are not immediately tied to a specific finite field, but become useful once a prime is chosen for the curve construction process. The appendix then provides a sample output file, illustrating that the resulting polynomials vary in degree and size depending on the discriminant, with many coefficients becoming quite large.

FAQ

What is the purpose of generating Hilbert class polynomials in this appendix?The appendix provides code to generate Hilbert class polynomials used in the book to help find pairing-friendly elliptic curves. These polynomials are part of the complex multiplication method, which is used to solve for the j-invariant of a curve.
How are Hilbert class polynomials used in the complex multiplication method?In the complex multiplication method, one uses Hilbert class polynomials to find valid j-invariants. Those j-invariants are then used to construct pairing-friendly curves.
What range of discriminants does the appendix use?The discriminants used in the appendix are all congruent to 3 mod 4 and range from 7 to 163. The text also notes that there is no reason the method must stop at 163.
What values of D are generated by the PARI loop in the code?The code loops over the values 7, 11, 15, 19, and 23, and then adds multiples of 20 for a from 0 to 7. It negates each value before passing it to polclass().
What PARI function is used to compute the Hilbert class polynomial?The code uses the PARI/GP function polclass() to compute the Hilbert class polynomial for each discriminant D.
Why does the code store negative values of D?The code sets D = stoi(-(atab[i] + j*20)) because Hilbert class polynomials are computed using negative discriminants in this context.
What does the output file Hilbert_Polynomials.list contain?It contains a list of discriminants and their corresponding Hilbert class polynomials. The polynomials are written out as plain polynomials, not reduced modulo any prime.
Are the Hilbert class polynomials in the file already modulo a prime?No. The appendix explicitly says the output polynomials are not modulo anything yet. They only gain meaning once the relevant prime is known.
Why are some Hilbert class polynomials higher degree than others?The degree of a Hilbert class polynomial depends on the discriminant. Different discriminants produce polynomials of different degrees, as shown in the output file where degrees range from 1 to 10 and beyond.
What is the significance of the listed polynomials for pairing-friendly curve construction?These polynomials are used to find suitable j-invariants during curve construction. Once a prime is chosen, the appropriate polynomial helps determine the curve parameters needed for pairing-friendly elliptic curves.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Elliptic Curve Cryptography for Developers Elliptic Curve Cryptography for Developers ebook for free
Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Elliptic Curve Cryptography for Developers Elliptic Curve Cryptography for Developers ebook for free
Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Elliptic Curve Cryptography for Developers Elliptic Curve Cryptography for Developers ebook for free