bkerler / opencl_brute

MD5,SHA1,SHA256,SHA512,HMAC,PBKDF2,SCrypt Bruteforcing tools using OpenCL (GPU, yay!) and Python
MIT License
163 stars 44 forks source link

SHA512 does not allow 128 byte input #8

Closed r3ndd closed 4 years ago

r3ndd commented 4 years ago

I get the error

AssertionError: password #0, '7ecbae3d12630e86834aa1bd910c8b60900b2a06791ea18c4d44cd6253c6ffff8516aeebf9a8feb687d22a58b420dd8b60702845325f6d9848bf1ebf365f8a10' (length 128) exceeds the input buffer (length 128) when padded

when attempting to hash a 128 byte input. This can be easily replicated by trying to hash the hex output of SHA512 with SHA512 again.

r3ndd commented 4 years ago

I see that you can pass an argument into the init function to increase the max allowed bytes, so that is a workaround for now.

bkerler commented 4 years ago

Yes, depending on your gpu, a smaller buffer is performing much better than large buffers. however if you need to hash large buffers all the time, use the init function to increase the overall buffer.