This article provides an in-depth analysis of password hashing technologies, which are an important security element of modern information systems, in particular the historically widespread MD5 and modern SHA family (SHA-1, SHA-256, SHA-512) algorithms. The study examines the cryptographic properties of each algorithm, including its one-way properties, collision resistance, and determinism. The article details the known security vulnerabilities of MD5 and SHA-1 (such as rainbow tables and collision attacks) and explains why they are no longer suitable for password security. The high level of security and widespread use of the SHA-2 family (SHA-256 and SHA-512) are highlighted. In addition, the article discusses in detail the best practices for modern password security, including salting (salting) and Key extension (key stretching) techniques (with reference to functions such as PBKDF2, bcrypt, Argon2). At the end of the article, specific recommendations are given to abandon MD5 and SHA-1 and use SHA-256 or SHA-512 in combination with salting and advanced password hashing functions, which will provide more robust protection for systems.
Argon2
MD5
PBKDF2
SHA-1
SHA-256
SHA-512
authentication.
bcrypt
collision (collision)
cryptography
data security
hashing
key extension (key stretching)
password security
salt (salt)
security vulnerabilities