[guardian-dev] Sharing encrypted content with other apps

Michael Rogers michael at briarproject.org
Tue Jan 28 18:54:28 EST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi all,

I've been pondering whether it's possible for an Android app to share
encrypted content - for example, an image stored in a SQLCipher
database - with another app, without first creating an unencrypted
copy of the content on disk.

If we didn't mind creating an unencrypted copy of the content we could
write it to a file, use a FileProvider to get a content URI for the
file, and use an Intent to share the URI with the other app. Can that
process be modified to avoid making a copy of the content?

One possibility would be to create a named pipe with mkfifo(), use a
FileProvider to create a content URI for the pipe, use an Intent to
share the URI with the other app, and then stream the data from
storage to the pipe.

Another possibility would be to use ParcelFileDescriptor.createPipe()
to create a pair of ParcelFileDescriptors, use an Intent to pass the
read descriptor to the other app, and then stream the data from
storage to the write descriptor. But I guess most apps will expect to
obtain content from URIs rather than ParcelFileDescriptors.

Has anyone on the list tried something like this? Any suggestions?

Cheers,
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBCgAGBQJS6EM0AAoJEBEET9GfxSfMS00H/03xQ89ckRAfxNQ+HTYStlha
o4DDBpAND0cl6u+zqrhRR23QgOO0l1DZrpjmqZkSys7HS3/DGoVJj1hFaJurrQqU
5giRJfgcz3STJpnPrB/vsLKVW1CQmPtq85TXmxFhl1MgXgGLOu/1P5+TZ5R8lWVe
zUPb2pFrpnbcHR9pudydsYhwPrpXb7FKuZObYrLoCYp+43xyyG1xngmqzo0gPRtw
J8gp/VMg5tJLkxJTMXSdL1EKvxkLb1MeOggUtmHLpAwoCxVWKkcPbm6/NlmqfGG0
Fea/5lNMg7hs8+J2+jujEnOiMyn96FpdifnPOTFW67q+/yUtukbKCSK/LiHhPIs=
=ya7m
-----END PGP SIGNATURE-----


More information about the Guardian-dev mailing list