Lattices are hard. As someone who doesn't consider mathematics his primary interest I take solice in the words of whoever wrote the NTL LLL documentation:
I think it is safe to say that nobody really understands how the LLL algorithm works. The theoretical analyses are a long way from describing what "really" happens in practice. Choosing the best variant for a certain application ultimately is a matter of trial and error.
There are a few libraries with LLL support:
- liblll - the easiest to get working, simply clone source and use in your project folder. Pip install didn't work. Blog here was helpful (http://kutioo.blogspot.com/2011/12/liblll.html)