Lattice Estimator 0.1 documentation

Documentation

  • Introduction
  • LWE Primal Attacks
  • LWE Dual Attacks
  • Coded-BKW for LWE
  • Arora-GB
  • Contributing

Parameters from the Literature

  • NIST PQC Round 3 Finalists
  • Homomorphic Encryption Standard

API Reference

  • estimator.cost
    • estimator.cost.Cost
      • estimator.cost.Cost.__init__
      • estimator.cost.Cost.clear
      • estimator.cost.Cost.combine
      • estimator.cost.Cost.copy
      • estimator.cost.Cost.filter
      • estimator.cost.Cost.fromkeys
      • estimator.cost.Cost.get
      • estimator.cost.Cost.items
      • estimator.cost.Cost.keys
      • estimator.cost.Cost.pop
      • estimator.cost.Cost.popitem
      • estimator.cost.Cost.register_impermanent
      • estimator.cost.Cost.reorder
      • estimator.cost.Cost.repeat
      • estimator.cost.Cost.sanity_check
      • estimator.cost.Cost.setdefault
      • estimator.cost.Cost.str
      • estimator.cost.Cost.update
      • estimator.cost.Cost.values
      • estimator.cost.Cost.impermanents
      • estimator.cost.Cost.key_map
      • estimator.cost.Cost.val_map
  • estimator.errors
  • estimator.gb
    • estimator.gb.AroraGB
      • estimator.gb.AroraGB.__init__
      • estimator.gb.AroraGB.cost_Gaussian_like
      • estimator.gb.AroraGB.cost_bounded
      • estimator.gb.AroraGB.equations_for_secret
      • estimator.gb.AroraGB.ps_single
    • estimator.gb.gb_cost
  • estimator.io
    • estimator.io.Logging
      • estimator.io.Logging.__init__
      • estimator.io.Logging.log
      • estimator.io.Logging.set_level
      • estimator.io.Logging.CRITICAL
      • estimator.io.Logging.DEBUG
      • estimator.io.Logging.ERROR
      • estimator.io.Logging.INFO
      • estimator.io.Logging.LEVEL0
      • estimator.io.Logging.LEVEL1
      • estimator.io.Logging.LEVEL2
      • estimator.io.Logging.LEVEL3
      • estimator.io.Logging.LEVEL4
      • estimator.io.Logging.LEVEL5
      • estimator.io.Logging.NOTSET
      • estimator.io.Logging.WARNING
      • estimator.io.Logging.detail_logger
      • estimator.io.Logging.logger
      • estimator.io.Logging.loggers
      • estimator.io.Logging.plain_logger
  • estimator.lwe
    • estimator.lwe.Estimate
      • estimator.lwe.Estimate.__init__
      • estimator.lwe.Estimate.rough
  • estimator.lwe_bkw
    • estimator.lwe_bkw.CodedBKW
      • estimator.lwe_bkw.CodedBKW.N
      • estimator.lwe_bkw.CodedBKW.__init__
      • estimator.lwe_bkw.CodedBKW.b
      • estimator.lwe_bkw.CodedBKW.cost
      • estimator.lwe_bkw.CodedBKW.t1
      • estimator.lwe_bkw.CodedBKW.ntest
  • estimator.lwe_dual
    • estimator.lwe_dual.DualHybrid
      • estimator.lwe_dual.DualHybrid.__init__
      • estimator.lwe_dual.DualHybrid.fft_solver
      • estimator.lwe_dual.DualHybrid.optimize_blocksize
      • estimator.lwe_dual.DualHybrid.cost
      • estimator.lwe_dual.DualHybrid.dual_reduce
    • estimator.lwe_dual.dual
    • estimator.lwe_dual.dual_hybrid
  • estimator.lwe_guess
    • estimator.lwe_guess.Distinguisher
      • estimator.lwe_guess.Distinguisher.__init__
    • estimator.lwe_guess.ExhaustiveSearch
      • estimator.lwe_guess.ExhaustiveSearch.__init__
    • estimator.lwe_guess.MITM
      • estimator.lwe_guess.MITM.X_range
      • estimator.lwe_guess.MITM.__init__
      • estimator.lwe_guess.MITM.cost
      • estimator.lwe_guess.MITM.local_range
      • estimator.lwe_guess.MITM.mitm_analytical
      • estimator.lwe_guess.MITM.locality
    • estimator.lwe_guess.guess_composition
      • estimator.lwe_guess.guess_composition.__init__
      • estimator.lwe_guess.guess_composition.dense_solve
      • estimator.lwe_guess.guess_composition.gammaf
      • estimator.lwe_guess.guess_composition.sparse_solve
  • estimator.lwe_parameters
    • estimator.lwe_parameters.LWEParameters
      • estimator.lwe_parameters.LWEParameters.__init__
      • estimator.lwe_parameters.LWEParameters.amplify_m
      • estimator.lwe_parameters.LWEParameters.normalize
      • estimator.lwe_parameters.LWEParameters.switch_modulus
      • estimator.lwe_parameters.LWEParameters.updated
      • estimator.lwe_parameters.LWEParameters.m
      • estimator.lwe_parameters.LWEParameters.tag
      • estimator.lwe_parameters.LWEParameters.n
      • estimator.lwe_parameters.LWEParameters.q
      • estimator.lwe_parameters.LWEParameters.Xs
      • estimator.lwe_parameters.LWEParameters.Xe
  • estimator.lwe_primal
    • estimator.lwe_primal.PrimalHybrid
      • estimator.lwe_primal.PrimalHybrid.__init__
      • estimator.lwe_primal.PrimalHybrid.babai_cost
      • estimator.lwe_primal.PrimalHybrid.cost_zeta
      • estimator.lwe_primal.PrimalHybrid.svp_dimension
      • estimator.lwe_primal.PrimalHybrid.cost
    • estimator.lwe_primal.PrimalUSVP
      • estimator.lwe_primal.PrimalUSVP.__init__
      • estimator.lwe_primal.PrimalUSVP.cost_gsa
      • estimator.lwe_primal.PrimalUSVP.cost_simulator
    • estimator.lwe_primal.primal_bdd
  • estimator.nd
    • estimator.nd.NoiseDistribution
      • estimator.nd.NoiseDistribution.CenteredBinomial
      • estimator.nd.NoiseDistribution.DiscreteGaussian
      • estimator.nd.NoiseDistribution.DiscreteGaussianAlpha
      • estimator.nd.NoiseDistribution.SparseTernary
      • estimator.nd.NoiseDistribution.Uniform
      • estimator.nd.NoiseDistribution.UniformMod
      • estimator.nd.NoiseDistribution.__init__
      • estimator.nd.NoiseDistribution.get_hamming_weight
      • estimator.nd.NoiseDistribution.support_size
      • estimator.nd.NoiseDistribution.bounds
      • estimator.nd.NoiseDistribution.density
      • estimator.nd.NoiseDistribution.gaussian_tail_bound
      • estimator.nd.NoiseDistribution.gaussian_tail_prob
      • estimator.nd.NoiseDistribution.is_Gaussian_like
      • estimator.nd.NoiseDistribution.is_bounded
      • estimator.nd.NoiseDistribution.is_sparse
      • estimator.nd.NoiseDistribution.mean
      • estimator.nd.NoiseDistribution.n
      • estimator.nd.NoiseDistribution.tag
      • estimator.nd.NoiseDistribution.stddev
    • estimator.nd.sigmaf
    • estimator.nd.stddevf
  • estimator.prob
    • estimator.prob.amplify
    • estimator.prob.amplify_sigma
    • estimator.prob.babai
    • estimator.prob.drop
    • estimator.prob.mitm_babai_probability
  • estimator.reduction
    • estimator.reduction.ABFKSW20
      • estimator.reduction.ABFKSW20.LLL
      • estimator.reduction.ABFKSW20.__init__
      • estimator.reduction.ABFKSW20.beta
      • estimator.reduction.ABFKSW20.delta
      • estimator.reduction.ABFKSW20.short_vectors
      • estimator.reduction.ABFKSW20.short_vectors_simple
      • estimator.reduction.ABFKSW20.svp_repeat
    • estimator.reduction.ABLR21
      • estimator.reduction.ABLR21.LLL
      • estimator.reduction.ABLR21.__init__
      • estimator.reduction.ABLR21.beta
      • estimator.reduction.ABLR21.delta
      • estimator.reduction.ABLR21.short_vectors
      • estimator.reduction.ABLR21.short_vectors_simple
      • estimator.reduction.ABLR21.svp_repeat
    • estimator.reduction.ADPS16
      • estimator.reduction.ADPS16.LLL
      • estimator.reduction.ADPS16.__init__
      • estimator.reduction.ADPS16.beta
      • estimator.reduction.ADPS16.delta
      • estimator.reduction.ADPS16.short_vectors
      • estimator.reduction.ADPS16.short_vectors_simple
      • estimator.reduction.ADPS16.svp_repeat
    • estimator.reduction.BDGL16
      • estimator.reduction.BDGL16.LLL
      • estimator.reduction.BDGL16.__init__
      • estimator.reduction.BDGL16.beta
      • estimator.reduction.BDGL16.delta
      • estimator.reduction.BDGL16.short_vectors
      • estimator.reduction.BDGL16.short_vectors_simple
      • estimator.reduction.BDGL16.svp_repeat
    • estimator.reduction.CheNgu12
      • estimator.reduction.CheNgu12.LLL
      • estimator.reduction.CheNgu12.__init__
      • estimator.reduction.CheNgu12.beta
      • estimator.reduction.CheNgu12.delta
      • estimator.reduction.CheNgu12.short_vectors
      • estimator.reduction.CheNgu12.short_vectors_simple
      • estimator.reduction.CheNgu12.svp_repeat
    • estimator.reduction.GJ21
      • estimator.reduction.GJ21.LLL
      • estimator.reduction.GJ21.__init__
      • estimator.reduction.GJ21.beta
      • estimator.reduction.GJ21.d4f
      • estimator.reduction.GJ21.delta
      • estimator.reduction.GJ21.short_vectors
      • estimator.reduction.GJ21.short_vectors_simple
      • estimator.reduction.GJ21.svp_repeat
      • estimator.reduction.GJ21.NN_AGPS
    • estimator.reduction.Kyber
      • estimator.reduction.Kyber.LLL
      • estimator.reduction.Kyber.__init__
      • estimator.reduction.Kyber.beta
      • estimator.reduction.Kyber.d4f
      • estimator.reduction.Kyber.delta
      • estimator.reduction.Kyber.short_vectors
      • estimator.reduction.Kyber.short_vectors_simple
      • estimator.reduction.Kyber.svp_repeat
      • estimator.reduction.Kyber.NN_AGPS
    • estimator.reduction.LaaMosPol14
      • estimator.reduction.LaaMosPol14.LLL
      • estimator.reduction.LaaMosPol14.__init__
      • estimator.reduction.LaaMosPol14.beta
      • estimator.reduction.LaaMosPol14.delta
      • estimator.reduction.LaaMosPol14.short_vectors
      • estimator.reduction.LaaMosPol14.short_vectors_simple
      • estimator.reduction.LaaMosPol14.svp_repeat
    • estimator.reduction.MATZOV
      • estimator.reduction.MATZOV.LLL
      • estimator.reduction.MATZOV.__init__
      • estimator.reduction.MATZOV.beta
      • estimator.reduction.MATZOV.d4f
      • estimator.reduction.MATZOV.delta
      • estimator.reduction.MATZOV.short_vectors
      • estimator.reduction.MATZOV.short_vectors_simple
      • estimator.reduction.MATZOV.svp_repeat
      • estimator.reduction.MATZOV.NN_AGPS
    • estimator.reduction.RC
      • estimator.reduction.RC.LLL
      • estimator.reduction.RC.__init__
      • estimator.reduction.RC.beta
      • estimator.reduction.RC.delta
      • estimator.reduction.RC.ABFKSW20
      • estimator.reduction.RC.ABLR21
      • estimator.reduction.RC.ADPS16
      • estimator.reduction.RC.BDGL16
      • estimator.reduction.RC.CheNgu12
      • estimator.reduction.RC.GJ21
      • estimator.reduction.RC.Kyber
      • estimator.reduction.RC.LaaMosPol14
      • estimator.reduction.RC.MATZOV
    • estimator.reduction.ReductionCost
      • estimator.reduction.ReductionCost.LLL
      • estimator.reduction.ReductionCost.__init__
      • estimator.reduction.ReductionCost.beta
      • estimator.reduction.ReductionCost.delta
      • estimator.reduction.ReductionCost.short_vectors
      • estimator.reduction.ReductionCost.short_vectors_simple
      • estimator.reduction.ReductionCost.svp_repeat
    • estimator.reduction.beta
    • estimator.reduction.cost
    • estimator.reduction.delta
  • estimator.simulator
    • estimator.simulator.CN11
    • estimator.simulator.GSA
    • estimator.simulator.normalize
    • estimator.simulator.plot_gso
    • estimator.simulator.qary_simulator
  • estimator.util
    • estimator.util.Bounds
      • estimator.util.Bounds.__init__
      • estimator.util.Bounds.count
      • estimator.util.Bounds.index
      • estimator.util.Bounds.high
      • estimator.util.Bounds.low
    • estimator.util.Task
      • estimator.util.Task.__init__
      • estimator.util.Task.count
      • estimator.util.Task.index
      • estimator.util.Task.catch_exceptions
      • estimator.util.Task.f
      • estimator.util.Task.f_name
      • estimator.util.Task.log_level
      • estimator.util.Task.x
    • estimator.util.TaskResults
      • estimator.util.TaskResults.__init__
    • estimator.util.early_abort_range
      • estimator.util.early_abort_range.__init__
      • estimator.util.early_abort_range.update
      • estimator.util.early_abort_range.x
      • estimator.util.early_abort_range.y
    • estimator.util.local_minimum
      • estimator.util.local_minimum.__init__
      • estimator.util.local_minimum.update
      • estimator.util.local_minimum.neighborhood
      • estimator.util.local_minimum.x
      • estimator.util.local_minimum.y
    • estimator.util.local_minimum_base
      • estimator.util.local_minimum_base.__init__
      • estimator.util.local_minimum_base.update
      • estimator.util.local_minimum_base.x
      • estimator.util.local_minimum_base.y
    • estimator.util.batch_estimate
    • estimator.util.binary_search
    • estimator.util.f_name
    • estimator.util.log2

Appendix

  • Index
  • References
Theme by the Executable Book Project
  • .rst

estimator.util.binary_search

estimator.util.binary_search#

estimator.util.binary_search(f, start, stop, param, step=1, smallerf=<function <lambda>>, log_level=5, *args, **kwds)[source]#

Searches for the best value in the interval [start,stop] depending on the given comparison function.

Parameters
  • start – start of range to search

  • stop – stop of range to search (exclusive)

  • param – the parameter to modify when calling f

  • smallerf – comparison is performed by evaluating smallerf(current, best)

  • step – initially only consider every steps-th value

previous

estimator.util.batch_estimate

next

estimator.util.f_name

By Martin R Albrecht
© Copyright 2021, Martin R Albrecht.