4 ms·
You are susceptible to a length extension attack if you use sha-512 this way. You should hash twice or use sha-3 https://en.wikipedia.org/wiki/Length_extension
by monort 7y ago
You are susceptible to a length extension attack if you use sha-512 this way. You should hash twice or use sha-3
https://en.wikipedia.org/wiki/Length_extension_attack https://en.wikipedia.org/wiki/Length_extension_attack
- 4gotunameagain 7y agoI do not see how a length extension attack is relevant here, care to elaborate?
- bscphil 7y agoI think you misunderstood what they are using the hash for - neither the hash nor the plaintext should ever be revealed to a third party anyway. That said, I don't really see the point since it's no more secure than just using the long passphrase directly.
- DyslexicAtheist 7y ago> don't really see the point since it's no more secure than just using the long passphrase directly. a 5 word passphrase isn't automatically more secure than a 5 char password if the words are predictable. interesing paper goes into this[1]. brains are generally bad in coming up with good passphrases (not enough entropy :)). while my example is certainly very hard to predict I want to rule out an attacker predicting what makes the (nonsensical) passphrase. https://eprint.iacr.org/2016/246.pdf https://eprint.iacr.org/2016/246.pdf Edit: there is also a video to the above paper: https://www.youtube.com/watch?v=6-vrumB0UUw https://www.youtube.com/watch?v=6-vrumB0UUw
- bscphil 7y agoRight, but usually designs for password systems assume that the whole system is transparent to the attacker, in which case hashing it before use doesn't buy you anything. If your input phrase is low entropy then a hacker can compute sha512sum(low entropy phrase) just as easily as you can. So to get anything out of doing this is basically just assuming that your attacker won't know (or guess) that you're doing this. Maybe it doesn't hurt, but I wouldn't trust it with a low entropy passphrase. I suppose one use for it would be getting more entropy on sites with low password length requirements, like 10-15 characters max. Another possible problem is if your computer gets stolen and the `echo xxx | sha512sum` command is in your .bash_history file. To me this seems to add a lot of additional risk.
- deleted 7y ago[deleted]
- monort 7y agoYes, I misunderstood. I thought they append some string to a previous password to change the hash.