security - Authentication with salted password -


i'm using scrypt generate strong hashes of password of user. want log user in, don't want send password in plaintext on wire, how check if password correct (without roundtrip), since salted?

i'm having client / server scenario. client application on desktop computer (not website, nor http server).

how can achieve this? came far: i'm generating the salt + hash on client, form mcf out of , send server. save mcf database. haven't send password, hash practically useless (since scrypt should quite strong, , require few million years reverse it). how can log user service, without sending plaintext password server compare it? can't rehash it, since result in different hash due different salt? need send salt client, hash password, send hash server, compare it, , send authentication token back.

how can achieve this? authentication token secure? can used impersonate anyone, guess?

don't want send password in plaintext on wire,

good idea, if connection not encrypted (something ssl/tls), whatever send is plaintext. if hash password client-side, , send on network, password. there no benefit here, prevent user exposing actual password, re-use on other sites. (read more here)

ideally use ssl/tls encrypt connection. guess if wasn't possible, using asymmetric encryption certificates on message sending ok way of re-inventing wheel, hesitant recommend without having security person on it. it's easy screw up, , rule never roll own crypto scheme.

if can't verify/invalidate/update public key, not scheme.

i need send salt client, hash password, send hash server, compare it, , send authentication token back

the salt isn't supposed super secret, it's not great give away that, unauthenticated users. authentication token, hash, salt, etc can intercepted if connection not encrypted. if couldn't, didn't solve problem of users creating accounts through method (maybe don't need to, worth mentioning).

you have use asymmetric encryption server can decrypt data.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -