Trouble with sage small_roots
...some code above
P.<x> = PolynomialRing(Zmod(n), implementation='NTL')
f = P(coef)
print(f(x=b)) # return 0, (b)**f.degree() < n(condition for coppersmith method)
print(f.small_roots(X = b + 1)) # return nothing(also without kwargs), but should contain b ?
Edit: Coef are list of coefficients, b is polynomial root(line 3). Why small._root didnt return list with b, if b is "small_root"- (b)**f.degree() < n(condition for coppersmith method)
what is
coeff
? What isb
? What is your question?The following code reproduces the problem:
The condition documented in
is an other one. Using
set_verbose(2)
we see thatLLL
is involved...So what should i do ? I fault understanding meaning of function purpose or should i use other implementation ?
It would help if you described precisely what you want to do. We have no way to provide an alternative if we don't know what you are trying to achieve.
I just want to use coppersmith method, that said root can be found if |x| < N^(1/f.degree()). In @dan_fuelea's example no root can be found for k = 3, 4 even if should contains 2. 2^15 < 55555 , so also 2 < 55555^(1/7).
For small_root from documentation condition on bound is also true.