secretflow.device.kernels#
secretflow.device.kernels.heu#
Functions:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- secretflow.device.kernels.heu.heu_to_heu(self: HEUObject, heu: HEU, config: Optional[HEUMoveConfig] = None)[源代码]#
- secretflow.device.kernels.heu.heu_to_pyu(self: HEUObject, pyu: PYU, config: Optional[HEUMoveConfig] = None)[源代码]#
- secretflow.device.kernels.heu.heu_to_same_heu(self: HEUObject, config: HEUMoveConfig)[源代码]#
- secretflow.device.kernels.heu.heu_to_other_heu(self: DeviceObject, dest_device: HEU, config: HEUMoveConfig)[源代码]#
secretflow.device.kernels.pyu#
Functions:
|
|
|
Transfer pyuobject to the spu. |
|
|
|
Transfer a PYUObject to TEEU. |
- secretflow.device.kernels.pyu.pyu_to_spu(self: PYUObject, spu: SPU, spu_vis: str = 'secret') SPUObject [源代码]#
Transfer pyuobject to the spu.
- 参数:
self – the pyuobject to transfer.
spu – to this SPU device.
spu_vis – optional; SPU object visibility. Value can be: - secret: Secret sharing with protocol spdz-2k, aby3, etc. - public: Public sharing, which means data will be replicated to each node.
- 返回:
the transferred SPUObject.
- secretflow.device.kernels.pyu.pyu_to_heu(self: PYUObject, heu: HEU, config: Optional[HEUMoveConfig] = None)[源代码]#
- secretflow.device.kernels.pyu.pyu_to_teeu(self: PYUObject, teeu: TEEU, allow_funcs: Union[Callable, List[Callable]])[源代码]#
Transfer a PYUObject to TEEU.
Transfer a PYUObject to TEEU, the main steps are: 1) Create an authority with the specific function and enclave through
the authority manager. A data key will be generated for next step.
Use the data key to encrypt the data with AES-GCM.
- 参数:
self – the PYUObject instance.
teeu – the TEEU.
allow_funcs – the function(s) to allow using this PYUObject. Function not in this list can not use this PYUObject.
- 返回:
A TEEUObject whose underlying data is ciphertext.
secretflow.device.kernels.spu#
Functions:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- secretflow.device.kernels.spu.spu_to_pyu(self: SPUObject, pyu: Device, config: Optional[HEUMoveConfig] = None)[源代码]#
- secretflow.device.kernels.spu.spu_to_heu(self: SPUObject, heu: Device, config: Optional[HEUMoveConfig] = None)[源代码]#
- secretflow.device.kernels.spu.psi_df(device: SPU, key: Union[str, List[str], Dict[Device, List[str]]], dfs: List[PYUObject], receiver: str, protocol='KKRT_PSI_2PC', precheck_input=True, sort=True, broadcast_result=True, bucket_size=1048576, curve_type='CURVE_25519', preprocess_path=None, ecdh_secret_key_path=None, dppsi_bob_sub_sampling=0.9, dppsi_epsilon=3) List[PYUObject] [源代码]#
- secretflow.device.kernels.spu.psi_csv(device: SPU, key: Union[str, List[str], Dict[Device, List[str]]], input_path: Union[str, Dict[Device, str]], output_path: Union[str, Dict[Device, str]], receiver: str, protocol='KKRT_PSI_2PC', precheck_input=True, sort=True, broadcast_result=True, bucket_size=1048576, curve_type='CURVE_25519', preprocess_path: Optional[Union[str, Dict[Device, str]]] = None, ecdh_secret_key_path=None, dppsi_bob_sub_sampling=0.9, dppsi_epsilon=3)[源代码]#
- secretflow.device.kernels.spu.psi_join_df(device: SPU, key: Union[str, List[str], Dict[Device, List[str]]], dfs: List[PYUObject], receiver: str, join_party: str, protocol='KKRT_PSI_2PC', precheck_input=True, bucket_size=1048576, curve_type='CURVE_25519') List[PYUObject] [源代码]#
- secretflow.device.kernels.spu.psi_join_csv(device: SPU, key: Union[str, List[str], Dict[Device, List[str]]], input_path: Union[str, Dict[Device, str]], output_path: Union[str, Dict[Device, str]], receiver: str, join_party: str, protocol='KKRT_PSI_2PC', precheck_input=True, bucket_size=1048576, curve_type='CURVE_25519')[源代码]#
secretflow.device.kernels.teeu#
Functions:
|
- secretflow.device.kernels.teeu.teeu_to_pyu(self: TEEUObject, pyu: PYU) PYUObject [源代码]#