Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I have been asked by a relative to encrypt both a USB pen & a Hard-disk folder. My immediate thaught was to use Truecrypt being that its free and relativly decent!

My question is this: is there a way to enter the decryption-password and decrypt both the pen AND the hard-drive volume at the same time? Obviously the solution should hopefully work if the USB Pen is not present or the USB pen is being used in a seperate computer.

Having not used Truecrypt before in anger I would be grateful for any assisstance.

share|improve this question
up vote 5 down vote accepted

TrueCrypt has an option to cache the encryption password. If you check it when entering the first password, TrueCrypt will try to use it for future volumes.

For example, my login script looks kinda like this: (converted from Python)

truecrypt /volume /letter p /auto /quit /cache y
truecrypt /volume /letter q /auto /quit
truecrypt /wipecache /silent /quit background
share|improve this answer
Wouldn't this be unsafe (kinda loosing the advantage of the password in the first place)? I trust TrueCrypt to not give unsafe options, so there must be more to this... – nik Oct 9 '09 at 12:02
The cache is only stored in memory, and in my example wiped at the end, using /wipecache – grawity Oct 9 '09 at 12:42
@Fran: Modern operating systems allow a program to mark certain memory areas as unpageable/unswappable. (In the case of TrueCrypt, the cache is kept by TrueCrypt driver.) – grawity May 3 '12 at 17:09
@grawity Yes, but the TrueCrypt passphrase is read by its GUI in user-space and then transferred into the kernel for use by the driver. No matter how quickly the user-space code erases the passphrase from RAM, it may still end up in the paging file/swap area. – Fran May 4 '12 at 16:10
@Fran: Not necessarily. Memory locations that are being actively used won't be swapped out (unless under heavy load), and it is possible to write a custom input control that stores its contents in nonswappable memory (KeePass does this). – grawity Jun 25 '12 at 12:10

You must log in to answer this question.

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