![]() |
|
|
|
#1
|
||||
|
||||
|
First off the relevant file for this change (assuming you are using the 1450 variant which it sure sounds like you are) - size independent files:
Quote:
Quote:
Code:
typedef struct pw
{
u32 i[64];
u32 pw_len;
} pw_t;
I don't know why it would crash - perhaps you can use a debugger and give the source code line upon which it crashes. I am assuming you are using OpenCL and not GPU though I would have imagined they would share definitional source. It does call sha256_hmac_init_swap which has special handling above 64 size - the truncation to 8 bytes looks strange and maybe this is untested given the buffer limitation? It in turn calls sha256_update_swap which looks like it handles any size. Based on the spec: Quote:
It would be nice to make a PR for this but because of the optimization sensitive nature of this project, more thinking about exactly how to do that is needed - maintain optimization while allowing the buffer size to change without annoying recompilations. Oh and finally this is likely the issue - code needs to be generalized in: Quote:
Code:
token.len_min[1] = SALT_MIN; token.len_max[1] = SALT_MAX; Code:
digest[0] = hex_to_u32 (hash_pos + 0); digest[1] = hex_to_u32 (hash_pos + 8); digest[2] = hex_to_u32 (hash_pos + 16); digest[3] = hex_to_u32 (hash_pos + 24); digest[4] = hex_to_u32 (hash_pos + 32); digest[5] = hex_to_u32 (hash_pos + 40); digest[6] = hex_to_u32 (hash_pos + 48); digest[7] = hex_to_u32 (hash_pos + 56); digest[0] = byte_swap_32 (digest[0]); digest[1] = byte_swap_32 (digest[1]); digest[2] = byte_swap_32 (digest[2]); digest[3] = byte_swap_32 (digest[3]); digest[4] = byte_swap_32 (digest[4]); digest[5] = byte_swap_32 (digest[5]); digest[6] = byte_swap_32 (digest[6]); digest[7] = byte_swap_32 (digest[7]); Last edited by chants; 08-19-2019 at 08:13. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|