1. A method comprising: based on characteristics of first and second polynomials, selecting, by a computing device, a particular greatest common divisor (GCD) algorithm from a plurality of GCD algorithms; applying, by the computing device, the particular GCD algorithm to the first and second polynomials; and returning, by the computing device, a GCD of the first and second polynomials.