Author |
Message |
SFR

Joined: 26 Oct 2011 Posts: 1655
|
Posted: Sat 21 Jan 2012, 17:28 Post subject:
SelfCrypText v2.2 Subject description: Simple Bash+Gtkdialog text encryption tool |
|
Once upon a time I've seen an interesting text encryption tool under Windoze.
That tool had ability to put the encrypted text in the application itself, and then to save it.
Thanks to it, it was possible to have encrypted text and the tool in one file.
I still feel weak in Bash and Gtkdialog, but I wrote something similar.
The code is a bit overbloated - I'm sure it's possible to optimize/improve it (and it is welcomed).
Also, it would be more secure to use variables instead files to keep temporary data,
but I couldn't find a way to do it in Gtkdialog...
SelfCrypText can be used in two ways:
1. As standard text encryption tool, eg.: input_some_text -> encrypt/decrypt -> copy_somewhere_else;
2. As portable, executable container for encrypted text, eg.: input_some_text -> encrypt/decrypt -> save_as;
The second option creates a new copy of application, but the file contains encrypted text also.
When it's launched, the text is displayed instantly and can be decrypted, and the application itself can be reused.
SelfCrypText uses 'openssl' and AES-256 + base64 encryption.
Written on Lupu-528.004.
EDIT:
The latest single-note version (v1.4) is attached HERE.
The latest multi-note version (v2.2) is attached HERE.
Greetings!
 |
Description |
SelfCrypText screenshots |
Filesize |
60.67 KB |
Viewed |
1693 Time(s) |

|
Description |
SelfCrypText - unpack and launch by clicking on it.
|

Download |
Filename |
SelfCrypText.tar.gz |
Filesize |
1.04 KB |
Downloaded |
759 Time(s) |
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Last edited by SFR on Tue 25 Jun 2013, 10:48; edited 8 times in total
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Sat 21 Jan 2012, 22:19 Post subject:
|
|
ipsa scientia potestas est
Well done.
I may use this to encrypt the location of my time machine. At the moment it is stashed in the future and to the right a bit.
For some this will be invaluable
The Growl program in Puppy 5.3.1 (Menu/network)
has the option to encrypt and decrypt a file
using click and drag by and calling the program
/usr/sbin/bcrypt_gui
I believe micko wrote that for Slacko
. . . might be of interest
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
Dave_G

Joined: 21 Jul 2011 Posts: 459
|
Posted: Sun 22 Jan 2012, 04:28 Post subject:
|
|
Nice one SFR.
Don't be concerned with it being bloated, it's not.
I have no doubt that it can be minimized but what advantage would be
gained from it?
It's not like a short GTKdialog is going to bring your CPU to it's knees
and by optimizing it, you may make it less unreadable and more difficult for others
to adapt and modify to their specific needs.
The only change I would make is like you say try and use variables instead
of files for your temp storage.
I don't know enough about GTKdialog to help but try posting here:
http://www.murga-linux.com/puppy/viewtopic.php?t=38608
There will be more then a few users that might be able to help out.
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1655
|
Posted: Sun 22 Jan 2012, 07:36 Post subject:
|
|
Quo semel est imbuta recens, servabit odorem testa diu.
Optimalization...it's my old habit inherited from the c64, to be concerned about every single bit of free mem and every single cycle of CPU.
And yes, it was a challenge to analyze such code later.
I'll post this problem at Gtkdialog Tips thread and meanwhile I'll try to find a way to encrypt/decrypt string instead file using openssl - had problem with this too.
Thanks & Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1655
|
Posted: Tue 24 Jan 2012, 07:03 Post subject:
|
|
I did a small security upgrade:
- the temporary file is wiped out instantly after every use in code;
- the temporary file is wiped out using 'shred' instead simple 'rm'.
Greetings!
Description |
SelfCrypText_v1.1 - unpack and launch by clicking on it.
|

