decrypt
Engine.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 Engine
engine = Engine()
secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)
message = [1, 2, 3]
ciphertext = engine.encrypt(message, public_key)
decrypted = engine.decrypt(ciphertext, secret_key)