If a hash function $H$ is collision resistant, are the following two hash functions collision resistant or not? ($||$ is concatenation)
$H'(m) = H(H(m)) || H(m)$
$H''(m) = H(m) || H(m)$
My first approach to the problem for the first function is this: by proof of contradiction, I find that there aren't $m_1 \ne m_2$ so that $H'(m_1) = H'(m_2)$, because:
$H'(m_1) = H'(m_2) \iff H(H(m_1))||H(m_1) = H(H(m_2))||H(m_2)$
If we suppose that $m'_1 = H(m_1)$ and $m'_2 = H(m_2)$ then:
$H(m'_1)||m'_1 = H(m'_2)||m'_2$ which is false because $H$ is collision resistant.
Is my solution correct or am I missing something?
I can apply the same technique to the second function, but what confuses me is that first half bits are always the same as the last half bits, and this definitely doesn't look secure. But collision resistance is all I need.