estimator.lwe_guess.guess_composition

estimator.lwe_guess.guess_composition#

class estimator.lwe_guess.guess_composition(f)[source]#

Create a generic composition of guessing and f.

__call__(params, log_level=5, **kwds)[source]#

Guess components of a secret then call f.

Parameters:

params – LWE parameters.

EXAMPLE:

>>> from estimator import *
>>> from estimator.lwe_guess import guess_composition
>>> guess_composition(LWE.primal_usvp)(schemes.Kyber512.updated(Xs=ND.SparseTernary(16)))
rop: ≈2^102.4, red: ≈2^102.4, δ: 1.007632, β: 144, d: 483, tag: usvp, ↻: ≈2^31.8, ζ: 235, |S|: 1, ...

Compare:

>>> LWE.primal_hybrid(schemes.Kyber512.updated(Xs=ND.SparseTernary(16)))
rop: ≈2^85.5, red: ≈2^84.5, svp: ≈2^84.5, β: 105, η: 2, ζ: 364, |S|: ≈2^85.0, d: 316, prob: ≈2^-23.2, ↻:...

Methods

__init__(f)

Create a generic composition of guessing and f.

dense_solve(f, params[, log_level])

Guess components of a dense secret then call f.

gammaf(n, h, zeta, base[, g])

Find optimal hamming weight for sparse guessing.

sparse_solve(f, params[, log_level])

Guess components of a sparse secret then call f.