mirror of
https://github.com/luxfi/lattice-estimator.git
synced 2026-10-30 16:21:33 +00:00
Also: add SparseBinary, Binary, Ternary as noise distributions :). Note: this is a breaking change. You have to change the way you constructe ND.SparseTernary objects! Benefit: you don't have to specify the dimension `n` anymore when putting it in a LWEParameters/NTRUParameters object :).
19 lines
588 B
ReStructuredText
19 lines
588 B
ReStructuredText
.. _Coded-BKW for LWE:
|
|
|
|
Coded-BKW for LWE
|
|
=================
|
|
|
|
We construct an example LWE instance::
|
|
|
|
from estimator import *
|
|
params = LWE.Parameters(n=400, q=7981, Xs=ND.SparseTernary(16), Xe=ND.CenteredBinomial(4), m=800)
|
|
params
|
|
|
|
and estimate the cost of Coded-BKW [C:GuoJohSta15]_, [C:KirFou15]_::
|
|
|
|
LWE.coded_bkw(params)
|
|
|
|
All BKW variants require *a lot* of samples. As called above, the algorithm will produce the required samples from what it is given, which increases the noise. Let's pretend we have as many as we like::
|
|
|
|
LWE.coded_bkw(params.updated(m=2**100))
|