Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can SHA1 , SHA-256 , SHA-512 be broken up to run across multiple cores/threads?

I'm studying the speed (time to calculate hash) of SHA1 , SHA-256 , SHA-512 over different processors

Can these hashing algorithms be broken up to run across multiple cores/threads ?

like image 740
ahammadz Avatar asked Jun 06 '14 18:06

ahammadz


People also ask

Will SHA-256 be broken?

It is completely impossible to decrypt SHA-256 in the same way that it is impossible to decrypt milk. Or shave green. SHA-256 isn't an encryption algorithm, so there is nothing to decrypt.

Can SHA512 be cracked?

Technically speaking SHA512 password hashes are not cracked or decrypted . They are matched using a list of possible passwords, it is more akin to reversing than breaking.

What would it take to break SHA-256?

How long does it take to crack the SHA-256? To crack a hash, you need not just the first 17 digits to match the given hash, but all 64 of the digits to match. So, extrapolating from the above, it would take 10 * 3.92 * 10^56 minutes to crack a SHA256 hash using all of the mining power of the entire bitcoin network.

Can SHA-256 be parallel?

Multi-computation of SHA-256 is working in parallel pipelines, indicating that the computation capacity can be 3 times of that with standard SHA-256 implementation.


1 Answers

If you're wondering about parallelizing the execution of computing a single hash (regardless of flavor 1, 256, or 512) then the answer is sadly no. That is because of the way the SHA transform function is defined. It operates on blocks of fixed size but the output of the transformation of each block is required by next so you can't run the computations in parallel.

Obviously it is possible to run multiple hashes in parallel, for different input strings, but that I assume you already knew.

If all you wanted was to generate digests for large inputs using underlying SHA transforms you could define an arbitrary scheme for segmenting the input and then generating digest blocks for each segment in parallel. Then combine those and so on..

Something like this:

 | ------------------ large input ---------------------------------------------|

 |    b0     |    b1    |    b2    |          |          |          |    bn    |

You can generate H(b0), H(b1), .. H(bn) in parallel.

Then, generate H_OUT = H(H(b0) + H(b1) + .. + H(bn)) (where the + sign could be concatenation or a simple XOR but these would very likely not be cryptographically strong).

This method will benefit from multiple cores but H_OUT will not be equivalent to computing a single hash of the original large input.

like image 113
Mike Dinescu Avatar answered Sep 26 '22 10:09

Mike Dinescu