Skip to content

Commit

Permalink
reduce whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
malb committed Feb 7, 2024
1 parent f0d7731 commit 5350825
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ Quick Start
SISParameters(n=1024, q=8380417, length_bound=350209, m=2304, norm=+Infinity, tag='Dilithium2_MSIS_WkUnf')
>>> r = SIS.estimate.rough(schemes.Dilithium2_MSIS_WkUnf)
lattice :: rop: ≈2^123.5, red: ≈2^123.5, sieve: ≈2^-332.2, β: 423, η: 423, ζ: 1, d: 2303, prob: 1, ↻: 1, tag: infinity
lattice :: rop: ≈2^123.5, red: ≈2^123.5, sieve: ≈2^-332.2, β: 423, η: 423, ζ: 1, d: 2303, prob: 1, ↻: 1, tag: infinity
>>> r = SIS.estimate(schemes.Dilithium2_MSIS_WkUnf)
lattice :: rop: ≈2^152.2, red: ≈2^151.3, sieve: ≈2^151.1, β: 427, η: 433, ζ: 0, d: 2304, prob: 1, ↻: 1, tag: infinity
lattice :: rop: ≈2^152.2, red: ≈2^151.3, sieve: ≈2^151.1, β: 427, η: 433, ζ: 0, d: 2304, prob: 1, ↻: 1, tag: infinity
.. code-block:: python
Expand All @@ -69,10 +69,10 @@ Quick Start
SISParameters(n=512, q=12289, length_bound=5833.9072, m=1024, norm=2, tag='Falcon512_Unf')
>>> r = SIS.estimate.rough(schemes.Falcon512_Unf)
lattice :: rop: ≈2^121.2, red: ≈2^121.2, δ: 1.003882, β: 415, d: 1024, tag: euclidean
lattice :: rop: ≈2^121.2, red: ≈2^121.2, δ: 1.003882, β: 415, d: 1024, tag: euclidean
>>> r = SIS.estimate(schemes.Falcon512_Unf)
lattice :: rop: ≈2^146.4, red: ≈2^146.4, δ: 1.003882, β: 415, d: 1024, tag: euclidean
lattice :: rop: ≈2^146.4, red: ≈2^146.4, δ: 1.003882, β: 415, d: 1024, tag: euclidean
- `Try it in your browser <https://mybinder.org/v2/gh/malb/lattice-estimator/jupyter-notebooks?labpath=..%2F..%2Ftree%2Fprompt.ipynb>`__.
- `Read the documentation <https://lattice-estimator.readthedocs.io/en/latest/>`__.
Expand Down
12 changes: 6 additions & 6 deletions estimator/sis.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def rough(self, params, jobs=1, catch_exceptions=True):
>>> from estimator import *
>>> _ = SIS.estimate.rough(schemes.Dilithium2_MSIS_WkUnf)
lattice :: rop: ≈2^123.5, red: ≈2^123.5, sieve: ≈2^-332.2, β: 423, η: 423, ζ: 1, d: 2303, ...
lattice :: rop: ≈2^123.5, red: ≈2^123.5, sieve: ≈2^-332.2, β: 423, η: 423, ζ: 1, d: 2303, ...
"""
algorithms = {}
Expand All @@ -59,7 +59,7 @@ def rough(self, params, jobs=1, catch_exceptions=True):
continue
result = res[algorithm]
if result["rop"] != oo:
print(f"{algorithm:20s} :: {result!r}")
print(f"{algorithm:8s} :: {result!r}")

return res

Expand Down Expand Up @@ -87,14 +87,14 @@ def __call__(
EXAMPLE ::
>>> from estimator import *
>>> _ = SIS.estimate(schemes.Dilithium2_MSIS_StrUnf)
lattice :: rop: ≈2^150.8, red: ≈2^149.6, sieve: ≈2^149.9, β: 421, η: 429, ζ: 0, d: 2304, ...
lattice :: rop: ≈2^150.8, red: ≈2^149.6, sieve: ≈2^149.9, β: 421, η: 429, ζ: 0, d: 2304, ...
>>> params = SIS.Parameters(n=113, q=2048, length_bound=512, norm=2)
>>> _ = SIS.estimate(params)
lattice :: rop: ≈2^47.0, red: ≈2^47.0, δ: 1.011391, β: 61, d: 276, tag: euclidean
lattice :: rop: ≈2^47.0, red: ≈2^47.0, δ: 1.011391, β: 61, d: 276, tag: euclidean
>>> _ = SIS.estimate(params.updated(length_bound=16, norm=oo), red_shape_model="cn11")
lattice :: rop: ≈2^65.9, red: ≈2^64.9, sieve: ≈2^64.9, β: 113, η: 142, ζ: 0, d: 2486, ...
lattice :: rop: ≈2^65.9, red: ≈2^64.9, sieve: ≈2^64.9, β: 113, η: 142, ζ: 0, d: 2486, ...
"""

algorithms = {}
Expand Down Expand Up @@ -122,7 +122,7 @@ def __call__(
result = res[algorithm]
if result["rop"] == oo:
continue
print(f"{algorithm:20s} :: {result!r}")
print(f"{algorithm:8s} :: {result!r}")

return res

Expand Down

0 comments on commit 5350825

Please sign in to comment.