__len__
Ciphertext.__len__
- Returns the length of the ciphertext. If a ciphertext represents data that is longer than the engine's slot count, it is internally encrypted once per every slot count. This length represents the total number of encrypted data divided by the engine's slot count.
from desilofhe import Engine
engine = Engine()
secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)
message = [1] * 2 * engine.slot_count
cipehrtext = engine.encrypt(message, public_key)
length = len(ciphertext) # 2