# Creating a hash of XOR'd blocks

Suppose a message $m$ is divided into blocks of length $160$ bits: $m > = M_1 || M_2 || ... || M_l$ And define $h(m) = M_1 \oplus M_2 \oplus ... \oplus M_l$

Which of the three desirable properties of a good cryptographic hash function does h satisfy? Show that it does not satisfy the other two.

Three desirable properties of a cryptographic hash function http://en.wikipedia.org/wiki/Cryptographic_hash_function#Properties

I feel like if there is only one, like the question states, it has to be the first one, preimage resistance. However, given a hash $h = 000....0$ I can find a bunch of $m$'s that could give that particular hash. Maybe since there are lots of solutions you can't pin point the specific $m$ that gave that value?

What do you think?

-

I first thought it might've been supposed to be $h(m)=H(M_1)\oplus H(M_2)\oplus\dotsb\oplus H(M_\ell)$, where $H$ is a PRF, but that's not preimage resistant either. (You need to hash about as many random blocks as there are bits in the output and do some linear algebra to get first preimages, but that's a negligible amount of work.) – Ilmari Karonen Dec 16 '11 at 19:07

## 1 Answer

I believe that this is a poorly written question: such an $h$ obviously doesn't have either preimage resistance, second preimage resistance or collision resistance.

The inability to rederive the specific value of $m$ based on its hash is not an interesting property; it's pretty much true of any function which generates an output shorter than its input.

I don't know where you're getting these questions from; based on this question, I'd suggest you look elsewhere.

-

Old Exams, thanks for the confirmation of my worst fears! – Bobby S Dec 16 '11 at 17:43
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 11, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.954967200756073, "perplexity_flag": "middle"}