diff options
| -rw-r--r-- | re/epa.ipynb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/re/epa.ipynb b/re/epa.ipynb index 67e7973..afafa62 100644 --- a/re/epa.ipynb +++ b/re/epa.ipynb @@ -27,7 +27,7 @@ "from pyecsca.ec.mod import Mod, miller_rabin, gcd\n", "from pyecsca.ec.point import Point\n", "from pyecsca.ec.error import NonInvertibleError\n", - "from pyecsca.ec.mult import LTRMultiplier\n", + "from pyecsca.ec.mult import LTRMultiplier, AccumulationOrder\n", "from pyecsca.sca.re.rpa import MultipleContext\n", "from pyecsca.ec.context import local\n", "from pyecsca.ec.error import UnsatisfiedAssumptionError" @@ -93,9 +93,7 @@ "cell_type": "code", "execution_count": null, "id": "ffce5b71-3029-4219-a45a-1c8d78748fee", - "metadata": { - "scrolled": true - }, + "metadata": {}, "outputs": [], "source": [ "scalars = [int(Mod.random(n)) for _ in range(200)]\n", @@ -103,7 +101,7 @@ "table = [[\"Pair\", \"scalars with trivial gcd\", \"scalars with all multiples with trivial gcds\", \"scalars with invertible final zs\", \"scalars with all multiples's zs invertible\"]]\n", "pair_table = [[None for _ in dbls] for _ in adds]\n", "for pair in formula_pairs:\n", - " mult = LTRMultiplier(*pair, None, False, True, True)\n", + " mult = LTRMultiplier(*pair, None, False, AccumulationOrder.PeqPR, True, True)\n", " mult.init(params, g)\n", " inv = 0\n", " gcds = 0\n", @@ -150,7 +148,7 @@ " real_coords = model.coordinates[\"projective\"]\n", " real_add = real_coords.formulas[\"add-2007-bl\"]\n", " real_dbl = real_coords.formulas[\"dbl-2007-bl\"]\n", - " real_mult = LTRMultiplier(real_add, real_dbl, None, False, True, True)\n", + " real_mult = LTRMultiplier(real_add, real_dbl, None, False, AccumulationOrder.PeqPR, True, True)\n", " params = affine_params.to_coords(real_coords)\n", " point = affine_point.to_model(real_coords, params.curve)\n", " real_mult.init(params, point)\n", @@ -216,7 +214,7 @@ "metadata": {}, "outputs": [], "source": [ - "c = epa_distinguish(simulate_epa_oracle, lambda add,dbl:LTRMultiplier(add, dbl, None, False, True, True))" + "c = epa_distinguish(simulate_epa_oracle, lambda add,dbl:LTRMultiplier(add, dbl, None, False, AccumulationOrder.PeqPR, True, True))" ] }, { @@ -254,7 +252,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.11.5" } }, "nbformat": 4, |
