Files
concrete/docs/dev/api/concrete.compiler.client_parameters.md
2024-10-07 08:45:33 +02:00

5.8 KiB

module concrete.compiler.client_parameters

Client parameters.


class ClientParameters

ClientParameters are public parameters used for key generation.

It's a compilation artifact that describes which and how public and private keys should be generated, and used to encrypt arguments of the compiled function.

method __init__

__init__(client_parameters: ClientParameters)

Wrap the native Cpp object.

Args:

  • client_parameters (_ClientParameters): object to wrap

Raises:

  • TypeError: if client_parameters is not of type _ClientParameters

method deserialize

deserialize(serialized_params: bytes)  ClientParameters

Unserialize ClientParameters from bytes of serialized_params.

Args:

  • serialized_params (bytes): previously serialized ClientParameters

Raises:

  • TypeError: if serialized_params is not of type bytes

Returns:

  • ClientParameters: deserialized object

method function_list

function_list()  List[str]

Return the list of function names.

Returns:

  • List[str]: list of the names of the functions.

method input_keyid_at

input_keyid_at(input_idx: int, circuit_name: str = '<lambda>')  int

Get the keyid of a selected encrypted input in a given circuit.

Args:

  • input_idx (int): index of the input in the circuit.
  • circuit_name (str): name of the circuit containing the desired input.

Raises:

  • TypeError: if arguments aren't of expected types

Returns:

  • int: keyid

method input_signs

input_signs()  List[bool]

Return the sign information of inputs.

Returns:

  • List[bool]: list of booleans to indicate whether the inputs are signed or not

method input_variance_at

input_variance_at(input_idx: int, circuit_name: str)  float

Get the variance of a selected encrypted input in a given circuit.

Args:

  • input_idx (int): index of the input in the circuit.
  • circuit_name (str): name of the circuit containing the desired input.

Raises:

  • TypeError: if arguments aren't of expected types

Returns:

  • float: variance

method lwe_secret_key_param

lwe_secret_key_param(key_id: int)  LweSecretKeyParam

Get the parameters of a selected LWE secret key.

Args:

  • key_id (int): keyid to get parameters from

Raises:

  • TypeError: if arguments aren't of expected types

Returns:

  • LweSecretKeyParam: LWE secret key parameters

method output_signs

output_signs()  List[bool]

Return the sign information of outputs.

Returns:

  • List[bool]: list of booleans to indicate whether the outputs are signed or not

method serialize

serialize()  bytes

Serialize the ClientParameters.

Returns:

  • bytes: serialized object