0
0
Cybersecurityknowledge~3 mins

Why Hashing algorithms (SHA, MD5) in Cybersecurity? - Purpose & Use Cases

Choose your learning style9 modes available
The Big Idea

What if your password could be checked without ever being seen by anyone?

The Scenario

Imagine you have a huge list of passwords written on paper, and you need to check if a new password is already used without revealing the original passwords.

The Problem

Manually comparing each password is slow and risky because anyone who sees the list can steal all passwords. Also, mistakes can happen easily when handling many entries.

The Solution

Hashing algorithms like SHA and MD5 turn passwords into unique codes that hide the original data. This way, you can check if passwords match without ever seeing the real ones.

Before vs After
Before
if new_password == stored_password:
    allow_access()
After
if hash(new_password) == stored_hash:
    allow_access()
What It Enables

It enables secure and fast verification of data without exposing sensitive information.

Real Life Example

When you log into a website, your password is hashed and compared to the stored hash, keeping your actual password secret even if the database is leaked.

Key Takeaways

Manual password checks risk exposure and errors.

Hashing hides original data while allowing verification.

SHA and MD5 are common algorithms used for this purpose.