Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Lo-fi (but cross-platform) portable encryption?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1272
Location: Edinburgh, UK

PostPosted: Fri Aug 11, 2006 1:52 pm    Post subject: Lo-fi (but cross-platform) portable encryption? Reply with quote

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
View user's profile Send private message
odessit
Apprentice
Apprentice


Joined: 01 Feb 2004
Posts: 180
Location: Current Residency - Server Room - Caution - Frostbite Imminent!

PostPosted: Fri Aug 11, 2006 2:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1272
Location: Edinburgh, UK

PostPosted: Sat Aug 12, 2006 10:38 am    Post subject: Reply with quote

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
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Sat Aug 12, 2006 10:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1272
Location: Edinburgh, UK

PostPosted: Sun Aug 13, 2006 10:43 am    Post subject: Reply with quote

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
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1272
Location: Edinburgh, UK

PostPosted: Sun Aug 20, 2006 10:45 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum