Ajax Login: password encryption

I am using jQuery Ajax for user login. Right now, I'm using JS to grab the values ​​from the username and password text fields and send them to an aspx page that validates credentials. It then returns JSON, letting the user know if they are logged in or not. Everything works fine, but I noticed when using Firebug that the password is sent in plain text.

What is the best way to encrypt a password? (BTW, I'm not on an HTTPS server)

+5
source share
4 answers

Bcrypt can be your friend. And there is also a Javascript implementation called jsBCrypt . I highly recommend reading this insightful article: Keeping passwords in irreproducible form .

But : Be careful! If you are not using SSL or the server provided by nonce , you may be vulnerable to humans in medium attacks. If someone reads (unencrypted) traffic between your client and server, he gets an encrypted password. And it is enough for him to use it for authentication on the server whenever he wants, without knowing the real password ..

+3
source

https. , , , , firebug ( ), /.

, https - . . , , , .

+2

Ajax . . , . , , SSL-. , , SSL.

Bcrypt, , , , Ajax. Bcrypt /, - .

RSA- AES- ( JavaScript) ( , ASP.NET).

:

  • RSA.
  • RSA RSA.
  • AES RSA.
  • AES .
  • Ajax .
    • AES .

I would like to have a one-stop solution to do all this, but I don't know about it at this time.

Libraries I used:

0
source

All Articles