From 5da1d167c203395103d220c450e29fece08f4198 Mon Sep 17 00:00:00 2001 From: J08nY Date: Wed, 19 Feb 2020 18:29:53 +0100 Subject: Flesh out client, add implementation tests. --- test/test_builder.py | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'test/test_builder.py') diff --git a/test/test_builder.py b/test/test_builder.py index a16f714..3d1651a 100644 --- a/test/test_builder.py +++ b/test/test_builder.py @@ -1,38 +1,12 @@ from unittest import TestCase -import tempfile from click.testing import CliRunner -from pyecsca.ec.curves import get_params -from pyecsca.ec.mult import LTRMultiplier -from pyecsca.ec.configuration import HashType, RandomMod, Multiplication, Squaring, Reduction -from pyecsca.codegen.common import Platform, DeviceConfiguration -from pyecsca.codegen.render import render_and_build from pyecsca.codegen.builder import build_impl, list_impl class BuilderTests(TestCase): - def test_basic_build(self): - platform = Platform.HOST - hash_type = HashType.SHA1 - mod_rand = RandomMod.REDUCE - mult = Multiplication.BASE - sqr = Squaring.BASE - red = Reduction.BASE - params = get_params("secg", "secp128r1", "projective") - model = params.curve.model - coords = params.curve.coordinate_model - add = coords.formulas["add-1998-cmo"] - dbl = coords.formulas["dbl-1998-cmo"] - scl = coords.formulas["z"] - formulas = [add, dbl, scl] - scalarmult = LTRMultiplier(add, dbl, scl) - config = DeviceConfiguration(model, coords, formulas, scalarmult, hash_type, mod_rand, mult, - sqr, red, platform, True, True, True) - temp = tempfile.mkdtemp() - render_and_build(config, temp, True) - def test_cli_build(self): runner = CliRunner() with runner.isolated_filesystem(): -- cgit v1.3.1