1
$\begingroup$

I'm very new to cryptography and encryption so I apologize if the answer to this is well known, but I can't find anything in my research.

The crux of the problem is the need to store data on an offline device which cannot be trusted. Is it possible to encrypt the data in such a way that it cannot be read by the device that encrypts it, but can be read by a server that the device later uploads the data to?

The device can communicate with the server before going offline and capturing data so an exchange of keys can take place before any data is encrypted if that helps.

$\endgroup$
3
  • $\begingroup$ "device which cannot be trusted", "cannot be read by the device that encrypts it", how do you know it isn't making a copy of everything it encrypts? $\endgroup$ Mar 28, 2014 at 5:28
  • $\begingroup$ Sorry, that language wasn't clear. The "cannot be trusted" refers to possibility of physical theft of the device and the ability to inspect any data stored on it. To be more specific, I'm talking about an offline web app used on iPads to capture data at events. Assuming that the app code is served over SSL, and the iPad itself is not compromised I think it can be trusted up until it falls into the hands of someone with malicious intent, at which point the only issue is the data already stored. $\endgroup$
    – Dan Coates
    Mar 28, 2014 at 5:35
  • $\begingroup$ If a random key is used for each "message" and asymmetrically encrypted as per D.W.'s answer, you will be fine. The same way PGP encrypted email works $\endgroup$ Mar 28, 2014 at 5:58

1 Answer 1

5
$\begingroup$

Yes. Use public-key encryption: encrypt the data using the server's public key. You should be able to fill in the details from there.

$\endgroup$
1
  • 1
    $\begingroup$ Thanks, I've read a bit about public key encryption, but it somehow hadn't clicked that it does much exactly what I was asking. $\endgroup$
    – Dan Coates
    Mar 28, 2014 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.