diff --git a/.gitmodules b/.gitmodules index e69de29..a90b78d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "python/lattice-estimator"] + path = python/lattice-estimator + url = https://github.com/malb/lattice-estimator.git diff --git a/python/CCbound.py b/python/CCbound.py index 4189a58..8ecfa26 100644 --- a/python/CCbound.py +++ b/python/CCbound.py @@ -212,8 +212,8 @@ def romnoisecalc(brP,ikP,privksP,ROMaddress): # blindrotate(lvl02param,dists) # GateBootstrapping(lvl01param,lvl10param,dists) # GateBootstrapping(lvl12param,lvl21param,dists) -# privatekeyswitching(lvl11param,dists) -privatekeyswitching(lvl21param,dists) +privatekeyswitching(lvl11param,dists) +# privatekeyswitching(lvl21param,dists) # privatekeyswitching(lvl22param,dists) # annihilatekeyswitching(lvl2param,dists) # CircuitBootstrapping(lvl02param,lvl21param,dists) diff --git a/python/lattice-estimator b/python/lattice-estimator new file mode 160000 index 0000000..09e235e --- /dev/null +++ b/python/lattice-estimator @@ -0,0 +1 @@ +Subproject commit 09e235e28e7888cfd3f4408eb266ffc35020ab0c diff --git a/python/newTFHE.py b/python/newTFHE.py new file mode 100644 index 0000000..7bc3008 --- /dev/null +++ b/python/newTFHE.py @@ -0,0 +1,12 @@ +#!/bin/python3 +import importlib +estimator = importlib.import_module(".estimator","lattice-estimator") +# param = estimator.schemes.TFHE630 +param = estimator.lwe_parameters.LWEParameters( + n=586, + q=2 ** 32, + Xs=estimator.nd.NoiseDistribution.UniformMod(2), + Xe=estimator.nd.NoiseDistribution.DiscreteGaussian(stddev=0.000_092_511_997_467_675_6 * 2 ** 32), + tag="TFHE586", +) +r = estimator.LWE.estimate(param) \ No newline at end of file