Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3975488
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:41:28+00:00 2026-05-20T04:41:28+00:00

In a Linux system, passwords are stored using an MD5 hash. Why can the

  • 0

In a Linux system, passwords are stored using an MD5 hash. Why can the usage of “salt” protect the system more? Particularly, I want to make clear the following two

  1. The salt is said to be stored in
    clear text with the hash, then how
    it can prevent the attacker when the
    attacker knows the salt value.
    (Attacker can be the system
    administrator himself who can check
    /etc/shadow.
  2. If the salt is generated randomly
    everytime, how can the system
    compare the hash to authenticate the
    user?

For example, User A has user salt s1 and generate h1; h1 = md5(password.s1);.
The next time, it uses salt s2 and the system must generate a different hash, h2 = md5(password.s2). Since h1 is not equal to h2, how can the system authenticate the user?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:41:29+00:00Added an answer on May 20, 2026 at 4:41 am

    MD5 is a hash as you know, so if you give it an input, like ‘PASSWORD’, you get a unique (hopefully – however MD5 has collisions these days) output, like ‘3DE2AF…’.

    Now, as you know, it’s quite hard to directly reverse that, until somebody thought… wait, why don’t I pre-generate all the possible combinations of hashable values until I can reverse the hash. This is called a rainbow table.

    The purpose of a salt is to add arbitrary random data to the string being hashed, such that you increase the length of input to hash. This means general rainbow tables that expect to reverse just a password input to a hash won’t work. Of course, rainbow tables being just reverse lookups, you could simply generate a rainbow table to compensate for all the possible password+salt outputs. This is where the increase in length comes into its own; because of the nature of reversing hashes, the disk space to generate reverses for very long hash inputs soon becomes infeasible. Alphanumeric rainbow tables for 6-8 characters are already a couple of Gigabytes; increase the length and character classes and you start to talk in multiples of 10GB.

    Of course, if you’re salting with ‘PASSWORD’ and you hash ‘PASSWORD’ you’re hashing ‘PASSWORDPASSWORD’ which isn’t that much more secure, so the choice of salt is important too. Ideally, you should use a random salt with each hashed string, but of course, you need to know what it is. A common technique is to derive a salt from the username or some other property unique to this case. Adding arbitrary data isn’t in itself useful; having user-determined salt data now adds an additional level of complexity, meaning rainbow tables are needed with specialised searches for each user. The more you make this difficult, the more computational power is needed. That’s where the battle is.

    However, there are some modern techniques. I am not an expert, so I can’t tell you how secure these are, but they are worth a mention. The concept is slow hashing. Basically, through compound hash functions you make it take a while to compute each hash. As such, the ability for each user to check the password now has a constant amount of time added for each password you wish to check. If you’re bruteforcing, that is Bad News(tm). Similarly, if the system is well designed, if there are no shortcuts (which probably equate to weaknesses) then generating a rainbow table for a slow hash function should also take a while.

    Edit more detail here. See crypt() for the first example of this. @CodeInChaos has referenced PBKDF2 which forms part of PKCS#5. A newer development is scrypt.

    As I say, I’m not an expert cryptanalyst. On the latter example, I have no particular specialist knowledge as to its suitability, I’m merely showing you where things are headed.

    Edit 2 Clarified my write up of salt – I think I danced around the key issue of disk space before.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to replace multiple lines using sed on a Linux system Here
What are the possible disadvantages / pitfalls of using linux system user 'mysql' to
I just download poppler to Linux system,and I want to incorporate it in my
I am attempting to find a binary file in a Linux system using something
On a modern Unix or Linux system, how can you tell which code set
I'm trying to connect to Linux using SharpSSH, but am unable to. I want
I want to make a script of sorts such that I can automate the
My .Net application need to communicate with Linux based system which is using following
In a Linux system with multiple GPUs, how can you determine which GPU is
Hello all I have some very important system files which I want to protect

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.