serialized_nbytes

DecryptedShare.serialized_nbytes
Shows the size of a decrypted share when serialized.
  • Output
    • serialized_nbytes, int
from desilofhe import Engine

engine = Engine(use_multiparty=True)
secret_key_1 = engine.create_secret_key()
secret_key_2 = engine.create_secret_key()
public_key_a = engine.create_public_key_a()
public_key_b1 = engine.create_public_key_b(secret_key1, public_key_a)
public_key_b2 = engine.create_public_key_b(secret_key2, public_key_a)
public_key = engine.create_multiparty_public_key(
    [public_key_b1, public_key_b2], public_key_a
)

message = [1] * 2 * engine.slot_count
ciphertext = engine.encrypt(message, public_key)
decrypted_share = engine.individual_decrypt(ciphertext, secret_key_1)
serialized_nbytes = decrypted_share.serialized_nbytes