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

  • Home
  • SEARCH
  • 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 8453137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:41:26+00:00 2026-06-10T11:41:26+00:00

I am building a secure loginmodule and I’ve been reading all these guides about

  • 0

I am building a secure loginmodule and I’ve been reading all these guides about salting the password before hashing etc.. However I felt that all the passwords are still “dehashable” with access to both the hash and the salt.

So I started thinking about what if I just store a piece of the hash in the database instead. In PHP when hashing with SHA-256 I get a 64character string, what if I just save like 50 of these in the database and do the same 50char comparison when logging in.

Bruteforcing would give some extra false-positives. But still they would have to try a lot and a lot of passwords and the real password is certainly not dehashable.

Am I missing something with my idea or could this actually work?

/ Andreas

  • 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-06-10T11:41:28+00:00Added an answer on June 10, 2026 at 11:41 am

    I felt that all the passwords are still “dehashable” with access to both the hash and the salt.

    A hash cannot be reversed: that is the very purpose and nature of the hash.

    The attack is that, knowing the hash due to some other information leak, you brute-force the problem by calculating hashes for all likely values for the input variable, and if you get a hit there is a very good chance that the value you guessed was the one that was originally used to create the hash.

    Salt slows this attack down in that it has to be done separately for every password instead of pre-calculated over all at once, but modern hardware can calculate hashes so fast now that this doesn’t have the deterrent value it once did.

    You can certainly reduce the likelihood of that brute-force guess being right by reducing the amount of hash data you store: for example if you kept only 8 bits of hash then an attacker couldn’t really guess the original password because one in every 256 passwords would match. But the necessary downside of that is that your own use of that hash for authentication is massively weakened, allowing 1 in every 256 random guesses to get in.

    The benefit of making the stored hashes less uniquely guessable is directly proportional to the cost of making the main authentication interface more susceptible to chance. The case of an off-line guessable hash only occurs when there is a database breach, rather than being a constant threat like the guessable authentication interface, so we generally care about it less.

    In your example, a 200-bit hash (50 hex digits) is still likely to give a unique value for all common password strings, so there is little real benefit.

    Ultimately the problem of preventing off-line guesses against a leaked database is unsolvable, but the best approach we have at the moment is making the hash calculation slow for both the attacker and the real authentication server. See bcrypt and PBKDF2 for the common implementations. Even so, this can only slow down mass-guessing offline attacks for long enough to give you time to ask your users to change their passwords after having discovered a data breach.

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

Sidebar

Related Questions

I'm building a MVC3 application that needs to store secure user information such as
Building a search with some custom objects and three scopes: All , Active ,
I'm building a contact form (PHP file, design has been already made) which will
We are building a multiuser app that has one database per customer. All customer
I am building a training tool for a client. They require a secure streaming
I'm building a password manager in PHP where the user can store and access
This is my first foray into building a secure web application. It will be
I am building an rails app and I want to secure the user's downloads.
We are building a set of web applications which all utilize their own unique
I'm building a Open Source product and I thinking about Localization, I've read about

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.