Score:1

Is it possible to send a file that cannot be opened or copied by the reciever, but only by a pre made program?

tw flag

I couldn't think of a better question to ask, but I will explain more here.

I want to be able to send a Word document to a server that will work with the document data. Are there any good ways to do that without the owner of the server to be able to read the content of the document him/herself? I only want a pre-made program on the server to be able to access the content. Eventually, when the program on the server is finished with modifying the document, it will get sent back to me. Are there any ways to make sure the document disappears from the server, and don't get copied from the server?

I may be waay of regarding what's really possible to do with cryptography here. I am a beginner, and am trying to learn more.

fgrieu avatar
ng flag
There is no cryptographic solution "to make sure the document disappears from the server, and don't get copied from the server". The only option I see for this is a trusted server; e.g, an HSM.
Score:2
ng flag

The answer to this is "yes in theory, probably not in practice".

A Fully Homomorphic Encryption (FHE) scheme is a traditional encryption scheme with an additional "evaluation" algorithm. This means that, given a ciphertext $\mathsf{Enc}_{pk}(m)$, you can (for any circuit $C$) compute:

$$\mathsf{Eval}_{pk}(C,\mathsf{Enc}_{pk}(m))$$

to get an encryption of $C(m)$. Note that $\mathsf{Eval}$ is a publicly computable function, but you are operating on encrypted data the whole time, e.g. this notion seems to be (precisely) what you want.

The issue with FHE is mainly of efficiency. The programs evaluated with FHE are generally represented as circuits (rather than arbitrary turing machines). This means that the control flow of the program is fixed, so for an if statement you have to evaluate both branches of the computation.

For certain standard constructs (say HashMaps), this limitation means that I don't think anyone really knows how to implement them with FHE (without taking a massive efficiency hit). Depending on the precise program you want to evaluate this may be prohibitive.

There are definitely applications where FHE is currently feasible (mostly in computing statistics of encrypted data), but to evaluate the feasibility of what you want we would need to know a better description of precisely what you want to do, and for general-purpose computing the answer tends to be "it is infeasible" currently.

Gaddz avatar
tw flag
Thanks for the detailed reply! I will read more into FHE. To be more precise on what i want: I want to send a word document to a server. Then I want the server to convert that document to a PDF file with a program made by me. I want this conversion to happen without/with the least possibility that the owner of the server can copy, read or crack the data on the word file. The word file is only supposed to be seen and owned by me.
Mark avatar
ng flag
I do not know in detail how a word document to pdf conversion occurs, but it is unlikely to be able to be done efficiently via FHE. If you write the program as a boolean circuit, you can attempt to use the FHEW/TFHE cryptosystem. If you write the program as an arithmetic circuit, you can attempt to use BGV/GSW/CKKS. There are a number of implementations of these you could look into (for example [HElib](https://homenc.github.io/HElib/), or [SEAL](https://github.com/Microsoft/SEAL)), but I would overall be pessimistic.
Gaddz avatar
tw flag
Okay. Again, thanks :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.