FB's Conceal secure-storage API
Bullshit or not? It has some interesting elements to it, and would be a step in the right direction for more-secure app content storage. Though at its base, it has some conceptual flaws. If you root the device, you can get the private key. By design, there's no way to put the key on external media (there's only one external microSD slot, and that contains your encrypted files). Files could be cached once decrypted. And of course it doesn't prevent a Finfisher-style screenshot-taking backdoor from just viewing what's displayed on the screen. That's not going into the quality of encryption (which remains to be seen). Conceal uses a stripped-down version of OpenSSL for its encryption algorithms. Still, could be fun. =) ~Griffin https://code.facebook.com/posts/1419122541659395/introducing-conceal-efficie... "Caching and storage are tricky problems for mobile developers because they directly impact performance and data usage on a mobile device. Caching helps developers speed up their apps and reduce network costs for the device owner by storing information directly on the phone for later access. However, internal storage capacity on Android phones is often limited, especially with lower to mid range phone models. A common solution for Android is to store some data on an expandable SD card to mitigate the storage cost. What many people don't realize is that Android's privacy model treats the SD card storage as a publicly accessible directory. This allows data to be read by any app (with the right permissions). Thus, external storage is normally not a good place to store private information. We saw an opportunity to do things better and decided to encrypt the private data that we stored on the SD card so that it would not be accessible to other apps. To do this efficiently, we built Conceal, a set of Java APIs to perform cryptography on Android and make storage more secure and lightweight. We created Conceal to be small and faster than existing Java crypto libraries on Android while using memory responsibly."
It's not like preventing root from getting the key is some attribute they omitted by accident or incompetence - it's a significant design change that changes the way the application would work. It seems like everyone criticizing Facebook is angry that they're not compromising their design principals for added security. They have very clear priorities: We are _going_ to benchmark and make sure any code we add does not increase UI latency beyond an unacceptable limit. We are _going_ to cache some large MB of data on the phone, because it makes the app faster. We are _not_ going to take up more space than we need. We are _going_ to support old phones that have an SD Card, and if that's where we cache the data, then so be it. We are _not_ going to require the user to enter a password or PIN on app startup. We are _not_ going to require the phone to be online to used the cached data. With requirements like those, what you get is exactly this library. It adds some small level of security against a very specific attack: data stored on the SD Card and accessible to other programs. (It may even be a way to get the security they need to permit themselves to store cached data on the SD Card, which is a desirable situation because it makes the app faster.) If you relax some of those requirements, you can add security features. Relax the latency or minimal storage requirement and you can create an encrypted container, and hide metadata like filenames, sizes, and times (like IOCipher). Relax the password requirement, and you can have the user enter a password on app startup and prevent root from getting the key unless it's in memory or entered. Relax the latency and offline requirement, and you can have the server send down a key to decrypt the data. Facebook is starting with the User Experience and adding as much security as it allows. -tom
This is purely to circumvent the "SD card is public space" issue. The only idea is to have the same measure of security in memory as on the SD card, to allow for large caches. So: Private key in memory. Fast encryption streaming algorithm to write and read to the SD card with the private key in memory. Fast. That's it.
participants (3)
-
Griffin Boyce
-
Lodewijk andré de la porte
-
Tom Ritter