Skip to content

Commit 46ac627

Browse files
committed
3.2
make the process of scrambling more elegant + increase the number of scrambling table from 16 to 256 while making the process shorter ~fix typo and update readme
1 parent 84cb336 commit 46ac627

File tree

4 files changed

+73
-3759
lines changed

4 files changed

+73
-3759
lines changed

README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ Le mot de passe demandé au début est hashé puis sert de graine pour le PRNG(g
55
Le PRNG permet de fournir une clé unique égale à la longueur du fichier à coder.
66
La clé unique subit un xor avec le mot de passe (le mot de passe est répété autant de fois que nécéssaire).
77
Le fichier subit un xor avec cette clé Puis un brouilleur est utilisé, il mélange la table des caractères (ascii) en utilisant le PRNG et en utilisant le keyfile s'il est fourni.
8-
16 tables de brouillages sont utilisées au total dans un ordre non prédictible.
8+
256 tables de brouillages sont utilisées au total dans un ordre non prédictible.
99

1010
Can crypt and decrypt any file given in argument.
1111
The password asked is hashed to be used as a seed for the PRNG.
1212
The PRNG gives a unique key which has the same length as the source file.
1313
The key is xored with the password (the password is repeated as long as necessary).
1414
The file is then xored with this new key, then a scrambler is used.
1515
it scrambles the ascii table using the PRNG or the keyFile given.
16+
256 scramble's tables are used in an unpredictible order.
1617

1718

1819
## Installation
@@ -26,11 +27,15 @@ LINUX:
2627
gcc -fno-move-loop-invariants -fno-unroll-loops main.c -std='c11' -o enigmax
2728
```
2829

29-
you can put the compiled file "enigmax" in your path to use it everywhere
30+
You can put the compiled file "enigmax" in your path to use it everywhere
3031
```
3132
export PATH="$PATH:/PATH/TO/enigmax"
3233
```
33-
write in your ~/.bashrc if you want it to stay after a reboot
34+
Or you can make an alias
35+
```
36+
alias enigmax='PATH/TO/enigmax'
37+
```
38+
write one of them in your ~/.bashrc if you want it to stay after a reboot
3439

3540
## Usage :
3641

@@ -53,7 +58,7 @@ write in your ~/.bashrc if you want it to stay after a reboot
5358
*normalise the size of the keyFile, improving too short (less secure) or too long (take long time) keyFiles*
5459

5560
**-d (destroy):**
56-
*delete the main file at the end of the process*
61+
*delete the source file at the end of the process*
5762

5863
**KEYFILE:**
5964
*path to the keyfile, generate the scrambler instead of the password.*
@@ -68,15 +73,15 @@ write in your ~/.bashrc if you want it to stay after a reboot
6873
enigmax file1
6974
```
7075

71-
lets you choose between crypting or decrypting then it will prompt for a password that crypt/decrypt file1 as file1x in the same folder, file1 is not modified.
76+
lets you choose between crypting or decrypting then it will prompt for a password that crypt/decrypt file1 as xfile1 in the same folder, file1 is not modified.
7277

7378
**the command:**
7479

7580
```
7681
enigmax file2 keyfile1
7782
```
7883

79-
lets you choose between crypting or decrypting, will prompt for the password that crypt/decrypt file2, uses keyfile1 to generate the scrambler then crypt/decrypt file2 as file2x in the same folder, file2 is not modified.
84+
lets you choose between crypting or decrypting, will prompt for the password that crypt/decrypt file2, uses keyfile1 to generate the scrambler then crypt/decrypt file2 as xfile2 in the same folder, file2 is not modified.
8085

8186
**the command:**
8287

@@ -100,7 +105,7 @@ lets you choose between crypting or decrypting, uses keyfile2 to generate the sc
100105
enigmax -dni file4 keyfile2
101106
```
102107

103-
lets you choose between crypting or decrypting, will prompt for a password that crypt/decrypt the file but generates the substitution's tables with the keyfile passing only one cycle of the Fisher & Yates algorythm(option 'n'), inverts the scrambling phase with the xoring phase(option 'i') and destroy the main file afterwards(option 'd')
108+
lets you choose between crypting or decrypting, will prompt for a password that crypt/decrypt the file but generates the substitution's tables with the keyfile passing only one cycle of the Fisher & Yates algorythm(option 'n'), inverts the scrambling phase with the xoring phase(option 'i') and destroy the source file afterwards(option 'd')
104109

105110
## How it works
106111

0 commit comments

Comments
 (0)