lepidopter icon indicating copy to clipboard operation
lepidopter copied to clipboard

Encrypt locally stored data

Open mrphs opened this issue 9 years ago • 10 comments

So if I understand things correctly, if an upload fails for whatever reason, OONI will keep the data on the SD card until it finds room to upload them. We need to make sure this data sits encrypted on the card by default.

mrphs avatar Oct 26 '15 18:10 mrphs

This was not part of the original requirements, but we can see what can be done perhaps.

hellais avatar Oct 27 '15 18:10 hellais

Let's brainstorm on it a little bit and figure the cost/benefit ratio...

mrphs avatar Oct 27 '15 19:10 mrphs

@mrphs indeed, thanks :+1:

hellais avatar Oct 27 '15 20:10 hellais

Encrypting local stored data increases the chances for SD card and consequently possible more SD card failures. We could add this as a feature; on the raspi-config but I 'll say not to the main lepidopter distribution.

anadahz avatar Oct 28 '15 17:10 anadahz

@mrphs should we defer this to future releases? IMHO the tradeoff is not worth the work + the gain.

hellais avatar Nov 18 '15 17:11 hellais

@mrphs @hellais @anadahz I might be able to look into this - using a FUSE container with the crypto loop module might be sufficient in order to ensure that data at rest is encrypted. I agree that the use of locally encrypted storage currently exceeds the cost/benefit ratio, though.

You'd probably have to ensure that ooni-probe always runs in a container to accomplish what I've described.

ghost avatar Dec 16 '15 20:12 ghost

I doubt that encryption will significantly increase chances of SD card failures. AFAIK, there is no write amplification, so what's the reason for increased failure rate?

Another question is key management. How should we store the secret if the RPi should be bootable in unattended way? E.g. due to temporary power failure.

darkk avatar Aug 18 '16 14:08 darkk

Stuff could be asymmetrically encrypted so only the OONI collector/pipeline/whatever can read it? (and not, like, someone seizing a computer running ooni-probe, if that's important)

joelanders avatar Aug 18 '16 15:08 joelanders

@joelanders We're talking about two different considerations if I'm not mistaken. @mrphs is indicating that ooni-probe reports should be encrypted locally before they're sent to an OONI collector. While we could asymmetrically encrypt all of the things, this would be sub-optimal as we'd need to encrypt every file individually.

ghost avatar Aug 20 '16 17:08 ghost

I don't understand; two things == 1) encrypted filesystem, vs. 2) application-level asymmetric encryption?

I was throwing out 2) as an alternative to 1) in response to darkk's "How should we store the secret if the RPi should be bootable in unattended way?"

joelanders avatar Aug 22 '16 17:08 joelanders