Let us introduce you to our text encrypter/decrypter!
This little software was written in python as a hobby project. Then it started to turn out pretty good as it expanded.
The story behind it starts with only wanting to be able to encrypt text strings just for the fun of it and see if friends could figure out what it was. Also, it was a good way to exercise the Python programming skills.
After a while people started to see the picture as it was built upon the super easy “Caesar Cipher” which is one of the simplest form of encryption as it uses a number to identify how many right or left shifts are needed to get the correct letter. For example, with a left shift of 3, D would be replaced by A, E would become B, and so on.
Could this be used for storing advanced passwords?
This article will not go deep into the development of the software, but to wrap it up; we removed the Caesar Cipher and created a more advanced one using Fernet symmetric encryption.
This guarantees that the message which has been encrypted cannot be read or manipulated without the correct key. It uses 128-bit AES symmetric encryption in CBC mode with PKCS7 padding and HMAC using SHA256 for authentication.
Check out this scientific article on Fernet by “Dr J. Fiaidhi, R. Sapkota, and N. Vankayalapati”
The software contains three modules;
- Key Creation
- Encryption
- Decryption
What if this software would be perfect for storing and encrypting passwords!?
CLI version
At first it was created as a CLI based python script only, and each module worked pretty well by them selves. To avoid having three separate tools we combined them into a menu based tool.
This worked very well, but still it was not simple enough to use as you would need to copy and paste in the terminal window which could sometimes be problematic as the “return” character sometimes gets in the way. These characters could cause unwanted situations as it activate the enter key. Also for anyone to use the software they would need to have python installed along with several modules that doesn’t come preinstalled on any systems.
Everyone loves GUI, right?
To solve the minor issues we compiled the code with the PyInstaller code freezer tool. This makes it possible to create executable files for windows users, and for Linux users that contains everything you need to start the software without installing extra modules. This worked like a charm, but it was still CLI based.
We decided to make a GUI version, and implemented the tkInter module to be able to draw window boxes. This is a windowing toolkit that works pretty well and is easy to understand.
The GUI version works very well, and it looks pretty clean too. With the “Copy to Clipboard” button it’s also easy to move them to any document for storage.
The Key generation is not something that is being used often so this feature was moved into the “File” menu to avoid accidental deletion of the current key file.
Key Generation
To be able to encrypt and decrypt you need a secret key. In our software this has been solved with the use of key files, and NO; the secret keyword you choose is not visible in the file! This too is being encrypted..
But, there are some pros and cons with using a key file.
The PROS:
- It’s always there so you do not need to enter the secret keyword every time.
- It’s easy to share the key file with others for a group to encrypt/decrypt together.
The CONS:
- It’s always there, so if someone steals your computer or use it they could access the encrypted strings.
- Even though the key file is encrypted, should anyone be able to get hold of the key file it could be used to decrypt the encrypted strings on any other machine.
Overall; It seems to be PROS and CONS no matter how you look at it.
The Code is OpenSource!
If you want to give this software a try, it can be downloaded with the download button below.
The ZIP file contain an EXE file and a RES folder. They need to be together to be able to work; meaning you need to extract the ZIP file first.
You cannot start the EXE file within the ZIP because it won’t be able to find the RES folder.
We believe in a free world.
Therefor the source is free for anyone to build on should it be of any interest.
Should you be interested in either using it for yourself, or look at the code used to build this software it can be found on our GitHub site.
CLI version:
https://github.com/janbrekke/Encrypter-Decrypter
GUI Version:
https://github.com/janbrekke/Encrypter-Decrypter_GUI
Thank you for reading!
NB! – NB! – NB! – NB!
DigitalBrekke is not responsible for any loss of password
that may occur when using this software.
The generated KEY file is your responsibility, as it’s not able to revert back this information to plain text.
If you lose/delete the key file you can generate it again with the same keyword.
If you forget the keyword you are not able to recover any encrypted strings!!
The Software should be safe to use but we are not professional programmers.
It could contain bugs!
– What you choose to do is on you! –