svpcvp.cpp File Reference
#include "svpcvp.h"
#include "enum/enumerate.h"
#include "enum/topenum.h"
This graph shows which files directly or indirectly include this file:

Functions

static FPLLL_BEGIN_NAMESPACE int last_useful_index (const Matrix< FP_NR< mpfr_t > > &r)
 
static void get_basis_min (Z_NR< mpz_t > &basis_min, const ZZ_mat< mpz_t > &b, int first, int last)
 
static void get_basis_min (Z_NR< mpz_t > &basis_min, MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &gso, int first, int last)
 
static bool enumerate_svp (int d, MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &gso, FP_NR< mpfr_t > &max_dist, ErrorBoundedEvaluator &evaluator, const vector< enumf > &pruning, int flags)
 
static int shortest_vector_ex (ZZ_mat< mpz_t > &b, vector< Z_NR< mpz_t > > &sol_coord, SVPMethod method, const vector< double > &pruning, int flags, EvaluatorMode eval_mode, long long &sol_count, vector< vector< Z_NR< mpz_t > > > *subsol_coord=nullptr, vector< enumf > *subsol_dist=nullptr, vector< vector< Z_NR< mpz_t > > > *auxsol_coord=nullptr, vector< enumf > *auxsol_dist=nullptr, int max_aux_sols=0)
 
int shortest_vector (ZZ_mat< mpz_t > &b, vector< Z_NR< mpz_t > > &sol_coord, SVPMethod method, int flags)
 
int shortest_vector_pruning (ZZ_mat< mpz_t > &b, vector< Z_NR< mpz_t > > &sol_coord, const vector< double > &pruning, int flags)
 
int shortest_vector_pruning (ZZ_mat< mpz_t > &b, vector< Z_NR< mpz_t > > &sol_coord, vector< vector< Z_NR< mpz_t > > > &subsol_coord, vector< enumf > &subsol_dist, const vector< double > &pruning, int flags)
 
int shortest_vector_pruning (ZZ_mat< mpz_t > &b, vector< Z_NR< mpz_t > > &sol_coord, vector< vector< Z_NR< mpz_t > > > &auxsol_coord, vector< enumf > &auxsol_dist, const int max_aux_sols, const vector< double > &pruning, int flags)
 
static int shortest_vector_ex (MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &gso, vector< Z_NR< mpz_t > > &sol_coord, SVPMethod method, const vector< double > &pruning, int flags, EvaluatorMode eval_mode, long long &sol_count, vector< vector< Z_NR< mpz_t > > > *subsol_coord=nullptr, vector< enumf > *subsol_dist=nullptr, vector< vector< Z_NR< mpz_t > > > *auxsol_coord=nullptr, vector< enumf > *auxsol_dist=nullptr, int max_aux_sols=0, bool merge_sol_in_aux=false)
 
int shortest_vector (MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &gso, vector< Z_NR< mpz_t > > &sol_coord, SVPMethod method, int flags)
 
int shortest_vectors (MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &gso, vector< vector< Z_NR< mpz_t > > > &sol_coord, vector< enumf > &sol_dist, const int max_sols, SVPMethod method, int flags)
 
int shortest_vector_pruning (MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &gso, vector< Z_NR< mpz_t > > &sol_coord, const vector< double > &pruning, int flags)
 
int shortest_vector_pruning (MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &gso, vector< Z_NR< mpz_t > > &sol_coord, vector< vector< Z_NR< mpz_t > > > &subsol_coord, vector< enumf > &subsol_dist, const vector< double > &pruning, int flags)
 
int shortest_vector_pruning (MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &gso, vector< Z_NR< mpz_t > > &sol_coord, vector< vector< Z_NR< mpz_t > > > &auxsol_coord, vector< enumf > &auxsol_dist, const int max_aux_sols, const vector< double > &pruning, int flags)
 
static void get_gscoords (const Matrix< FP_NR< mpfr_t > > &matrix, const Matrix< FP_NR< mpfr_t > > &mu, const Matrix< FP_NR< mpfr_t > > &r, const vector< FP_NR< mpfr_t > > &v, vector< FP_NR< mpfr_t > > &vcoord)
 
static void babai (const FP_mat< mpfr_t > &matrix, const Matrix< FP_NR< mpfr_t > > &mu, const Matrix< FP_NR< mpfr_t > > &r, const vector< FP_NR< mpfr_t > > &target, vector< FP_NR< mpfr_t > > &target_coord)
 
int closest_vector (ZZ_mat< mpz_t > &b, const vector< Z_NR< mpz_t > > &int_target, vector< Z_NR< mpz_t > > &sol_coord, int method, int flags)
 

Function Documentation

◆ babai()

static void babai ( const FP_mat< mpfr_t > &  matrix,
const Matrix< FP_NR< mpfr_t > > &  mu,
const Matrix< FP_NR< mpfr_t > > &  r,
const vector< FP_NR< mpfr_t > > &  target,
vector< FP_NR< mpfr_t > > &  target_coord 
)
static

◆ closest_vector()

int closest_vector ( ZZ_mat< mpz_t > &  b,
const vector< Z_NR< mpz_t > > &  int_target,
vector< Z_NR< mpz_t > > &  sol_coord,
int  method = CVPM_FAST,
int  flags = CVP_DEFAULT 
)

Computes a closest vector of a lattice to a target. The vectors must be linearly independant and the basis must be LLL-reduced with delta=LLL_DEF_DELTA and eta=LLL_DEF_ETA. The result is guaranteed if method = CVPM_PROVED.

