Score:1

How many hashes to recover a salted password?

bm flag

If a password p is selected from a space of 2^64 passwords, and the server stores this as a hash, h = SHA-256(p||s) where s is a random 128-bit salt. How many maximum hashes would an attacker need to perform to recover "p" given (h,s)?

I was thinking that this is a pre-image attack so the attacker needs to find the same hash as the passwords. SHA-256 provides 256 bits of pre-image resistance. So I was thinking the attacker would need in the worst case 2^256 hashes to recover "p".

Marc Ilunga avatar
tr flag
This is not a collision attack, since the attacker is not allowed to freely choose the two colliding outputs. Instead, there a strategy that always finishes with at least one guess
ph flag
Consider 1) what is the answer if there is no salt and 2) how does adding salt change the answer?
CryptoGuru avatar
bm flag
Oh, so it's actually a pre-image attack.
fgrieu avatar
ng flag
This is closed as homework. It's an easy one. Hint: often the best strategy to find a password ([password cracking](https://en.wikipedia.org/wiki/Password_cracking)) is to try all passwords (in practice, about from most to least common, but that refinement is not in this problem). What's needed for this?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.