Let $\mathcal{G}$ be a cyclic additive group for an elliptic curve $E\, / \ \,\mathbb{F}_p$, and let $p, n$ be two large prime numbers (e.g., we can consider $\texttt{secp160r1}$ with $p = 160$ bit and the reasonably even $n$ is $160 $ bit long).
I have read several papers in which hashing functions were defined, but I do not understand how the definitions were reached. Let me give you an example:
$H_1:\{0,1\}^* \times \mathcal{G} \times \mathcal{G} \rightarrow \mathbb{Z}_n^*$
$H_2:\{0,1\}^* \times \{0,1\}^* \times \mathcal{G} \times \mathcal{G} \times \mathcal{G} \times \mathcal{G} \rightarrow \mathbb{Z}_p^*$
My questions are:
- Why do the authors multiply the value $\{0,1\}^*$ by $\mathcal{G}$ more than once ? One time is not enough?
- Why, in the second function $H_2$, do they multiply the value $\{0,1\}^*$ two times with itself? What changes?
- If I want to define a third hashing function $H_3$, do I need a third prime number or can I leverage $p$ or $n$ (in $H_1$ the output is in $\mathbb{Z}_n^*$, and in the second in $\mathbb{Z}_p^*$)?
- What is in practice the difference between $H_1$ and $H_2$?
- Supposing that $n = p = 160$ bit, may I estimate the output length for each hashing function? Is this long $160$ bit right (e.g., could be SHA-1)?
- Why not simply define a hashing function as $H:\{0,1\}^* \rightarrow \{0,1\}^l$?