full_size = kmsis * d * (logp - D) + lext * d * logp
hint = 2.25 * kmsis * d
@@ -262,21 +262,21 @@ enablePrint()
printv(f"auto-generated by rf-abdlop-codegen.sage from {params_file}.")
printv(f"")
if not (kmlwe >= 0 and kmlwe == m_2 - kmsis - l):
if not (kmlwe >= 0 and kmlwe == m_2 - kmsis):
err("protocol not simulatable because of the parameters")
printv(
f"the commitment scheme is binding under MSIS({kmsis},{k*m_1 - l + m_2}) with bound={nstr(bound_binding(), prec)})")
f"the commitment scheme is binding under MSIS({kmsis},{k*m_1 + m_2}) with bound={nstr(bound_binding(), prec)})")
printv(
f"the commitment scheme is hiding under MLWE({kmsis+l},{kmlwe}) with sd={nstr(sigma_2, prec)})")
f"the commitment scheme is hiding under MLWE({kmsis},{kmlwe}) with sd={nstr(sigma_2, prec)})")
printv(
f"protocol is simulatable under Hint-MLWE implied by MLWE({kmsis+l},{kmlwe}) with sd={nstr(varsigma_2(), prec)})")
f"protocol is simulatable under Hint-MLWE implied by MLWE({kmsis},{kmlwe}) with sd={nstr(varsigma_2(), prec)})")
eknow = mpf(1)/mpf(Csize)
printv(
f"protocol is knowledge-sound with knowledge error <= 2^({nstr(mp.ceil(mp.log(eknow,2)),prec)}) under MSIS({kmsis},{k*m_1- l + m_2}) with bound={nstr(bound_know_soundness(), prec)})")
f"protocol is knowledge-sound with knowledge error <= 2^({nstr(mp.ceil(mp.log(eknow,2)),prec)}) under MSIS({kmsis},{k*m_1 + m_2}) with bound={nstr(bound_know_soundness(), prec)})")
@@ -270,17 +270,17 @@ if not (kmlwe >= 0 and kmlwe == m_2 - kmsis - lext):
err("protocol not simulatable because of the parameters")
printv(
f"the commitment scheme is binding under MSIS({kmsis},{k*m_1 - lext + m_2}) with bound={nstr(bound_binding(), prec)})")
f"the commitment scheme is binding under MSIS({kmsis},{k*m_1 + m_2}) with bound={nstr(bound_binding(), prec)})")
printv(
f"the commitment scheme is hiding under MLWE({kmsis+l},{kmlwe}) with sd={nstr(sigma_2, prec)})")
f"the commitment scheme is hiding under MLWE({kmsis+lext},{kmlwe}) with sd={nstr(sigma_2, prec)})")
printv(
f"protocol is simulatable under Hint-MLWE implied by MLWE({kmsis+lext},{kmlwe}) with sd={nstr(varsigma_2(), prec)})")
eknow = mpf(1)/mpf(Csize)
printv(
f"protocol is knowledge-sound with knowledge error <= 2^({nstr(mp.ceil(mp.log(eknow,2)),prec)}) under MSIS({kmsis},{k*m_1- lext + m_2}) with bound={nstr(bound_know_soundness(), prec)})")
f"protocol is knowledge-sound with knowledge error <= 2^({nstr(mp.ceil(mp.log(eknow,2)),prec)}) under MSIS({kmsis},{k*m_1 + m_2}) with bound={nstr(bound_know_soundness(), prec)})")
from sage.stats.distributions.discrete_gaussian_polynomial import DiscreteGaussianDistributionPolynomialSampler
from estimator import *
# We do not claim the knowledge of this script and only modify the existant ones from the script subdirectory from the LaZer Library
# We do not claim the knowledge of this script and only modify the existant ones from the script subdirectory from the LaZer Library.
mp.mp.prec = 512 # precision for mp
prec = 8 # precision for nstr
@@ -94,12 +94,14 @@ m_1 = m_1 + l # We keep l as the script of parameters can be used for the lnp fr
# Third point: we enhance k * as we define the commitment scheme over the randomized encoding of size k * m_1
# and need to provide security for this length and not for m_1 only
l = 0
### choices
k = 2
b = 2^(log2q//k)
p = b ** k + 1
lext = 1 # fixed for quad-proof
l = 0
if d not in [64, 128]:
err("d not in [64,128]")
@@ -266,17 +268,17 @@ if not (kmlwe >= 0 and kmlwe == m_2 - kmsis - lext):
err("protocol not simulatable because of the parameters")
printv(
f"the commitment scheme is binding under MSIS({kmsis},{k*m_1 - lext + m_2}) with bound={nstr(bound_binding(), prec)})")
f"the commitment scheme is binding under MSIS({kmsis},{k*m_1 + m_2}) with bound={nstr(bound_binding(), prec)})")
printv(
f"the commitment scheme is hiding under MLWE({kmsis+l},{kmlwe}) with sd={nstr(sigma_2, prec)})")
f"the commitment scheme is hiding under MLWE({kmsis+lext},{kmlwe}) with sd={nstr(sigma_2, prec)})")
printv(
f"protocol is simulatable under Hint-MLWE implied by MLWE({kmsis+lext},{kmlwe}) with sd={nstr(varsigma_2(), prec)})")
eknow = mpf(1)/mpf(Csize)
printv(
f"protocol is knowledge-sound with knowledge error <= 2^({nstr(mp.ceil(mp.log(eknow,2)),prec)}) under MSIS({kmsis},{k*m_1- lext + m_2}) with bound={nstr(bound_know_soundness(), prec)})")
f"protocol is knowledge-sound with knowledge error <= 2^({nstr(mp.ceil(mp.log(eknow,2)),prec)}) under MSIS({kmsis},{k*m_1 + m_2}) with bound={nstr(bound_know_soundness(), prec)})")