-1

My Android application saves camera videos and snapshots into the device internal memory in a separated directory (for example /mnt/sdcard/mydir).
For privacy reasons I don't want people to be able to export them out of the device.
I was thinking about using Android Cipher class to encrypt them but I suspect that encrypting 100MB MP4 videos is not a fast task, do you have any suggestion?

mrAlmond
  • 393
  • 4
  • 17
  • Please read this: http://blogs.msdn.com/b/ericlippert/archive/2011/09/27/keep-it-secret-keep-it-safe.aspx – ntoskrnl Jul 11 '13 at 12:34
  • I've made a test with Nexus 7 Android cipher but performances are not so good. For a 10 seconds MP4 video it took 30 seconds for the AES encryption. – mrAlmond Jul 11 '13 at 14:55
  • So CommonsWare’s answer isn’t applicable, but you won’t say why. [That’s not helpful.](http://meta.stackexchange.com/a/66378/160410) – Ry- Jul 11 '13 at 15:14
  • In my opinion CommonsWare answer does not give me any solution so I'm just proceeding with some tests using Android Cipher. About AES security...is that so easy to find the encryption key? If it's a password entered from the user it will not be stored into the device (or built-in into the app). – mrAlmond Jul 11 '13 at 15:19
  • And about storing data into the app internal storage...if the device is rooted (as already said by CommonsWare) the "protection" is avoided. So probably the only valid method is encryption. – mrAlmond Jul 11 '13 at 15:23
  • If the key is derived from a password supplied by the user, then of course the user knows the key. – ntoskrnl Jul 11 '13 at 15:24
  • Yes..so it will not be stored into the device and nobody else but the real user will know it. Simple. Unfortunately Android Cipher seems to be not hardware accelerated (in this case) so for large file is not ok. – mrAlmond Jul 11 '13 at 15:30
  • @Duncan Jones : Why does this question has been put on hold? – mrAlmond Jul 12 '13 at 14:02

1 Answers1

1

My Android application saves camera videos and snapshots into the device internal memory in a separated directory (for example /mnt/sdcard/mydir).

That is external storage.

For privacy reasons I don't want people to be able to export them out of the device.

Then don't put the files on external storage. Put them on internal storage (e.g., getFilesDir()). That will prevent most people from accessing those files. The exception will be users of rooted devices.

I was thinking about using Android Cipher class to encrypt them

Anyone who can root their device and copy the videos will have no major problem finding your encryption key and decrypting them.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491