Fix for MD2, MD4 and MD5 Are Weak Hash Functions #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Link
A weakness in the MD5 cryptographic hash function can result in a high number of different messages with the same MD5 hash (known as a "collision"). Previous work on MD5 collisions between 2004 and 2007 showed that the use of this hash function can lead to theoretical attack scenarios; however, more recent work has proven that this scenario can be exploited in practice. This exposes any system which relies on the MD5 hashing mechanism to a realistic threat of attack. It should be noted that the SHA-1 algorithm has also been found to exhibit a lack of collision resistance.
MD2, MD4, MD5 are not recommended and a replacement such as SHA-2 (-224, -256, -384, -512) should be considered
Here is a bad example using unsafe MD5:
Which should be replaced with at least a SHA-2 algorithm: