A totally generic implementation of Coppersmith's method that finds small roots for any modular multivariate polynomial. For example, this supports:
- Univariate, bivariate, trivariate, theoretically n-variate polynomials.
- Arbitrary monomials and degrees.
- Unknown moduli, assuming you know some multiple.
Of course, added complexity leads to lower quality bounds. Optimizations are a work in progress.
See examples.sage for confirmed use cases. For general use, the arguments of small_roots are:
f- Multivariate polynomial with small roots. Its base ring should be some sort of integers moduloN.bounds- Tuple of bounds for each variable inf.variables(). This is used to optimize the lattice and does not strictly determine the size of roots returned.m- Determines how many higher powers offandNto use. Defaults to 1.d- Determines how many variable shifts to use. Defaults tof.degree().