estimator.ntru.Estimate

estimator.ntru.Estimate#

class estimator.ntru.Estimate[source]#
__call__(params, red_cost_model=<estimator.reduction.MATZOV object>, red_shape_model='gsa', deny_list=(), add_list=(), jobs=1, catch_exceptions=True)[source]#

Run all estimates.

Parameters:
  • params – NTRU parameters.

  • red_cost_model – How to cost lattice reduction.

  • red_shape_model – How to model the shape of a reduced basis (applies to primal attacks)

  • deny_list – skip these algorithms

  • add_list – add these (name, function) pairs to the list of algorithms to estimate.a

  • jobs – Use multiple threads in parallel.

  • catch_exceptions – When an estimate fails, just print a warning.

EXAMPLE

>>> from estimator import *
>>> _ = NTRU.estimate(schemes.NTRUHRSS701Enc)
usvp                 :: rop: ≈2^162.1, red: ≈2^162.1, δ: 1.003557, β: 470, d: 1317, tag: usvp
bdd                  :: rop: ≈2^158.7, red: ≈2^157.7, svp: ≈2^157.7, β: 454, η: 489, d: 1306, tag: bdd
bdd_hybrid           :: rop: ≈2^158.7, red: ≈2^157.7, svp: ≈2^157.7, β: 454, η: 489, ζ: 0, |S|: 1, d: ...
bdd_mitm_hybrid      :: rop: ≈2^233.0, red: ≈2^232.1, svp: ≈2^232.0, β: 469, η: 2, ζ: 178, |S|: ...

>>> params = NTRU.Parameters(n=113, q=512, Xs=ND.UniformMod(3), Xe=ND.UniformMod(3))
>>> _ = NTRU.estimate(params, catch_exceptions=False)
usvp                 :: rop: ≈2^46.0, red: ≈2^46.0, δ: 1.011516, β: 59, d: 221, tag: usvp
dsd                  :: rop: ≈2^37.9, red: ≈2^37.9, δ: 1.013310, β: 31, d: 226, tag: dsd
bdd                  :: rop: ≈2^42.4, red: ≈2^41.0, svp: ≈2^41.8, β: 41, η: 70, d: 225, tag: bdd
bdd_hybrid           :: rop: ≈2^42.4, red: ≈2^41.0, svp: ≈2^41.8, β: 41, η: 70, ζ: 0, |S|: 1, d: 226, ...
bdd_mitm_hybrid      :: rop: ≈2^55.6, red: ≈2^54.7, svp: ≈2^54.6, β: 41, η: 2, ζ: 32, |S|: ≈2^50.7, ...

Methods

__init__()

rough(params[, jobs, catch_exceptions])

This function makes the following somewhat routine assumptions: