I wanted to encrypt some files and so, also for fun, I made a symmetric cryptographic algorithm in C++. Because I'm not an expert in this field, I tried to complicate, or shall I say to encrypt, the original message, adding many phases and reorders of the file. I entitled the programme as ENIGMA 2000.
It uses six phases to encrypt the file. The phases sequence depends on the password.
- On phase 1 it just makes a 'xor' between the password and successive blocks of the file, then it inverts the file, it change the bytes order of each
block and it does this cycle from the beginning again several times.
- On phase 2 it codifies (xor) the byte[n] with the byte[n-1] and
then it makes a bit rotation in blocks of 2 bytes depending on the file
size.
- On phase 3 it just inverts the file and codifies it with two
bytes.
- On phase 4 it just change the last byte by the first one.
- On phase 5 it puts the message in one cube. The length of the
cube side is the length of the password. So if the password has 8 bytes we
can put on the cube 512 bytes. Then depending on the password it rotates
each matrix of the cube in each direction (X Y Z). It does different
rotations for different matrices on different directions. So it does
3*length(password) cube matrix rotations.
- On phase 6 it just changes the first bit of the file :)
The password varies between 8 and 16 bytes and the file size is constant.
I know that this algorithm has lot of redundancies. It's slow, and so probably
is not efficient, but I am convinced that it does make a good encryption. You can download the executable for the Dos shell, or the source code in C++.
No spyware, malware, completely free and clean. This software is on public domain and it is also available on SourceForge on this page. Enjoy it :) |