Download |
Filename |
SelfCrypText_v1.1.tar.gz |
Filesize |
1.08 KB |
Downloaded |
717 Time(s) |
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1655
|
Posted: Sun 19 Feb 2012, 09:58 Post subject:
|
|
Update: SelfCrypText_v1.2
Another small improvements:
- prevention of encrypting an empty message (such message couldn't be decrypted);
- added file-selector to 'Save As' dialog;
- added opportunity to overwrite an existing file;
- few aesthetic corrections in code.
I think it's the goal I had wish to achieve...
...for now.
Greetings!
Description |
Unpack & click to launch.
|

Download |
Filename |
SelfCrypText_v1.2.tar.gz |
Filesize |
1.21 KB |
Downloaded |
723 Time(s) |
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Tue 21 Feb 2012, 05:12 Post subject:
|
|
I haven't taken a look at the code but I often use
Code: | VAR=`command`
#and to get the data
command <<< $VAR
#or
echo "$VAR" |command |
I wrote a little poor man's steganography tool a while back that would embed any file onto any file... it used a temp file too, but now that I think about it if I used a VAR, I could probably? use ${#VAR} and some integer math instead of stat -c %s to get the size
its here:
http://www.murga-linux.com/puppy/viewtopic.php?t=72807
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1655
|
Posted: Tue 21 Feb 2012, 16:51 Post subject:
|
|
The main problem is the <edit><default> widget in my case.
It doesn't allow to be refreshed if I use a variable or command, the only way is to use <edit><input file> and temporary file.
http://www.murga-linux.com/puppy/viewtopic.php?p=598937#598937
Such temp file is converted into a variable and shredded immediatly and then everything is done with that variable...until the next refresh (which is encrypt/decrypt action).
It's ok with eg. <entry><input>$VAR... (and the password is stored in that way), but this won't allow to use multiple lines...
Nice idea. It has a big advantage over the classic steganography = any kind of files allowed.
I just tried cat some_random_stuff_file >> abiword and dillo binaries, and they still work.
Tried with *.tar.gz also - after decompressing Xarchive shows "Wrapper exited with a error", but unpacked data is untouched!
Thanks & Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
bruno
Joined: 08 Mar 2012 Posts: 139 Location: Belgium
|
Posted: Fri 10 Aug 2012, 06:41 Post subject:
how to install? |
|
How can i install this?
I just know how to install a .pet, but this is not a .pet
If i click on it, it just shows the code.
Thanks
|
Back to top
|
|
 |
bruno
Joined: 08 Mar 2012 Posts: 139 Location: Belgium
|
Posted: Fri 10 Aug 2012, 06:45 Post subject:
Subject description: installation |
|
I'm using dpup exprimo 3.2.14.2
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1655
|
Posted: Fri 10 Aug 2012, 15:23 Post subject:
|
|
Hey Bruno.
This app is designed to be portable; doesn't need to be installed.
I assume that you unpacked the downloaded file first..?
If so and still nothing I guess that permissions of the file aren't set properly...
In Rox-Filer right-click on the file -> File 'SelfCrypt...' -> Properties and select all boxes under "Exec".
If this won't help, open terminal window in a folder where the file resides, type:
Code: | ./SelfCrypText_v1.2 |
see if there are any errors and let me know how's it going.
HTH
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
bruno
Joined: 08 Mar 2012 Posts: 139 Location: Belgium
|
Posted: Fri 10 Aug 2012, 19:28 Post subject:
|
|
Thanks SFR,
Now I see how it works.
Very nice little fast app!
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1655
|
Posted: Sat 18 Aug 2012, 10:42 Post subject:
|
|
Doh, I just found out that "shred" program isn't included in Slacko.
So, to preserve secure deletion of temporary file, I used this, instead of shred:
Code: | SIZE=`du -b $TEMPFILE | cut -f1`
dd if=/dev/urandom of=$TEMPFILE bs=1 count=$SIZE |
I hope dd behaves as I think it does: overwrites exactly the same sectors of a file on the disk..?
Additionaly I did few fixes, the most important was wrong handling of filenames with spaces.
Greetings!
Description |
Unpack & click to launch.
|

Download |
Filename |
SelfCrypText_v1.3.tar.gz |
Filesize |
1.4 KB |
Downloaded |
619 Time(s) |
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1655
|
Posted: Sat 06 Oct 2012, 10:54 Post subject:
|
|
Using Pizzasgood's idea I've applied ramdisk as a storage for temp file.
I believe it's more reasonable way than dabbling with dd and shred.
Dynamic ramdisk has been set to max. 1 MB, but I think it's more than enough.
Additionally since now all data is being gzip'ed before encryption.
Greetings!
Description |
Extract, make executable and click to launch.
|

Download |
Filename |
SelfCrypText_v1.4.gz |
Filesize |
1.37 KB |
Downloaded |
969 Time(s) |
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Mon 08 Oct 2012, 21:55 Post subject:
|
|
Quote: | The second option creates a new copy of application, but the file contains encrypted text also.
When it's launched, the text is displayed instantly and can be decrypted, and the application itself can be reused. |
Cool, a stand-alone secret diary
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
|