Closed ZiqiangMa closed 5 years ago
Maybe it is the closest vector? Hard to tell from the information you've given.
I don't think it is the closest vector. I refer to the tutorial of fpylll, and use Enumeration
to implement the CVP. the code is:
M = GSO.Mat(copy(CVPlattice), float_type='dd')
M.update_gso()
E = Enumeration(M)
_, v1 = E.enumerate(0, A2.nrows, 2, 40, M.from_canonical(u_target))[0]
v1 = IntegerMatrix.from_iterable(1, A2.nrows, map(lambda x: int(round(x)), v1))
v1 = tuple((v1*A2)[0])
and the result is:
_End of BKZ: success Traceback (most recent call last):
File "
File "/home/mzq/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 704, in runfile execfile(filename, namespace)
File "/home/mzq/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 108, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "/home/mzq/.config/spyder-py3/attackecdsa.py", line 258, in
File "src/fpylll/fplll/enumeration.pyx", line 385, in fpylll.fplll.enumeration.Enumeration.enumerate
EnumerationError: No solution found._
So what should be done to this case. Thank you very much.
Hello, Firstly, thank you so much for your help. I choose the
float_type
of "dd", and the BKZ goes successfully.But when I run the
closest_vector
funcition, i.e. the following code:cvp_vector = CVP.closest_vector(A2, u_target)
it returns a zero vector.
Could you give me some suggestions? Should I need to compute the pruning parameters?