Howto: Easy file encryption on the AAO

Discussion in 'Linux' started by annafil, Sep 8, 2008.

  1. annafil

    annafil

    Joined:
    Aug 12, 2008
    Messages:
    327
    Likes Received:
    0
    Location:
    Malaysia
    Another day, another howto :) Note however that this howto does not cover full file system encryption, merely encrypting individual files.

    The AAO's defualt Linpus already comes with a basic command line encryption utility. All we're going to be doing is adding a simple gui to streamline the process.

    PS. If anyone wants to built an rpm for this - be my guest :)

    Step 1 - installation

    Download the gui binary here

    Run the following command to copy to a standard location:

    Code:
    sudo cp gpg_gui /usr/bin/
    Step 2 - adding to right click menu

    Open your File Manager. Click "Edit" in the menu, then "Configure Custom Actions".

    You will see a new window popup. Click Add. Fill in the Following details:

    Code:
    Name: Encrypt/Decrypt File
    Description: Encrypts/decrypts selected file
    Command: gpg_gui %f
    Make sure that's a small %f - the app only takes one input, but it can be a directory or a file.

    Pick a suitable icon.

    Under the "Appearance Condition" tab, check everything (including directories). Hit OK.

    Done. Now when you right click on a file or folder, you can see an Encrypt/Decrypt option.

    Usage

    When the program window pops up, type in a password to encrypt the file. When you click "Encrypt" you will see a new file appear with a .gpg extension - this is the encrypted version of your file, it is complete so it safe to completely remove the unencrypted version. You will need to delete the unencrypted file manually.
     
    annafil, Sep 8, 2008
    #1
  2. annafil

    popcycleken

    Joined:
    Sep 19, 2008
    Messages:
    31
    Likes Received:
    0
    This looks very useful, and safer than many other customizations in this environment. I do have a couple of questions.

    I would always be interested in encrypting an entire directory tree. If i specify a directory, will all the files in the subdirectories also be encrypted?

    If I specify a directory, will all the files be encrypted in a single file, or will each file be encrypted separately? If the latter, which seems mostly likely, would I have to go in and delete all of the original clear text files?

    I have much the same questions on the decrypt function.

    I'd really prefer to run TrueCrypt, but that looks like too big a challenge for my talent level.

    Can you point me at any documentation for the existing command line program?

    Thanks for your help,


    Ken
     
    popcycleken, Oct 7, 2008
    #2
  3. annafil

    annafil

    Joined:
    Aug 12, 2008
    Messages:
    327
    Likes Received:
    0
    Location:
    Malaysia
    I believe all the files and the folder should be encrypted in one single .gpg file together... you would then have to delete the original folder yourself.

    When you decrypt, it should recreate the folder with all the files inside it from just the one encrypted file :)

    Truecrypt isnt available in anything but source format for Linpus and other Fedora based systems as far as I know, so I would imagine that would be some work to set up.

    If you're interested in the commandline gpg, type "gpg2 --help"

    I think it's gpg2 on Linpus, and gpg on most other systems. I remember having to modify the source code for the GUI in my howto to reflect this. But if that says no such command found, the try gpg :)

    Hope this helps!
     
    annafil, Oct 8, 2008
    #3
  4. annafil

    popcycleken

    Joined:
    Sep 19, 2008
    Messages:
    31
    Likes Received:
    0
    Thanks so much. I would have owed you thanks anyway, but the answers also turn out to be the ones I wanted. I will take your advice and check out the command line.

    Ken
     
    popcycleken, Oct 8, 2008
    #4
  5. annafil

    annafil

    Joined:
    Aug 12, 2008
    Messages:
    327
    Likes Received:
    0
    Location:
    Malaysia
    It's no problem, I just hope I remember correctly - am not using Linpus for now so I can't test it out
     
    annafil, Oct 8, 2008
    #5
  6. annafil

    Ace_Rimmer

    Joined:
    Aug 16, 2008
    Messages:
    103
    Likes Received:
    0
    A good how-to, well written and easy to follow, but may I offer that this is so easy to do from the command line that it is hardly worth the effort to set up (IMHO). NB, I haven't tried your method so there may be advantages to it that I am not seeing. This is NOT a criticism, just a suggestion for an alternate method. Most important, you have shown how easy it is to have strong file encryption on the AAO! :D

    1. Install gnupg from Add/Remove Programs.

    2. To generate a key pair, in a terminal do: gpg --gen-key (need to do this only once)

    3. To encrypt a file, in the terminal do: gpg -e name_of_file.

    4. To decrypt, in a terminal do: gpg name_of_file.gpg

    Of course, answer the questions correctly and DON'T forget your passphrase! Test this out on an unimportant file first to be sure you understand how to use it (although the original file will not be deleted by gpg).

    (Well, maybe it seems more complicated than I implied, but once it's set up it's easy to use.)
     
    Ace_Rimmer, Oct 9, 2008
    #6
  7. annafil

    annafil

    Joined:
    Aug 12, 2008
    Messages:
    327
    Likes Received:
    0
    Location:
    Malaysia
    Ace_Rimmer: Thank you for your comments. I'm sure slightly more advanced users would find your breakdown of the commands saves them some time.

    PS. On my system gpg was already built in :)
     
    annafil, Oct 9, 2008
    #7
  8. annafil

    chipmunk

    Joined:
    Jun 28, 2009
    Messages:
    1
    Likes Received:
    0
    Hi Annafil

    Your GUI download is no longer available. Where can I download it from now?
     
    chipmunk, Jul 2, 2009
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.