strange behaviour under linux

Discussion related to AES Crypt, the file encryption software for Windows, Linux, Mac, and Java.
Post Reply
philco
Posts: 6
Joined: Thu Nov 14, 2013 2:45 pm

strange behaviour under linux

Post by philco »

I've used AESCrypt since late last year under Windows7 and in conjunction with KeePass2 password manager. Since moving to linux (Ubuntu 14.04) I've installed AESCrypt and tend to use the gui because it has always worked well with auto-type in a password manager. I made the necessary edits for the target window and the auto-type string.

First, I found that I could not open in linux files encrypted under Windows. This seems to be caused by the constitution of the password. I tried many passwords, and there is always a problem for me in linux with passwords containing special characters and/or blank spaces. The 'advantage' of a gui + password manager + auto-type is that one can use a long string of around 60 characters using the whole field of character choice - strings that are practically impossible to type correctly by hand.

I tried various lengths of password even going down to a 6 alphanumeric characters plus 1 blank space and it would not work. As soon as I restricted the password to alphanumerics and - and _ signs, (eliminated blank spaces and special characters) I could go back up to 60 characters and the encryption worked fine.

I don't think this problem with the constitution of the password is related to the use of auto-type. Straight copy and paste suffered just the same and auto-typing into a text document worked just fine.

The second problem, once I settled on straight alphanumeric passwords, was that if I moved an encrypted file to another directory, it would not decrypt in that new location. If I moved it back to its original directory, it could be decrypted easily.

I never had this problem in Windows. This problem would make it difficult if not impossible to transfer encrypted files to someone else.

Has anyone experienced similar issues with AESCrypt in linux ?
User avatar
paulej
Posts: 595
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: strange behaviour under linux

Post by paulej »

Spaces might present issues for the current GUI code. Do you have any problems using the aescrypt command-line version?
philco
Posts: 6
Joined: Thu Nov 14, 2013 2:45 pm

Re: strange behaviour under linux

Post by philco »

The command line works as expected. Moving an encrypted file to another directory does not cause any problems with decryption.

For me, the whole problem with the command line is the number of typo errors I get. I find a gui so much more convenient and rapid (especially when combined with auto-type from a password manager).

My problem with the gui in linux seems to be mainly related (maybe entirely related) to the use of spaces in the password. If I enter a password like 'test 32' in the gui with the single quotes, it works ok. Without the single quotes, it fails.

If I use a generated password of say 60 alphanumerics (avoiding blank spaces) then the encryption works with the gui and if the encrypted file is then moved to another location it decrypts ok.
philco
Posts: 6
Joined: Thu Nov 14, 2013 2:45 pm

Re: strange behaviour under linux

Post by philco »

Further to my last post, even with an all alphanumeric password, 60 chars, decryption will not always work with the gui if the file is moved. Sometimes it does but not always. I haven't yet been able to pin this down exactly.
philco
Posts: 6
Joined: Thu Nov 14, 2013 2:45 pm

Re: strange behaviour under linux

Post by philco »

Sorry for a third post in quick succession.

When I move the encrypted file to a sub-directory containing a space in its name such as :

~/home/Documents/Circle of despair/

decryption fails with the error message :

"Error opening input file ~/home/Documents/Circle : No such file or directory"

so the gui is having a problem with sub-directory names which include spaces.
User avatar
paulej
Posts: 595
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: strange behaviour under linux

Post by paulej »

There is a problem with the GUI code and spaces. I didn't write that code, but I know what the issue is. We need to get that fixed.

The command line version will work where spaces are in the pathname. You just need to ensure you put quotes around the name. Like this:

Code: Select all

aescrypt -d -p too "/path to/file"
That is the problem the script in the GUI code has. It calls the command line tool, but fails to protect names so the shell will do the right thing.
philco
Posts: 6
Joined: Thu Nov 14, 2013 2:45 pm

Re: strange behaviour under linux

Post by philco »

Thanks, Paulej. I can work around this now.
aasche
Posts: 9
Joined: Fri Oct 03, 2014 10:45 am

Re: strange behaviour under linux

Post by aasche »

paulej wrote:There is a problem with the GUI code and spaces. I didn't write that code, but I know what the issue is. We need to get that fixed.
as soon as possible... :)
paulej wrote:That is the problem the script in the GUI code has. It calls the command line tool, but fails to protect names so the shell will do the right thing.
One solution could be:

Code: Select all

$message = `$aescrypt -e -p $password '$filename' 2>&1`;
instead of:

Code: Select all

$message = `$aescrypt -e -p $password $filename 2>&1`;
actually found in aescrypt-gui for Linux - assuming there are no more single or double quotes within the filename...
User avatar
paulej
Posts: 595
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: strange behaviour under linux

Post by paulej »

If you want to look at the proposed code changes for the GUI, see this:
https://github.com/pigsflew/AESCrypt/co ... 8217d84c4b

This is an outstanding pull request, but I've not gotten around to integrating it. There are a few requests sitting in github waiting for my attention.

One of these days... ;-)
aasche
Posts: 9
Joined: Fri Oct 03, 2014 10:45 am

Re: strange behaviour under linux

Post by aasche »

paulej wrote:If you want to look at the proposed code changes for the GUI, see this:
https://github.com/pigsflew/AESCrypt/co ... 8217d84c4b

This is an outstanding pull request, but I've not gotten around to integrating it.
I will give a try and report my practical experience, asap :)
Post Reply