estimator.prob.mitm_babai_probability

estimator.prob.mitm_babai_probability#

estimator.prob.mitm_babai_probability(r, stddev, q, fast=False)[source]#

Compute the “e-admissibility” probability associated to the mitm step, according to [EPRINT:SonChe19]

Params r:

the squared GSO lengths

Params stddev:

the std.dev of the error distribution

Params q:

the LWE modulus

Parameters:

fast – toggle for setting p = 1 (faster, but underestimates security)

Returns:

probability for the mitm process

# NOTE: the model sometimes outputs negative probabilities, we set p = 0 in this case