◆ enumerate_svp()

static bool enumerate_svp ( int  d,
MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &  gso,
FP_NR< mpfr_t > &  max_dist,
ErrorBoundedEvaluator evaluator,
const vector< enumf > &  pruning,
int  flags 
)
static

◆ get_basis_min() [1/2]

static void get_basis_min ( Z_NR< mpz_t > &  basis_min,
const ZZ_mat< mpz_t > &  b,
int  first,
int  last 
)
static

◆ get_basis_min() [2/2]

static void get_basis_min ( Z_NR< mpz_t > &  basis_min,
MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &  gso,
int  first,
int  last 
)
static

◆ get_gscoords()

static void get_gscoords ( const Matrix< FP_NR< mpfr_t > > &  matrix,
const Matrix< FP_NR< mpfr_t > > &  mu,
const Matrix< FP_NR< mpfr_t > > &  r,
const vector< FP_NR< mpfr_t > > &  v,
vector< FP_NR< mpfr_t > > &  vcoord 
)
static

◆ last_useful_index()

static FPLLL_BEGIN_NAMESPACE int last_useful_index ( const Matrix< FP_NR< mpfr_t > > &  r)
static

◆ shortest_vector() [1/2]

int shortest_vector ( MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &  gso,
vector< Z_NR< mpz_t > > &  sol_coord,
SVPMethod  method,
int  flags 
)

◆ shortest_vector() [2/2]

int shortest_vector ( ZZ_mat< mpz_t > &  b,
vector< Z_NR< mpz_t > > &  sol_coord,
SVPMethod  method = SVPM_PROVED,
int  flags = SVP_DEFAULT 
)

Computes a shortest vector of a lattice. The vectors must be linearly independant and the basis must be LLL-reduced with delta=LLL_DEF_DELTA and eta=LLL_DEF_ETA. The result is guaranteed if method = SVPM_PROVED.

◆ shortest_vector_ex() [1/2]

static int shortest_vector_ex ( MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &  gso,
vector< Z_NR< mpz_t > > &  sol_coord,
SVPMethod  method,
const vector< double > &  pruning,
int  flags,
EvaluatorMode  eval_mode,
long long &  sol_count,
vector< vector< Z_NR< mpz_t > > > *  subsol_coord = nullptr,
vector< enumf > *  subsol_dist = nullptr,
vector< vector< Z_NR< mpz_t > > > *  auxsol_coord = nullptr,
vector< enumf > *  auxsol_dist = nullptr,
int  max_aux_sols = 0,
bool  merge_sol_in_aux = false 
)
static

◆ shortest_vector_ex() [2/2]

static int shortest_vector_ex ( ZZ_mat< mpz_t > &  b,
vector< Z_NR< mpz_t > > &  sol_coord,
SVPMethod  method,
const vector< double > &  pruning,
int  flags,
EvaluatorMode  eval_mode,
long long &  sol_count,
vector< vector< Z_NR< mpz_t > > > *  subsol_coord = nullptr,
vector< enumf > *  subsol_dist = nullptr,
vector< vector< Z_NR< mpz_t > > > *  auxsol_coord = nullptr,
vector< enumf > *  auxsol_dist = nullptr,
int  max_aux_sols = 0 
)
static

◆ shortest_vector_pruning() [1/6]

int shortest_vector_pruning ( MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &  gso,
vector< Z_NR< mpz_t > > &  sol_coord,
const vector< double > &  pruning,
int  flags 
)

◆ shortest_vector_pruning() [2/6]

int shortest_vector_pruning ( MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &  gso,
vector< Z_NR< mpz_t > > &  sol_coord,
vector< vector< Z_NR< mpz_t > > > &  auxsol_coord,
vector< enumf > &  auxsol_dist,
const int  max_aux_sols,
const vector< double > &  pruning,
int  flags 
)

◆ shortest_vector_pruning() [3/6]

int shortest_vector_pruning ( MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &  gso,
vector< Z_NR< mpz_t > > &  sol_coord,
vector< vector< Z_NR< mpz_t > > > &  subsol_coord,
vector< enumf > &  subsol_dist,
const vector< double > &  pruning,
int  flags 
)

◆ shortest_vector_pruning() [4/6]

int shortest_vector_pruning ( ZZ_mat< mpz_t > &  b,
vector< Z_NR< mpz_t > > &  sol_coord,
const vector< double > &  pruning,
int  flags 
)

◆ shortest_vector_pruning() [5/6]

int shortest_vector_pruning ( ZZ_mat< mpz_t > &  b,
vector< Z_NR< mpz_t > > &  sol_coord,
vector< vector< Z_NR< mpz_t > > > &  auxsol_coord,
vector< enumf > &  auxsol_dist,
const int  max_aux_sols,
const vector< double > &  pruning,
int  flags 
)

◆ shortest_vector_pruning() [6/6]

int shortest_vector_pruning ( ZZ_mat< mpz_t > &  b,
vector< Z_NR< mpz_t > > &  sol_coord,
vector< vector< Z_NR< mpz_t > > > &  subsol_coord,
vector< enumf > &  subsol_dist,
const vector< double > &  pruning,
int  flags 
)

◆ shortest_vectors()

int shortest_vectors ( MatGSOInterface< Z_NR< mpz_t >, FP_NR< mpfr_t > > &  gso,
vector< vector< Z_NR< mpz_t > > > &  sol_coord,
vector< enumf > &  sol_dist,
const int  max_sols,
SVPMethod  method,
int  flags 
)