2.1.7. aijack.defense.paillier package#

2.1.7.1. Submodules#

2.1.7.2. aijack.defense.paillier.fed_wrapper module#

class aijack.defense.paillier.fed_wrapper.PaillierGradientClientManager(*args, **kwargs)[source]#

Bases: aijack.manager.base.BaseManager

Client Manager for secure aggregation with Paillier Encryption

attach(cls)[source]#
aijack.defense.paillier.fed_wrapper.attach_paillier_to_client_for_encrypted_grad(cls, pk, sk)[source]#

Makes the client class communicate the encrypted gradients with paillier encryption scheme.

Parameters
  • cls – client class

  • pk – public key

  • sk – secret key

2.1.7.3. aijack.defense.paillier.torch_wrapper module#

class aijack.defense.paillier.torch_wrapper.PaillierTensor(paillier_array)[source]#

Bases: object

torch.Tensor-like object for Paillier Encryption

add(other)[source]#
cpu()[source]#
decrypt(sk, device='cpu')[source]#
detach()[source]#
linear(w, bias)[source]#
matmul(other)[source]#
mul(other)[source]#
numpy()[source]#
sub(other)[source]#
tensor(sk=None)[source]#
aijack.defense.paillier.torch_wrapper.implements(torch_function)[source]#

Registers a torch function override for PaillierTensor

2.1.7.4. Module contents#