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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:53:51+00:00 2026-05-15T04:53:51+00:00

Hey, first, let me say, I’m not asking about things like md5(md5(…, there are

  • 0

Hey, first, let me say, I’m not asking about things like md5(md5(…, there are already topics about it.

My question is this:

We allow our clients to store their passwords locally. Naturally, we don’t want them stored in plan text, so we hmac them locally, before storing and/or sending. Now, this is fine, but if this is all we did, then the server would have the stored hmac, and since the client only needs to send the hmac, not the plain text password, an attacker could use the stored hashes from the server to access anyone’s account (in the catastrophic scenario where someone would get such an access to the database, of course).

So, our idea was to encode the password on the client once via hmac, send it to the server, and there encode it a second time via hmac and match it against the stored, two times hmac’ed password. This would ensure that:

  • The client can store the password locally without having to store it as plain text
  • The client can send the password without having to worry (too much) about other network parties
  • The server can store the password without having to worry about someone stealing it from the server and using it to log in.

Naturally, all the other things (strong passwords, double salt, etc) apply as well, but aren’t really relevant to the question.

The actual question is: does this sound like a solid security design ? Did we overlook any flaws with doing things this way ? Is there maybe a security pattern for something like this ?

Addendum: the reason we don’t want to locally store the password in plain text on the client is because as sad as it is, many people still use the same password for multiple services, so getting the ‘real’ password would be a bigger security breach for the user than getting his hash stolen.

  • 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-15T04:53:51+00:00Added an answer on May 15, 2026 at 4:53 am

    As others have said, taking the client and your system in isolation this doesn’t really buy you anything – the first hash simply becomes the password.

    The value comes if (as is likely) the client uses that same password on other systems. In this case, should the client machine be compromised then at least your local copy of their hashed password doesn’t allow the attacker access to other systems. Obviously the attacker of the client will now be able to access your server – they have, after all, got the password.

    An attacker having access to the double-hashed value on the server won’t buy them anything, since they can’t reverse that to get the single hash (i.e., the “password”). Of course, if the attacker is in a position to read your security database then I suspect they have other attack vectors available 🙂

    Also, as another poster said, make sure you are using a salt on both hashes. Without doing so, reversing the hashes may actually be quite simple if the passwords are not strong.

    EDIT – actually, thinking about it, since you are using a hash as the password you don’t really need to use a salt on the server. No way anyone is going to be able to create a rainbow table that’s effective 🙂 Still need one on the client though.

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

Sidebar

Related Questions

Hey first question I'm asking here many thanks in advance. I'm using a vector
hey just a couple quick noob questions about writing my first ios app. Ive
Hey this is my first time trying anything like so I don't know if
Hey, long time listener first time caller, and I'm asking a question related to
Hey this is my first post so tell me if I am not giving
Hey I know I been asking alot of questions.. but not much resources on
Hey this is my first question on this website. Im creating a webpage for
Hey, I'm writing my first Rails app, and I'm trying to replace the underscores
Hey everyone, my first time trying to draw a multi-color gradient in actionscript 3.
Hey so what I want to do is snag the content for the first

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.