lvaccaro / truecrack

TrueCrack is a brute-force password cracker for TrueCrypt (Copyrigth) volumes. It works on Linux and it is optimized for Nvidia Cuda technology.
GNU General Public License v3.0
155 stars 58 forks source link

ripemd160_aes.test.tc test fails on Fedora 22, NVidia GTX 970 #47

Open jhgorse opened 8 years ago

jhgorse commented 8 years ago

ripemd160_aes.test.tc test fails on Fedora 22, NVidia GTX 970

Modify src/Makefile.am:
* add -gencode 50, 52, 53. Remove incompatible 20.
* remove --opencc-options -OPT:Olimit=0
$ gutogen.sh
$ ./configure && make
$ cd test
$ ../src/truecrack -t ripemd160_aes.test.tc -c tes -m 4
TrueCrack v3.6
Website: http://code.google.com/p/truecrack
Contact us: infotruecrack@gmail.com
Found password:     "tsts"
Password length:    "4"
Total computations: "120"

Correct answer is "test".

This works when "-s 4" is appended, reducing computations from 120 to 81:

$ ../src/truecrack -t ripemd160_aes.test.tc -c tes -m 4 -s 4
TrueCrack v3.6
Website: http://code.google.com/p/truecrack
Contact us: infotruecrack@gmail.com
Found password:     "test"
Password length:    "4"
Total computations: "81"

Also, when "-v" is added, the computation for solving it is correct but reported incorrectly.

$ ../src/truecrack -t ripemd160_aes.test.tc -c tes -m 4 -v
TrueCrack v3.6
Website: http://code.google.com/p/truecrack
Contact us: infotruecrack@gmail.com

Memory initialization...

COUNT   PASSWORD    RESULT
0   t       NO
--- Performance: inf p/s, time: 0 s, passwords: 3 
... snip...
59  stst        NO
--- Performance: inf p/s, time: 0 s, passwords: 81 
60  test        YES
--- Performance: inf p/s, time: 0 s, passwords: 81 
61  eest        NO
--- Performance: inf p/s, time: 0 s, passwords: 81 
... snip...
119 ssss        NO
--- Performance: inf p/s, time: 0 s, passwords: 81 
Found password:     "tsts"
Password length:    "4"
Total computations: "120"
jhgorse commented 8 years ago

in Core.c around line 390, why does this occur?

        for (k=CORE_minlength;k<wordlength;k++){
            maxcombination=1;
            for (l=0;l<k;l++)
                maxcombination*=strlen(CORE_charset);
            offset+=maxcombination;
        }

I believe this maxcombination is messing up the offset, which then gives the wrong computePwd().

More tests to confirm with index added to incorrect password for reference

→ ../src/truecrack -t ripemd160_aes.test.tc -c tes -m 4 -s 0
TrueCrack v3.6
Website: http://code.google.com/p/truecrack
Contact us: infotruecrack@gmail.com
Found password:     "tsts" 99
Password length:    "4"
Total computations: "120"
→ ../src/truecrack -t ripemd160_aes.test.tc -c tes -m 4 -s 1
TrueCrack v3.6
Website: http://code.google.com/p/truecrack
Contact us: infotruecrack@gmail.com
Found password:     "tsts" 99
Password length:    "4"
Total computations: "120"
→ ../src/truecrack -t ripemd160_aes.test.tc -c tes -m 4 -s 2
TrueCrack v3.6
Website: http://code.google.com/p/truecrack
Contact us: infotruecrack@gmail.com
Found password:     "tets" 96
Password length:    "4"
Total computations: "117"
→ ../src/truecrack -t ripemd160_aes.test.tc -c tes -m 4 -s 3
TrueCrack v3.6
Website: http://code.google.com/p/truecrack
Contact us: infotruecrack@gmail.com
Found password:     "tese" 87
Password length:    "4"
Total computations: "108"
→ ../src/truecrack -t ripemd160_aes.test.tc -c tes -m 4 -s 4
TrueCrack v3.6
Website: http://code.google.com/p/truecrack
Contact us: infotruecrack@gmail.com
Found password:     "test" 60
Password length:    "4"
Total computations: "81"