xtrace_sdk.x_vec.crypto.encryption.homomorphic_base¶
Attributes¶
Classes¶
The Interface which all homomorphic encryption primitives should implement. |
Module Contents¶
- xtrace_sdk.x_vec.crypto.encryption.homomorphic_base.T_CT¶
- xtrace_sdk.x_vec.crypto.encryption.homomorphic_base.T_PT¶
- xtrace_sdk.x_vec.crypto.encryption.homomorphic_base.T_KEY¶
- xtrace_sdk.x_vec.crypto.encryption.homomorphic_base.T_KP¶
- class xtrace_sdk.x_vec.crypto.encryption.homomorphic_base.HomomorphicBase¶
Bases:
Generic[T_CT,T_PT,T_KP,T_KEY],abc.ABCThe Interface which all homomorphic encryption primitives should implement.
- Parameters:
ABC (abc.ABC) – Abstract class
- static key_gen(*args, **kwargs)¶
- Abstractmethod:
- Parameters:
args (Any)
kwargs (Any)
- Return type:
Key generation routine.
- static encrypt(pt, key)¶
-
Encrypts a plain text with key
- static decrypt(ct, key)¶
-
decrypts a cipher
- static add(ct1, ct2, key)¶
-
homomorphically add two ciphers and return ct3 such that decrypt(ct3)= decrypt(ct1) + decrypt(ct2)
- static multiply(ct1, ct2, key)¶
-
homomorphically multiply two ciphers and return ct3 such that decrypt(ct3)= decrypt(ct1) * decrypt(ct2)