estimator.guess_and_solve

estimator.guess_and_solve(f, n, alpha, q, secret_distribution, success_probability=0.99, **kwds)[source]

Guess components of the secret.

Parameters:
  • f
  • n – LWE dimension n > 0
  • alpha – noise rate 0 ≤ α < 1, noise will have standard deviation αq/sqrt{2π}
  • q – modulus 0 < q
  • secret_distribution – distribution of secret, see module level documentation for details
  • success_probability – targeted success probability < 1

EXAMPLE:

sage: from estimator import guess_and_solve, dual_scale, partial
sage: q = next_prime(2^30)
sage: n, alpha = 512, 8/q
sage: dualg = partial(guess_and_solve, dual_scale)
sage: dualg(n, alpha, q, secret_distribution=((-1,1), 64))
        rop:   2^64.1
          m:      530
        red:   2^64.1
    delta_0: 1.008803
       beta:      111
     repeat:   2^21.6
          d:     1042
          c:    9.027
          k:        0