r/programming • • Feb 20 '18

A CSS Keylogger

https://github.com/maxchehab/CSS-Keylogging
2.0k Upvotes

276 comments sorted by

View all comments

Show parent comments

11

u/McMasilmof Feb 21 '18

As long as you use https encrypting client side wont add anything to security. As a server you cant trust anything done client side so you need to hash too.

2

u/Schmittfried Feb 21 '18

No, then the transferred hash would be the actual password so a leaked database would allow attackers to log in by sending those hashes. If you hash client-side, you need a second hashing step on the server as well.

3

u/McMasilmof Feb 21 '18

You are right your new password would just become the hash of your password, but i was refering to hashing client side and then serverside again. As i said it just wouldnt add security but its not removing it ether.

If hashing multiple times wont reduce entropy.

1

u/Fear_UnOwn Feb 21 '18

Well wouldn't using https encryption make this whole thing useless anyways? I'm not 100% sure tbh.

But yea I guess I misread and thought you said the server still has your password anyways, but you said site (as in client side).

My mistake!

Does https encryption do anything more than the triple handshake?

6

u/McMasilmof Feb 21 '18

Https just encrypts the transport to prevent wiretapping(aka man in the middle). The client/your browser knows the password anyway so you dont need to encrypt it there. The server just hashes the password to compare it to the serverside stored hash(bc storing the password in plaintext on the server would be a sceurity risk)

0

u/Fear_UnOwn Feb 21 '18

But I do get that encrypting it count side doesn't help because it still gets typed into the client side before hashing.

-1

u/Fear_UnOwn Feb 21 '18

Yea I'm pretty sure we're on the same page here then lol.