[UPDATE]:
The new version is 0.2 and supports decryption. Have fun!
Hi guys,
after creating transpos-cipher and shift-cipher I thought of a way to really encrypt sentences in a reasonable way. I don’t have the knowledge to create an advanced Public-Private-Key system but I think I now created a simple but quite safe way to crypt symmetrically.
Here is the script: shift-cipher-ng
shift-cipher-ng works with STDIN like the predecessors, but uses a lowercase string as key to crypt the sentence. For example:
ap0calypse@shu:/tmp> echo "my very difficult sentence" | \ ./shift-cipher-ng -k complicatedkey [om kpza wmipmawzf dmptxrfo]
ap0calypse@shu:/tmp> echo "om kpza wmipmawzf dmptxrfo" | \ ./shift-cipher-ng -d complicatedkey [my very difficult sentence]
Well, now to the internals:
In the first step, we split the input-sentence to get an array:
[m][y][ ][v][e][r][y][ ][d][i][f][f][i][c][u][l][t][ ][s][e][n][t][e][n][c][e]
Now, we take the key and generate an array of the same length with the replicated key:
[c][o][m][p][l][i][c][a][t][e][d][k][e][y][c][o][m][p][l][i][c][a][t][e][d][k]
In the next step, we take the arrays index-by-index. The corresponding key tells the program, where the alphabet starts. So the resulting array looks like this:
[o][m][ ][k][p][z][a][ ][w][m][i][p][m][a][w][f][z][ ][d][m][p][t][x][r][f][o]
For more information start the program with the “-h”-parameter. Enjoy!










One Comment
ui, nice … all in wonder package