Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Comments on Should a salt be stored in the same database as the hash?

Parent

Should a salt be stored in the same database as the hash?

+20
−0

To protect against dictionary and rainbow table attacks it is well known that passwords should be salted before hashing. The salt (unique to each password) gets stored with the hash, often in the same string separated by a semi-colon.

However if the salts and hashes are stored together and the database is compromised then the attacker will have access to each salt used for each hash, which defeats the purpose of the salt.

Is this a legitimate concern? Should salts be stored in a separate database to hashes?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

General comments (1 comment)
Post
+1
−1

The issue with using two separate databases is you need to:

  • store both access strings
  • back up both databases
  • manage both databases
  • keep both databases patched

By the time you have done that, the risk of both databases getting hacked is much the same as the risk of a single database getting hacked.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

It is obvious that the two databases are related to each other <a href="https://fun-games.io" >Fun Ga... (1 comment)
It is obvious that the two databases are related to each other <a href="https://fun-games.io" >Fun Ga...
JimkissJum‭ wrote 9 months ago

It is obvious that the two databases are related to each other Fun Games. This is inevitable.