Technology
The above table from Hive Systems provides a comprehensive overview of the time required to crack passwords of varying lengths and complexities using current classical computing power. The data is based on using 12 RTX 4090 GPUs and bcrypt hashing, illustrating the capabilities of modern hardware in brute-forcing passwords.
Hash functions are fundamental to many cryptographic systems because they are designed to be one-way functions. Let's explore this concept using SHA-256, a widely used cryptographic hash function, and understand the impact of quantum computing on password security.
SHA-256 (Secure Hash Algorithm 256-bit) is part of the SHA-2 family of hash functions. It takes an input and produces a 256-bit (32-byte) hash value, often rendered as a 64-character hexadecimal number.
Why Reversing SHA-256 is Impossible?
SHA-256 is designed to be a one-way function. This means that while it is easy to compute the hash from an input, it is computationally infeasible to reverse the hash back to the original input. This property is known as pre-image resistance.
For example, given the hash 5e884898da28047151d0e56f8dc6292773603d0d6aabbddcba5d70ef66e15578, it is impractical to determine that the original input was "password."
How Hackers Crack SHA-256 Hashes?
However, instead of reversing the hash, hackers use a method called "cracking" to discover the original input:
Generating Possible Passwords: Create a list of potential passwords using various techniques, such as dictionaries of common passwords or permutations of characters, or rules-based methods that create variations of passwords.
Hashing Each Candidate: Each candidate password is hashed using the same hash function as the one that produced the target hash.
Comparing Hashes: The hashed candidates are compared against the target hash. If a match is found, the corresponding candidate password is considered to be the original input.
Example of Cracking SHA-256
Suppose a hacker wants to crack the hash 5e884898da28047151d0e56f8dc6292773603d0d6aabbddcba5d70ef66e15578. The process would look like this:
Step 1: Generate a list of possible passwords (e.g., "password1", "password123", "admin", etc.).
Step 2: Hash each password using SHA-256:
SHA-256("password1") = e38ad214943daad1d64c102faec29de4afe9da3d902869b91f2d2bfad9e3d50b
SHA-256("password123") = ef92b778bafe771e89245b89ecbc61875f97cfb373b16be1a2e76ea1bfad2e9b
SHA-256("password") = 5e884898da28047151d0e56f8dc6292773603d0d6aabbddcba5d70ef66e15578
Step 3: Compare each hash with the target hash:
The hashes for "password1" and "password123" do not match the target hash.
The hash for "password" matches the target hash, so "password" is the original input.
Quantum Computing and Time Complexity
The advent of quantum computing significantly alters the security landscape. Quantum computers leverage quantum mechanics to solve certain problems much faster than classical computers.
To understand the impact of quantum computing, we adjust the cracking times by considering the quadratic speedup provided by Grover's algorithm:
Quantum computing introduces new challenges for cryptographic security. Grover's algorithm, a quantum search algorithm, can speed up the brute-force search process.
Classical Computing: If a classical computer requires 2^40 operations to brute force an 8-character password, this means that there are 2^40 possible combinations.
Quantum Computing (Grover's Algorithm): With Grover's algorithm, the number of operations needed is reduced to 2^20 because √(2^40) = 2^20.
This quadratic speedup effectively halves the number of bits of security. In other words: A password that provides 2^n security on a classical computer only provides 2^(n/2) security on a quantum computer using Grover's algorithm.
An 8-character password with 40 bits of security (2^40 operations on a classical computer) would require approximately 2^20 operations on a quantum computer.
This quadratic speedup means that the effective security level of SHA-256 is halved when considering quantum attacks. While 2^256 operations are still infeasible with current quantum technology, this reduction highlights the need for alternative practices.
Practical Implications and Recommendations
In a post-quantum world, maintaining security requires significant advancements in our cryptographic methods. One such recommendation is to double the output size of hash functions; for example, transitioning from SHA-256 to SHA-512. However, it's crucial to recognize that password cracking techniques often leverage more than just computational power—they exploit methods like dictionary attacks as well.
Conclusion
Although reversing SHA-256 hashes remains infeasible, the rapid advancements in quantum computing demand a thorough reevaluation of our current security practices. By understanding the significant impact of quantum algorithms like Grover's, we can proactively prepare for a more secure future. Adopting passwordless authentication to strengthen our digital identities will be essential to staying ahead of these evolving threats.
In part two of this series, we'll explore key-based authentication. The security difference between password and key-based authentication is substantial. Key-based authentication, particularly with longer keys like 2048-bit, provides exponentially greater security than password-based methods. This underscores the crucial need to transition to passwordless authentication mechanisms, especially as quantum computing capabilities continue to advance.