Skip to content

Commit

Permalink
include chaloy bkz time estimation in the form as LaaMosPol14
Browse files Browse the repository at this point in the history
  • Loading branch information
gong-cr committed Sep 12, 2024
1 parent 8f1ff7e commit b73f820
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions estimator/reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,13 +650,12 @@ def __call__(self, beta, d, B=None):

class ChaLoy21(ReductionCost):

__name__ = "ChaLoy21"
__name__ = "ChaLoy21_CoreSVP"
short_vectors = ReductionCost._short_vectors_sieve

def __call__(self, beta, d, B=None):
"""
See [AC:ChaLoy21]_.
Runtime estimation for solving the Core-SVP using quantum sieving, based on the work in [AC:ChaLoy21]_.
:param beta: Block size ≥ 2.
:param d: Lattice dimension.
Expand All @@ -665,6 +664,23 @@ def __call__(self, beta, d, B=None):

return ZZ(2) ** RR(0.2570 * beta)

class ChaLoy21_BKZ(ReductionCost):
__name__ = "ChaLoy21_BKZ"
short_vectors = ReductionCost._short_vectors_sieve

def __call__(self, beta, d, B=None):
"""
Total runtime estimation for the BKZ (Block Korkine-Zolotarev) algorithm,
including multiple calls for solving Core-SVP using quantum sieving, based on the work in [AC:ChaLoy21]_.
:param beta: Block size ≥ 2.
:param d: Lattice dimension.
:param B: Bit-size of entries.
"""

return self.LLL(d, B) + ZZ(2) ** RR(
(0.2570 * beta + 16.4 + log(self.svp_repeat(beta, d), 2))
)

class Kyber(ReductionCost):
__name__ = "Kyber"
Expand Down Expand Up @@ -1012,3 +1028,4 @@ class RC:
GJ21 = GJ21()
LaaMosPol14 = LaaMosPol14()
ChaLoy21 = ChaLoy21()
ChaLoy21_BKZ = ChaLoy21_BKZ()

0 comments on commit b73f820

Please sign in to comment.