Out of these algorithms…
- MD5
- SHA1
- SHA224
- SHA256
- SHA384
- SHA512
… which has the least chance of collision, and which is the most secure at the time of writing this?
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It only takes a minute to sign up.
Sign up to join this communityOut of these algorithms…
… which has the least chance of collision, and which is the most secure at the time of writing this?
As Richie Frame noted in the comments, you basically listed them in order of ascending collision resistance.
The latter hashes have greater collision resistance due to their increased output size. With the exception of SHA-1 and MD5, this is denoted by the number in the name of the algorithm. For example, SHA-512 produces 512 bits of output.
The size of the output influences the collision resistance due to the birthday paradox.
To quote Wikipedia:
The "birthday paradox" places an upper bound on collision resistance: if a hash function produces N bits of output, an attacker who computes only $2^{N/2}$ (or $ \sqrt{2^N}$) hash operations on random input is likely to find two matching outputs.
So SHA-512 should have the greatest theoretical collision resistance.
Note that MD5 and SHA1 should probably not be selected as a candidate when developing anything new and should only be used for compatibility purposes when required.
The SHA-2 algorithms calculate their digests in an almost identical manner, so generally we assume they are equally secure, digest sizes aside.