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 6237009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:57:01+00:00 2026-05-24T10:57:01+00:00

I searched all over the Net, including here on SO: There is a lot

  • 0

I searched all over the Net, including here on SO: There is a lot of discussion on the need to salt passwords before hashing and storing them.

In case the password is used to compute a key used for encryption (“Password Based Encryption”): what if you do not store the password at al?

  • [Note: I did read SO: Passphrase, Salt and IV, do I need all of these? and Does IV work like salt are certainly a related question: I am not sure how the Initialization Vector discussed there relates to the question here]

Suppose:

For encryption

  1. the users enters a master password
  2. this is SHA256 hashed and the output is used to AES256 encrypt a file
  3. the hash is not stored (and obviously neither is the master password)

For decryption

  1. The users enters the master password
  2. This is SHA256 hashed and the output is used to decrypt the file
  3. If the decryption was successful, the password was – apparently – correct

My question:

When not storing anything except the encrypted file itself, is there any benefit in salting the master password before hashing it?

Considerations:

  • it would probably reduce the likelihood of a hash-collision
  • it would require the salt to be stored.
  • if the salt were lost/corrupted the user would not be able to decrypt the file anymore

  • how to check for successful decryption in step3: does this require part of the file contents to be known?

  • if so, how much of a faux-pas is storing a known value in an encrypted file (this cannot always be prevented – an attacker might guess that for example the users last name is encrypted somewhere in the file – an be correct).
  • 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-24T10:57:02+00:00Added an answer on May 24, 2026 at 10:57 am

    If you are not storing the master password then there is no need to salt it. If you are reusing the master password to generate a lot of single-use passwords then it will need to be stored encrypted and decrypted as required.

    Salting is for long term storing of user passwords that have to be matched more than once so that people with the same password don’t have the same hash, which would help an attacker who stole the file.

    Salt is for hashing in long term storage, an IV is for encryption using CBC mode (or CTR mode where it can also be called a nonce).

    As to checking that your file has decrypted correctly, just ensure that you use a padding like PKCS7. When the last block is decrypted the padding will be checked to ensure it is in the right format. If the decryption failed then the padding will not be correctly formatted and you should get a “Padding failed” error.

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

Sidebar

Related Questions

.NET/MVC3 newbie, so please bear with me! I've searched for this answer all over
I searched all over net for an hour i couldn't find a decent code
I've searched all over the net for a solution to this so lets hope
I've searched all over the net, but I could not find a solution to
I am stuck and searched all over spending days on this. I need to
I searched all over the internet and this site and I can't figure this
I've searched all over for an answer to this, but cannot find any clear
I've searched all over the web and can't seem to find documentation or even
So I have searched all over the place and I can not seem to
I've searched all over and tried everything but I still get: invalid multibyte char

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.