aczid / crypto1_bs

Bitsliced Crypto-1 brute-forcer
200 stars 78 forks source link

Illegal instruction #11

Closed bildin closed 7 years ago

bildin commented 8 years ago

I have compiled code on Kali (x86) system. At first I've got errors with "asm". I changed "asm" -> " asm ", "-opt=c99" -> "-opt=gnu99". Both allow to finish compilation successfully, but on program run I get "Illegal instruction" error. I have no available x64 machine right now. Is it possible to fix this?

P.S. Also I've tried to compile on Kali (arm) on my Samsung Galaxy S5 via Linux Deploy application. It works well for collecting nonces, but system is too slow for solving keys. Also it displays there percentage beyond 100%.

UPD: It seems "Illegal instruction" occurs when pthread_join is called. May be the reason is much deeper...

aczid commented 8 years ago

This software is not supported on x86 machines. You need to use a 64 bit Linux OS. The underlying code for craptev1 does not work on x86, so patching my code will not help.

DrSchottky commented 7 years ago

Code actually works on x86 machines. The Illegal Instruction mentioned by @bildin was caused by popcnt usage (as said in #18 ). I successfully recovered a key with 50min of offline crunching on a late '03 2.8GHz Celeron. Anyway there are integers overflows somewhere in the code that screw up things ( like cracking %). I haven't gone deep into it, but I've seen many variables declared as size_t : that's a type-misusage since they don't represent the size of an object and width is platform-dependant.

aczid commented 7 years ago

Thanks for the report, you are right. I got weird results from craptev1_sizeof_space but it seems that's the only place anything goes wrong. I'll try to fix the code accordingly.

aczid commented 7 years ago

This should be fixed, please check the results. craptev1_sizeof_space needs a 64-bit up-conversion to get sensible results. bla has released craptev1-v1.1 that fixes this issue.

Gritsenich commented 7 years ago

My friend has the same problem "Illegal instruction" with a new compiled crypto1_bs (Kali x64) like with old version. He tried crypto1_bs on this processors: 1) Intel® Core™ i5-2520M (AVX supprorted only); 2) Intel® Core™ i5-3317U (AVX supprorted only). Any idea will be helpful.

DrSchottky commented 7 years ago

Very strange, I tested it on a 2nd gen i5 (i5-24xxM) and it worked flawlessy, Try to recompile it w/o -march=native

Gritsenich commented 7 years ago

Sorry. It was my mistake. Everything is fine. I just didn't known about direct compilation on the targeting computer and sent him my result. My computer has AVX2 supported processor.

aczid commented 7 years ago

Thanks to you both for confirming it still works ok. :)