Score:0

How to find the right data for generate a partial SHA-256

ca flag
GMG

I have 12 bytes (5 fixed and 8 variable) of data that will be passed to SHA-256, at the end only the last 5 (most significant) bytes of the 20 generated are checked, is there a way to generate the 8 variable bytes to fake this type of SHA-256 check?

fgrieu avatar
ng flag
Hint: a fair model of SHA-256 restricted to fixed-size input bitstrings is a random function from the set of these bitstrings to the set of 256-bit bitstrings. By this model, what is the probability that when you hash one of the 5 fixed + 8 variable bytes at input, the output matches the required conditions? How many such attempts with different 8 bytes values are thus expected to be necessary to find a suitable input? Is 8 bytes variable enough space for that, with some margin? Is that computationally feasible with the resources you can assume?
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.