Jump to content

[SOLVED] sha512


Stooney

Recommended Posts

I'm working on a website where users passwords are stored in a sha512 hash.  I don't want to send the password as plaintext when logging in.  Does anyone know of a javascript library available that will hash the password on the client side?  If not, any ideas on how I should secure the password before sending it to the server?

Link to comment
Share on other sites

Ummm, that's not adding security at all.. it merely creates a dependency on javascript to be able to use something. Which is something you want to avoid!

I'd say you just don't! As anything serverside needs data send first (which isn't hashed) and anything clientside pretty much means making your salt public? That's reducing security instead of adding.

Link to comment
Share on other sites

The worst thing one can do is send a plaintext password to a server.  Hashing it client side would do nothing but add security.  If they can crack a sha512 hash then they deserve it.

 

If a hacker gets ahold of the hash I wouldn't be nearly as concerned as if they got ahold of the plaintext password.  You two are silly :D

 

(I'm not saying it won't be double checked on the server side, this is just for legit users security)

Link to comment
Share on other sites

The worst thing one can do is send a plaintext password to a server.  Hashing it client side would do nothing but add security.

 

That is what SSL is for. Hashing the password with JavaScript is just plain dumb. What happens for users without JavaScript enabled, such as peple using some hand-held devices, blind people using screen readers, or just anyone who does not want JS enabled for security reasons. Then you have to account for the fact that there are many different browsers out there and some have peculiarities on how they interpret JS. Are you willing to test every version of every browser to make sure your JS works correctly in each one?

 

As a rule, using JavaScript should never be a requirement for a site (there are a few exceptions).

Link to comment
Share on other sites

That is what SSL is for. Hashing the password with JavaScript is just plain dumb. What happens for users without JavaScript enabled, such as peple using some hand-held devices, blind people using screen readers, or just anyone who does not want JS enabled for security reasons. Then you have to account for the fact that there are many different browsers out there and some have peculiarities on how they interpret JS. Are you willing to test every version of every browser to make sure your JS works correctly in each one?

 

As a rule, using JavaScript should never be a requirement for a site (there are a few exceptions).

mjdamato, you can always check the length of the password. A sha512 produces a 128 length string right? I don't suppose someone would have a password that long. But you do have a point. :D

 

chrisdburns, using JavaScript for security is plain dumb. You should just use it for GUI and effects. I mean you're introducing complexity that serves no real purpose. Learn to KISS!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.