(question) Encrypting a single file

Jamon Camisso jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Fri Mar 18 18:50:42 UTC 2011


On 3/18/2011 2:06 PM, William Park wrote:
> Hi, I'm currently keeping all personal infos (ie. contacts, accounts,
> passwords, pins, etc.) on paper address book.  I would like to store
> them on a single textfile.  How do you encrypt/decrypt a single file?
>
> I used "cryptsetup" before, but that's for entire partition.  I guess I
> can use password option in "zip", but that's so old fashion. :-)

Try gpg, I use this:

gpg -a -c file.txt

That will prompt you for a passphrase that will be used for symmetric 
encryption (-c option). -a will output ascii if you want to to transmit 
your encrypted file over email.

If you want to use a different algorithm, you can specify one by adding: 
--personal-cipher-preferences TWOFISH, where twofish is one of the 
cipher algorithms reported by gpg --version on the Cipher: line, e.g.:

Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH

So a complete line with an algorithm of your choosing would look like:
gpg -a -c --personal-cipher-preferences TWOFISH file.txt

You can also add that personal-cipher-preferences to your gpg.conf file.

Jamon
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list