Lattices-0.0.2: A library for lattices

Safe HaskellNone
LanguageHaskell98

Math.Lattices.LLL

Description

Implements a *very* basic LLL (Lenstra-Lenstra-Lovász) lattice reduction algorithm. This version uses exact arithmetic over the rationals. References for the LLL algorithm:

  • Factoring Polynomials with Rational Coefficients, Arjen K Lenstra, Hendrik W Lenstra Jr, and László Lovász. Mathematische Annalen 261, 515-534 (1982)
  • Mathematics of Public Key Cryptography, Steven Galbraith. Chapter 17 of draft 1.0
  • Modern Computer Algebra, second edition, Joachim von zur Gathen and Jürgen Gerhard. Chapter 16.

Synopsis

Documentation

lll :: [[Rational]] -> Basis Source

Return an LLL reduced basis. This calls 'lllDelta with a default parameter $delta = 3/4$

lllDelta :: [[Rational]] -> Rational -> Basis Source

Return an LLL reduced basis, with reduction parameter $delta$. This is the conventional flavor of the algorithm using Gram-Schmidt, no fancy speedups yet

type Basis = Array Int [Rational] Source

A matrix representing a basis