Please note, this is a STATIC archive of website hashcat.net from October 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
hashcat Forum
About operators for u32x and u8x - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Developer (https://hashcat.net/forum/forum-39.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-40.html)
+--- Thread: About operators for u32x and u8x (/thread-9010.html)



About operators for u32x and u8x - tachsah - 03-04-2020

Hi y'all

I have successfully implemented a FNV1 module but only for the attack mode 0 (dictionary).
I'm trying to write the same module for other attack modes (I'm working on -a 3 right now).

I noticed that the types u32 are turned into u32x and u8 into u8x. But when I'm trying to do something like u32x ^= u8x it fails saying "error: implicit conversions between vector types ('u32x' (aka 'uint8') and 'u8x' (aka 'uchar8')) are not permitted".

I have taken a look at the OpenCL/inc_types.h where the operations for types are defined (around line 120ish for vector size = 2 for example) and indeed there is no operator definition for XORing a u32x and a u8x.

My questions are the following : should I be looking into trying to cast my u8x into a u32x and then do the XOR ? or define the ^= operator for u32x ^= u8x ? or am I a fool and should not use u8x anyway even though FNV1 is working with bytes?

Thank you in advance.

ps : I love the post icon feature on this forum


RE: About operators for u32x and u8x - atom - 03-04-2020

Try to avoid u8x if possible. Since GPU are always using 32 bit registers it doesn't matter if you store your 8 bit values into 32 bit integers. Come to IRC if you have more development questions and be patient Smile