security - Password processing for public APIs? -
i not understand concepts of storing/processing passwords.
for example, our site has public api mobile application(ios, android, etc) provided authentication.
no doubdt, must not store raw passwords in database , must not send raw passwords between client , server, use hashes , salt.
this way, encrypt passwords on client , send hashes server. but, if "black hat" steals password hash , authenticates server api?
should hash passwords on client, send hashes, hash them again on server?
what common solution of problem?
great in advance.
you can use ssl protect communication channel between client , server, , send password unencryped.
second approach - store hashed passwords (without salt) in server, , when authenticate - random token server (that expire in minutes), calculate hash client password , use calculated hash encode received token. send encoded token server. server same operation use hash stored in database instead calculating password. approach has cons - needs store password raw or hashed without salt. or send salt client token.
but, if "black hat" steals password hash , authenticates server api?
this problem solved using tokens expire after usage.
Comments
Post a Comment