Page 1 of 1

Help with aescrypt_keygen with Ubuntu 12.04

Posted: Thu Aug 07, 2014 7:50 am
by Synibarr
Hello,
I'm running Elementary OS which is based on Ubuntu 12.04. I'm a new Linux user.
I installed the 64Bit Gui version which runs fine.
However, when I want to use the console with aescrypt_keygen it says:

Code: Select all

aescrypt_keygen: command not found
I tried to install the source code using the instructions in the Documentation pdf. I can unzip the tar.gz and navigate into the folder.
However, tryping in

Code: Select all

make
results in

Code: Select all

make *** no targets specified and no makefile found
I have the build-essentials and the GnuC++ compiler installed.

Any idea what went wrong?

Thanks a lot.

Re: Help with aescrypt_keygen with Ubuntu 12.04

Posted: Fri Aug 08, 2014 3:54 pm
by paulej
The GUI version of AES Crypt on Linux does not have the keygen tool. So, you'll have to do what you're looking to do, which is to compile newer code from the source code.

You should see a file called Makefile. Apparently, whatever directory you're in, there is no makefile.

One you get it complied, you will want to out the keygen tool in /use/bin (or /use/local/bin) and replace the current aescrypt binary. You can learn where the current one is by typing "which aescrypt".

Re: Help with aescrypt_keygen with Ubuntu 12.04

Posted: Sat Aug 09, 2014 4:48 am
by Synibarr
Thank you for your reply.
After reading your post I checked the contents of the unzipped file and realized that the "makefile" is not in the parent folder but in a subfolder.

Code: Select all

/aescrypt-3.0.9/src/
instead of

Code: Select all

/aescrypt-3.0.9/
After navigating into the subfolder I was able to use make.
A newbie mistake, I guess.
Perhaps you can adjust the documentation pdf?

Re: Help with aescrypt_keygen with Ubuntu 12.04

Posted: Sat Aug 09, 2014 6:34 am
by paulej
If it's not clear, yes, I should.

Alas, I have that and a big pile of things. I'll put it on my list.

Re: Help with aescrypt_keygen with Ubuntu 12.04

Posted: Wed Aug 20, 2014 8:14 am
by Synibarr
Paulej,

can you tell me the command for decrypting a .tar.aes with the keyfile in the command line?

After managing to install the source code I succeded in using the encryption command (location and filename changed for my purposes):

Code: Select all

tar -cvf - /home | aescrypt -e -k secret.key - >backup_files.tar.aes
However, as a newbie, I can't figure out how to decrypt the resulting .tar.aes.

Thank you.

Re: Help with aescrypt_keygen with Ubuntu 12.04

Posted: Wed Aug 20, 2014 2:37 pm
by paulej
Before you can try to untar the file, you need to decrypt it. Try something like:

Code: Select all

aescrypt -d -k keyfile -o - backup_files.tar.aes | tar -xvf -
Something like that should work. The -o flag on aescrypt tells it to send the decrypted file to stdout so you can pipe it to tar.

Re: Help with aescrypt_keygen with Ubuntu 12.04

Posted: Fri Oct 03, 2014 12:00 pm
by aasche
paulej wrote:Before you can try to untar the file, you need to decrypt it. Try something like:

Code: Select all

aescrypt -d -k keyfile -o - backup_files.tar.aes | tar -xvf -
Nearly perfect, but restoring needs an additional option:

Code: Select all

aescrypt -d -k keyfile -o - backup_files.tar.aes | tar -xvf - -C /

Re: Help with aescrypt_keygen with Ubuntu 12.04

Posted: Sat Oct 04, 2014 11:17 pm
by paulej
You don't need "-C /" if the tar file contains the absolute path /home.

Re: Help with aescrypt_keygen with Ubuntu 12.04

Posted: Sun Oct 05, 2014 4:56 pm
by aasche
paulej wrote:You don't need "-C /" if the tar file contains the absolute path /home.
That's right, but then restoring within my homedir, this doesn't work as expected.

Re: Help with aescrypt_keygen with Ubuntu 12.04

Posted: Mon Oct 06, 2014 5:13 am
by paulej
Ah! You're right. Many years ago, it appears tar changed behavior and removes absolute pathnames when archiving. I never noticed, because I learned long ago that using absolute pathnames was a bad idea.

I hate changes like that. It's putting in exceptions to logic to try to help the novice. And while it does this, it prints a message to tell you it did it. That's really annoying. Fortunately, I never use tar this way. :D