About confusing and potentionally insecure password handling

drkwv
Member
 
Posts: 67
Joined: Thu Jun 28, 2012 13:48

Re: About confusing and potentionally insecure password hand

by drkwv » Wed Mar 04, 2015 20:59

As far as I know, salt can be public and must be different for each user to be effective. Using one salt per server reduces its effectiveness. Though I do not understand why would you need to publish it or have it on a client side: you just send the password and server uses salt to calculate a unique hash resistant to rainbow tables attack and then uses the same salt every time user log in. So you just store randomly generated salt along with password hash in the same DB record.

It is also the common practice to use RSA public and private keys + nonce if you want to encrypt the password while sending it between the server and client. If you'll use some hash salted on the client and don't use nonce, MITM could just reproduce your raw encrypted request to get authenticated. There is a lot of nuances why people use SSL instead of trying to invent their own cryptographic algorithms.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: About confusing and potentionally insecure password hand

by rubenwardy » Wed Mar 04, 2015 21:13

The whole point is that we don't trust servers. We don't want them to have plaintext passwords.
 

drkwv
Member
 
Posts: 67
Joined: Thu Jun 28, 2012 13:48

Re: About confusing and potentionally insecure password hand

by drkwv » Thu Mar 05, 2015 05:11

rubenwardy wrote:The whole point is that we don't trust servers. We don't want them to have plaintext passwords.

Well then it is possible to use hash(password+server_public_key) as a password and then send it through SSL. If a malicious sever would try to use the same server_public_key he would need the corresponding server_private_key to be able to read client's message.
Also it would probably a good idea to use something like that:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
password_for_server = hash(user_typed_password+server_public_key)
for(i = 0; i < 100000000; i++)
{
  password_for_server = hash(password_for_server)
}

to prevent user_typed_password from bruteforcing if a malicious server would try to restore user_typed_password from password_for_server. Or you can use PBKDF2 for the same purpose. Also, it doesn't matter is it "bank account" or not because if data is not secured properly that is equal to "not secured at all".
 

Previous

Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 3 guests

cron