Log encryption
I am building an Android app which stores log lines in a rotating log file. When a user faces a problem, he or she can send us a support request with the log files attached.
For obvious reasons, I would like to encrypt these log lines.
Wish list
- Asymmetric encryption: the app should be able to encrypt, but not decrypt, the data
- Line-by-line encryption, so that each line could be decrypted. This is required because log rotation might cut parts of the file.
- Fast enough algorithm that would not slow older devices (at peak, there might be ~10 log lines/second)
- Ability to encrypt very long (up to 4k chars) log lines. This excludes, for example, RSA, which is limited to 117 bytes of encrypted data for a 1024 bit key.
- Decryptable using ordinary Linux command line tools like OpenSSL or gpg.
What's the best way to asymmetrically encrypt Android logs line by line?