View previous topic :: View next topic |
Author |
Message |
Havin_it Veteran
Joined: 17 Jul 2005 Posts: 1272 Location: Edinburgh, UK
|
Posted: Fri Aug 11, 2006 1:52 pm Post subject: Lo-fi (but cross-platform) portable encryption? |
|
|
Hi,
I've just got a present of a USB key - small capacity, not much use, but I have a scheme I'd like to try with it. That is, to have an encrypted storage area on the drive, plus the executables needed to open it under either Linux or Windows without needing any natively-installed helpers.
I wonder if anyone could give me some advice about how to go about this. I wouldn't need any form of steganography or obfuscation, just a secure, password-protected encrypted folder/archive and simple, portable progs to open it without any specific help from the OS. It needn't be a mountable filesystem, just a folder or zipped/whatever archive.
Possible? Welcome all your thoughts! |
|
Back to top |
|
|
odessit Apprentice
Joined: 01 Feb 2004 Posts: 180 Location: Current Residency - Server Room - Caution - Frostbite Imminent!
|
Posted: Fri Aug 11, 2006 2:13 pm Post subject: |
|
|
There is always the http://www.truecrypt.org/
I've used it in a similar situation but with a removable SCSI drive.
You will have to setup your USB in Linux first. |
|
Back to top |
|
|
Havin_it Veteran
Joined: 17 Jul 2005 Posts: 1272 Location: Edinburgh, UK
|
Posted: Sat Aug 12, 2006 10:38 am Post subject: |
|
|
The problem with TrueCrypt though, is it requires Administrator privileges to use. That somewhat undermines the concept of their 'Traveller Mode' - travellers are not normally afforded these privileges!
Reading over their docs does give me a slightly better sense of what I'm seeking, though: TrueCrypt does all the encryption/decryption on the fly, which does seem to be the only practicable way of having anything more than a single textfile to play with, without having to write the contents unencrypted to disk at some stage.
If I restrict my usage to a single file, I guess a text-mode editor like nano could be hooked up to the encrypt/decrypt mechanism, so everything was done in memory...
An app that could do a whole folder-hierarchy would have to hold it in memory while you used it. I'm not aware of any apps that do that, but still questing... |
|
Back to top |
|
|
nielchiano Veteran
Joined: 11 Nov 2003 Posts: 1287 Location: 50N 3E
|
Posted: Sat Aug 12, 2006 10:26 pm Post subject: |
|
|
Havin_it wrote: | The problem with TrueCrypt though, is it requires Administrator privileges to use. That somewhat undermines the concept of their 'Traveller Mode' - travellers are not normally afforded these privileges! |
[paranoia-mode]If you will plug your USB in to an untrusted machine, and decrypt it, that machine can just copy the complete (decrypted) content anyway. Doesn't matter if you explicitly store the decrypted version.[/paranoia-mode]
Most things that happen "on-the-fly" need some sort of kernel-hook to attach to. This mostly means admin/root privileges. The only solution is to go for "less-transparant" solutions like ZIP+password or GPG'd tar.gz's |
|
Back to top |
|
|
Havin_it Veteran
Joined: 17 Jul 2005 Posts: 1272 Location: Edinburgh, UK
|
Posted: Sun Aug 13, 2006 10:43 am Post subject: |
|
|
Agreed - it's definitely worth avoiding the decrypted content being written, even on the device itself. I came across mentions of a couple of things that might be of some help:
1) Portable GnuPG
2) 'PGP self-decrypting files' (it was just a throwaway reference on some BB post, no actual info given).
If I can turn up more practical info on either of these, I might be getting somewhere. |
|
Back to top |
|
|
Havin_it Veteran
Joined: 17 Jul 2005 Posts: 1272 Location: Edinburgh, UK
|
Posted: Sun Aug 20, 2006 10:45 am Post subject: |
|
|
Some progress, on a very simple level. I took the gpg binary and was able to run it on its own on the USB-key to decrypt a symmetrically-encrypted textfile to stdout.
This is a good start; I've also found a project that provides the same thing on Windows. What remains, though, is how to manipulate and re-encrypt the contents without writing them to disk.
Is there a text-mode editor that can be invoked to edit a string from stdin, and feed it back to stdout when done? It certainly looks like nano doesn't, and it was the most compact (so hopefully easily-portable) I could think of.
EDIT: Had a bash (oops punnery) at a script to do the job of adding new items to the encrypted file. Keeping the text in variables so hopefully reasonably secure in that it avoids writing plaintext files.
Code: | #!/bin/sh
PATH=".:${PATH}"
DCR=`gpg -d secrets.txt`
NS=`dialog --clear --stdout --inputbox "Enter your new secret:" 12 70`
printf "${DCR}\n\n${NS}" | gpg -ac --cipher-algo=AES256 >secrets.txt
echo "Your new secrets file looks like this:"
cat secrets.txt
echo "Use ./showsecrets to show all secrets."
DCR=
NS=
|
The limitations are that it's add-only, and only takes a single line. I'd welcome any tips on how I could make it multi-line and editable. |
|
Back to top |
|
|
|