On OpenBSD, how/with what I can create an encrypted container that can later be dynamically expanded? Can I do it with GPG? (password protection is enough)

So, if I open this container and put files in it, it would dynamically expand as more files are put in it.

Please do not recommend a Linux solution (e.g. TrueCrypt) without checking that it works on OpenBSD.

  • Do you need to be able to take files out, or replace them without wasting space?
    – ams
    Aug 28, 2012 at 12:58
  • May I know, why you are rejecting truecrypt ?
    – SHW
    Aug 29, 2012 at 7:36

3 Answers 3


The official encrypted container on OpenBSD is through vnode pseudo devices, set up with vnconfig. As far as I know, these cannot be resized: you'd have to create another, larger container and copy the data.

Encfs is a FUSE flesystem that performs encryption file by file (so there is no container size issue). There is a FreeBSD port, which I think could easily be adapted to OpenBSD.

An alternative approach is to use gpg. You can edit the file in an editor such as Emacs or Vim that automatically decrypts and encrypts the file on the fly. But if you want to use the file in some other application, you'll have to encrypt and decrypt manually.


What you want is eCryptfs. See this answer I gave to a similar question on StackOverflow a while ago.


I don't think you should downvote perfectly good answers just because you weren't explicit enough in your question -- only a tag? Anyway... GnuPG / PGP can't do what you want. Check out Comparison of disk encryption software on Wikipedia. Looks like your only choice is "svnd / vnconfig".

  • Ecryptfs relies on Linux kernel support. It isn't available on OpenBSD. Aug 28, 2012 at 23:32
  • Indeed Gilles. I didn't notice the tag.
    – rsaw
    Aug 29, 2012 at 3:36

I guess, in this regard truecrypt is your best friend.

  • nono, no truecrypt, sorry, I updated the Q Aug 28, 2012 at 12:43
  • Have you tried cryptsetup and luksOpen ?
    – SHW
    Aug 28, 2012 at 12:46
  • 1
    on an OpenBSD box? Aug 28, 2012 at 12:51
  • 1
    If you have source code, then does it matter ?
    – SHW
    Aug 28, 2012 at 12:53
  • @SHW I can't find any sign that Truecrypt is works on OpenBSD. The only mention of *BSD on the TrueCrypt site is this page about FreeBSD which states that while it is possible to compile the code, it is not recommended because the resulting code is likely to be buggy. Aug 29, 2012 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .