hashcat / princeprocessor

Standalone password candidate generator using the PRINCE algorithm
Other
425 stars 98 forks source link

Architecture #43

Closed Cthulu201 closed 6 years ago

Cthulu201 commented 9 years ago

Is this 64-bit only? Trying to compile on 32-bit Intel and ARM systems and get unknown type name errors:

In file included from pp.c:17:0:
mpz_int128.h:33:9: error: unknown type name '__int128_t'
 typedef __int128_t              int128_t;
         ^
mpz_int128.h:34:9: error: unknown type name '__uint128_t'
 typedef __uint128_t             uint128_t;
         ^
pp.c: In function 'chain_ks':
mpz_int128.h:65:67: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define mpz_mul_ui(rop, op1, op2) do { rop = op1 * (op2); if (rop < (op2)) rop = UINT128_MAX; } while (0)
                                                                   ^
pp.c:488:5: note: in expansion of macro 'mpz_mul_ui'
     mpz_mul_ui (*ks_cnt, *ks_cnt, elems_cnt);^M
     ^
pp.c: In function 'main':
mpz_int128.h:65:67: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define mpz_mul_ui(rop, op1, op2) do { rop = op1 * (op2); if (rop < (op2)) rop = UINT128_MAX; } while (0)
                                                                   ^
pp.c:1293:11: note: in expansion of macro 'mpz_mul_ui'
           mpz_mul_ui (tmp, main_loops, wordlen_dist[pw_len]);^M
           ^
mpz_int128.h:59:67: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define mpz_add_ui(rop, op1, op2) do { rop = op1 + (op2); if (rop < (op2)) rop = UINT128_MAX; } while (0)
                                                                   ^
pp.c:1446:11: note: in expansion of macro 'mpz_add_ui'
           mpz_add_ui (save, save, iter_pos_save);^M
           ^
mpz_int128.h:33:9: error: unknown type name '__int128_t'
 typedef __int128_t              int128_t;
         ^
mpz_int128.h:34:9: error: unknown type name '__uint128_t'
 typedef __uint128_t             uint128_t;
         ^
make: *** [pparm.bin] Error 1

Thanks

magnumripper commented 9 years ago

As I said in a comment to acc9abc, that commit broke 32-bit targets. If you use the Makefile from prior to that, it should work fine.

magnumripper commented 9 years ago

Not sure why you closed this - I think @jsteube should fix it. All 32-bit targets still need GMP.

Cthulu201 commented 9 years ago

Because the comment you linked already addressed it, so it seemed redundant.

magnumripper commented 9 years ago

Yes but it will be forgotten (again). As will this issue, if it's closed. Please reopen!

Cthulu201 commented 9 years ago

Per magnumripper request reopened.

thezakman commented 9 years ago

Is this fixed yet? cant compile on 32bit

magnumripper commented 9 years ago

I have no idea why @jsteube didn't fix it, but you should be able to work around it just by checking out Makeifle from the commit right before acc9abc2 (so acc9abc2^).

thezakman commented 9 years ago

Thanks @magnumripper !

thezakman commented 9 years ago

Getting this error:

gcc -W -Wall -std=c99 -O2 -s -m64 -DLINUX -o pp64.bin pp.c mpz_int128.h In file included from /usr/include/stdio.h:28:0, from pp.c:5: /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory compilation terminated. In file included from /usr/include/stdint.h:26:0, from /usr/lib/gcc/i486-linux-gnu/4.7/include/stdint.h:3, from mpz_int128.h:22: /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory compilation terminated. make: *\ [pp64.bin] Error 1

thezakman commented 9 years ago

@Kthulhu201 was you able to fix it?

jsteube commented 8 years ago

Hey, I did not expect people still use 32 bit architectures. @magnumripper what do you think is the best way to fix this?

magnumripper commented 8 years ago

I've been meaning to write code that does 128-bit integers on 32-bit gear but it's very low priority. So I'd say just revert the 32-bit target to the version that requires GMP!

thezakman commented 8 years ago

I was trying to test it in a old machine i have that only support 32bit.

Cthulu201 commented 6 years ago

I don't use a multilib compiler on my 64-bit Intel and ARMv8 boxes, so the -m64 CFLAG isn't necessary.

roycewilliams commented 6 years ago

FWIW, CPU-only workloads can distribute nicely on Raspberry Pis and similar (and until recently, Raspbian and friends were still 32-bit, so probably still a lot of installs out there)