back

Broken Cryptography

Cryptography is the design of a secure communication system that is unreadable by a third-parties. Broken cryptography is when the system fails to perform this function.

Causes of Broken Cryptography

Deprecated Algorithms

Hash Functions

Symmetric encryption

Asymmetric encryption and key exchange

Inadequate implementation

Mitigation

Weak Hashing Algorithm

Hashing algorithm is used to sign digital certificates, create message authentication codes (MACs), hash passwords and other authentication cases.

Strong hash functions

Password hashing requirements

Impact
The impact of successful attacks on weak hashing algorithms can be disastrous, limited only by the value of data, and the imagination of the attacker in leveraging said data. There are countless examples of devastating data breaches exemplifying the fallout from poor hashing algorithm choice. For example, in 2016 (a full two years after the fact) Yahoo! announced they had been the victim of a gargantuan breach, the data of which constituted over 500 million Yahoo! accounts, with account details including; DOBs, unencrypted security questions and answers, and hashed passwords. Had the passwords been hashed by a strong and up to date hashing algorithm, they may have remained worthless data to the attacker. However, the algorithm used was a known weak hashing algorithm - MD5.

Prevention

Given their critical function as a security enabler for numerous online functions, it is imperative for organizations and individuals responsible for implementing functions utilizing hashing algorithms to ensure they are up to speed with the latest iteration. This is, in reality, the only solution to the problem that weak hashing algorithm use represents.

Previously standard hashing functions that are nowadays considered very high risk or completely broken include:

Current hash functions deemed robust and accepted as standard include:

When the hash function is used to hash passwords, consider the use of more suitable algorithms, such as:

In any case, make sure to use an appropriate work factor, i.e., a high enough iteration count.

Testing

Verify that known weak hashing algorithms (i.e. MD5, SHA1, etc.) are not used unless required for backwards compatibility.

References

OWASP - Password Storage Cheat Sheet

Wikipedia - Cryptographic Hash Function

Digicert - Weak Hashing Algorithm

Dalhousie University - MD5 Collission Demo

Wikipedia - Secure Hash Algorithms

Cryptography Stack Exchange - Understanding the Length Extension Attack

IACR - Collisions for Hash Functions