mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
feat: support signed execution
Author: aPere3 <alexandre.pere@zama.ai> Co-authored-by: Umut <umutsahin@protonmail.com>
This commit is contained in:
committed by
Quentin Bourgerie
parent
f913c39e5b
commit
e95c53f2ff
@@ -11,11 +11,8 @@ from concrete.compiler import ClientSupport
|
||||
pytest.param([0, 1, 2], id="list"),
|
||||
pytest.param(0.5, id="float"),
|
||||
pytest.param(2**70, id="large int"),
|
||||
pytest.param(-8, id="negative int"),
|
||||
pytest.param("aze", id="str"),
|
||||
pytest.param(np.float64(0.8), id="np.float64"),
|
||||
pytest.param(np.int8(9), id="np.int8"),
|
||||
pytest.param(np.array([1, 2, 3], dtype=np.int64), id="np.array(np.int64)"),
|
||||
],
|
||||
)
|
||||
def test_invalid_arg_type(garbage):
|
||||
|
||||
@@ -108,5 +108,7 @@ def test_client_server_end_to_end(mlir, args, expected_result, keyset_cache):
|
||||
client_parameters, result_serialized
|
||||
)
|
||||
|
||||
output = ClientSupport.decrypt_result(keyset, result_unserialized)
|
||||
output = ClientSupport.decrypt_result(
|
||||
client_parameters, keyset, result_unserialized
|
||||
)
|
||||
assert np.array_equal(output, expected_result)
|
||||
|
||||
@@ -47,7 +47,7 @@ def run(engine, args, compilation_result, keyset_cache):
|
||||
evaluation_keys = key_set.get_evaluation_keys()
|
||||
public_result = engine.server_call(server_lambda, public_arguments, evaluation_keys)
|
||||
# Client
|
||||
result = ClientSupport.decrypt_result(key_set, public_result)
|
||||
result = ClientSupport.decrypt_result(client_parameters, key_set, public_result)
|
||||
return result
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user