Ensuring Integrity of Persistence Files
Hi, we’re working with a client interface where clients connect, provide input, and then disconnect immediately afterward. (Essentially, the client that provides input doesn't need to be the one receiving the output.) Our setup requires continuously accepting new values from different clients, so we're using read_from_file and write_to_file to back up each new value provided.
The challenge we're facing is that a malicious party could potentially modify the persistence file, causing discrepancies between what we read_from_file and what we originally write_to_file, when we spin up mpc program to receive another client input.
We're exploring potential solutions to prevent this. One idea is to implement something similar to an output delivery protocol by tagging the secret-shared portions with random identifiers before calling write_to_file, allowing us to detect any unauthorized modifications.
However, we're unsure how to approach this, as write_to_file appears to function as a black box as instruction, definitely outside Python. Could you suggest alternative approaches, or provide guidance on whether our proposed solution makes sense?
Thanks!