5.1.1.7. FedEval.secure_protocols
5.1.1.7.1. Submodules
5.1.1.7.2. Package Contents
5.1.1.7.2.1. Classes
5.1.1.7.2.2. Functions
|
|
|
- FedEval.secure_protocols.aes_gcm_encrypt(private_key, message, user_add='Default Additional Information')
- FedEval.secure_protocols.aes_gcm_decrypt(key, received_message)
- class FedEval.secure_protocols.GaloisFieldNumber(encoding: int, exponent: int, gfp: GaloisFieldParams)
- BASE = 16
- LOG2_BASE
- FLOAT_MANTISSA_BITS
- FULL_PRECISION
- classmethod encode(scalar, gfp: GaloisFieldParams, exponent=FULL_PRECISION)
- decode()
Decode plaintext and return the result. :returns:
- the decoded number. N.B. if the number
returned is an integer, it will not be of type float.
- Return type:
an int or float
- Raises:
OverflowError – if overflow is detected in the decrypted number.
- decrease_exponent_to(new_exp)
- __add__(other)
- __iadd__(other)
- __radd__(other)
- __sub__(other)
- __rsub__(other)
- __mul__(other)
- __rmul__(other)
- __truediv__(other)
- __rtruediv__(other)
- class FedEval.secure_protocols.ShamirSecretSharing(m, n, p=2**521 - 1)
- _eval_at(poly, x)
Evaluates polynomial (coefficient tuple) at x, used to generate a shamir pool in make_random_shares below.
Generates a random shamir pool for a given secret, returns share points.
- recon(shares)
Recover the secret from share points (x, y points on the polynomial).