decrypt
GLEngine.decrypt(ciphertext, secret_key)
- Decrypts a ciphertext, returning the original message as a
numpy.ndarray.
- Input:
- Output:
- numpy.ndarray
- The default data type is
numpy.double64. If complex numbers were introduced during computation, the output will be in the numpy.complex128 data type.
from desilofhe import GLEngine
engine = GLEngine()
secret_key = engine.create_secret_key()
message = np.ones(engine.shape)
ciphertext = engine.encrypt(message, secret_key)
decrypted = engine.decrypt(ciphertext, secret_key)