write

Engine.write_plain_matrix(plain_matrix, filename)
Saves the plain matrix to the specified path. - Input: - PlainMatrix - filename: str - Can be an absolute or relative path. - Output: - None

Examples

Using an absolute path

import numpy as np

from desilofhe import Engine

engine = Engine(slot_count=64)

message = np.arange(64 * 64).reshape(64, 64)
plain_matrix = engine.encode_to_plain_matrix(message)
engine.write_plain_matrix(plain_matrix, "/opt/desilo/plain_matrix")

Using a relative path

import numpy as np

from desilofhe import Engine

engine = Engine(slot_count=64)

message = np.arange(64 * 64).reshape(64, 64)
plain_matrix = engine.encode_to_plain_matrix(message)
engine.write_plain_matrix(plain_matrix, "plain_matrix")