Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently I am wondering whether it is possible to apply asymetric encryption of a directory in Linux.

I would like to achieve the following:

  • Write log files to /var/log/secret
  • Everything written to /var/log/secret is instantly encrypted by a public RSA key (or something similar)

The encryption programms I know, i.e. ecryptfs do not support asymetric encryption of files, at least as far as I know. (Correct me if I am wrong). Therefore I am asking here whether you know of any possibility to implement this.

Thanks in advance

share|improve this question
There's a reason encryption programs don't do asymmetric encryption on the file system. It's extremely slow. Even SSL/TLS (arguably the best known implementation of public key crypto) only uses it for initial handshake and then switches to symmetric. – Rob H Mar 2 '11 at 16:24
Hmm, would it be possible for small amounts of data? Lets say about 200 MB a day??? – ftiaronsem Mar 2 '11 at 20:19
up vote 0 down vote accepted

The GPG manual claims it can encrypt files for Bob using Bob's public key.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.