OpenSensing / ios-opensensing

OpenSense iOS library and OpenSense Collector app
4 stars 2 forks source link

encryption slowness #11

Open RogerTangos opened 9 years ago

RogerTangos commented 9 years ago

Hey there,

I'm (again) working on integrating this into an iOS app, and decided that I would be best off removing encryption.

It tends slow things down, and in cases where the user hasn't been on the network for a while, can lead to crashes.

iOS 8 has full disk encryption, and frequent locations is already tracking user history in ios7 in most cases. Even before that, iOS was storing the data in an unencrypted file that was accessible through iTunes.

Would you be ok with merging this to master? You can see the changes here: https://github.com/RogerTangos/ios-opensensing/tree/remove_encryption

h0pbeat commented 9 years ago

Is the data stored in a way that is accessible to other applications or is it sandboxed?

RogerTangos commented 9 years ago

My understanding is that the data is sandboxed by default: https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html

The only exception to this is when data is stored in the user's documents directory, which this isn't.

So the data should be sandboxed, unless there's something I'm missing.

On Wed Dec 10 2014 at 4:29:07 PM h0pbeat notifications@github.com wrote:

Is the data stored in a way that is accessible to other applications or is it sandboxed?

— Reply to this email directly or view it on GitHub https://github.com/OpenSensing/ios-opensensing/issues/11#issuecomment-66527275 .

brian717 commented 9 years ago

A quick question about your previous comment: why does it lead to crashes when the user hasn't been on the network for a while? Is this due to memory issues while encrypting the data?

Also, might it make more sense to make this configurable, rather than just removing it outright? Perhaps in the configuration file for the collector, there could be an encryption flag?

RogerTangos commented 9 years ago

Eh - that's possible, but given iOS8, I really don't see much point. Maybe I'll do it over the holidays. It is a memory management issue.

brian717 commented 9 years ago

Are we committing to only support iOS8 and newer, then? If this is already the current policy, then I apologize for the dumb question.

Regardless of version support, if this is turned off and not configurable, we'll want to make sure that uploads are only done over SSL - in addition to protection at-rest, this level of encryption prevents mitm attacks from snooping over the wire on unencrypted connections.

Thoughts?