In my project I am using custom android devices and I have to encrypt all the files on my sdcard for security. I am using AES-128 bit encryption, but it takes too long to decrypt and open the files.
For the videos I have used on the fly decryption using CipherInputStream and CipherOutputStream and a proxy server. Is this possible for big pdf files?
A 12 MB pdf file is taking around 40 seconds to decrypt so opening the file after completely decrypting it is not an option. Also, I do not want to save the decrypted files anywhere on the device. Is it possible to open parts of pdf files as done with videos?
I tried using the full disk encryption in android but it did not work on my custom devices and showed only a green droid, after which nothing happens.
Thanks in advance.
If you just encrypted the whole file and your viewer app/library expects to get a whole file, not really. If you used PDF encryption, which encrypts each object inside the file, you could decrypt and display them on demand.
What exactly are you trying to achieve here? Are those files part of your app? If you just want to protect data on the SD card, there are ways to do this automatically, but they require a rooted device. For example LUKS Manager.