When we talk about cybersecurity, we often hear about firewalls, VPNs and multi-factor authentication. But today, we’re diving into the secret kitchen of the security pros: well-seasoned passwords, with salt, pepper… and a good hash. Yes, you read that right. And no, it’s not a recipe for ribs.

Hashing: the basis of the dish

Before adding the seasoning, let’s talk about hashing. Hashing a password is like transforming it into an incomprehensible code. No matter how many times you use the same recipe, you always get the same result, but it is almost impossible to go back and find the original ingredient (the password).

Let’s take an example:

Password: Password123

Hashed (with SHA-256):

ef92b778bafe771e89245b89ecbc08a44a4e166c06659911881f383d4473e94f

This process is irreversible, which means that you cannot “de-hash” a password to find its original version. It is one of the pillars of modern computer security.

But beware!

Even if hashing is a robust method, it has a weakness: popular passwords, such as 123456, password or azerty123, are used so much around the world that they already appear in huge databases of pre-calculated hashes. These databases are exploited by so-called “brute force” or “rainbow table” attack software, capable of identifying these passwords in the blink of an eye.

In other words, a hash alone does not provide sufficient protection for a password that is too simple or too common.

This is where salt comes in.

Salt: to spice things up a bit

In cybersecurity, salt is a random string of characters, generated for each user, which is added to the password before hashing it. The aim is to prevent so-called “rainbow table” attacks, which consist of guessing a password from large databases of pre-calculated hashes.

For example:

Password: Password123

Salt: Xc91$zLp

Password + salt: Password123Xc91$zLp

Hash: a76432fe... ← different even if the password is the same!

Result? Even if two people use the same password, their hashes will be completely different. No more hash twins.

And what about pepper?

Pepper is a bit like salt’s secret cousin. But instead of being unique to each user, it is a shared secret value, often stored separately in the application and never in the database.

Its purpose? To add an extra layer of mystery. Even if the database is compromised, the pepper remains safe and sound elsewhere.

The result of salt, pepper and hash

Here’s how you can secure a password with the three ingredients:

  1. The user enters: Password123
  2. The system adds:
    • a unique salt: Xc91$zLp
    • a secret pepper: !@#MT2025
  3. Complete password to hash:
  4. Password123Xc91$zLp!@#MT2025
  5. This combined password is hashed using SHA-256, which gives:
9b1c728d7fd6fd6a25815f046122f6931f507fd9ac90db8a43b8a0d97c6c49c3

And to make it even clearer: this hash is what is stored in the database, not the original password or the raw ingredients.

Why is this important?

Because in 2025, cyberattacks are more frequent than ever. A poorly protected database becomes a digital sieve. Using the combo of salt, pepper and hash is like having a padlock, an alarm and a Doberman to protect your password.

Cybersecurity is serious, but it can also be understandable. By integrating techniques such as hashing, salt and pepper, we transform a simple string of characters into a veritable digital fortress.

Thought of the day

“It’s better to salt your password than to cry over your identity.”

Because on the web, discretion is an art… and security a priority!