diff options
| author | J08nY | 2020-02-19 18:29:53 +0100 |
|---|---|---|
| committer | J08nY | 2020-02-19 18:29:53 +0100 |
| commit | 5da1d167c203395103d220c450e29fece08f4198 (patch) | |
| tree | fdc8fb7f0fbf2d2aaab46c2cb8a90a8176058292 /test/test_builder.py | |
| parent | f04c640c05e9ffe894f67194832623e28a8000f5 (diff) | |
| download | pyecsca-codegen-5da1d167c203395103d220c450e29fece08f4198.tar.gz pyecsca-codegen-5da1d167c203395103d220c450e29fece08f4198.tar.zst pyecsca-codegen-5da1d167c203395103d220c450e29fece08f4198.zip | |
Flesh out client, add implementation tests.
Diffstat (limited to 'test/test_builder.py')
| -rw-r--r-- | test/test_builder.py | 26 |
1 files changed, 0 insertions, 26 deletions
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(): |
