how to use these hash functions in python? In this article https://www.mdpi.com/2073-8994/12/10/1687/htm, specifically in the section 4.1 of the initialization phase,the following cryptographic hash functions have been chosen:
\begin{align}
h_1&amp;:   \mathbb G\to\mathbb Z_q^*\\
h_2&amp;:  \{0,1\}^*\times\{0,1\}^*\times\mathbb G\to\mathbb Z_q^*\\
h_3&amp;:  \{0,1\}^*\to\mathbb Z_q^*
\end{align}
where G is an additive group with order q.
Can anyone explain to me what's the meaning of their notations and how to use them for example in SHA algortihm? Or maybe give me a simple example with real inputs?
The $q$ is defined as the order of the ECC is used. Therefore we need to use a hash function that has at least 256-bit output since the secure curves use at least around that. Let choose SHA256.

$h_1 : \mathbb G\to\mathbb Z_q^*$
Given $g \in \mathbb G$ represent it in binary and hash with SHA256. Note that the $Z_q^*$ means $Z_q - \{0\}$ so you need to discard if the hash value is zero. Wait, if you luckily hit zero, publish a short paper.

$h_2:  \{0,1\}^*\times\{0,1\}^*\times\mathbb G\to\mathbb Z_q^*$
The $\times$ is used as the function takes input from 3 spaces. You can concatenate the inputs from them, however, two distinct delimiters are required since the first two spaces are not bound (Kleine star). This unboundedness can cause simple collisions, like $aab||ba$ and $aa||bba$ are two distinct inputs from two different input spaces, however, both have the same hash, and this is a collision since the inputs are from different spaces.
You may need to use 3 inputs like $$String1||\text{delimeter1} || String2 || \text{delimeter1} || g$$ where $String1$ from the first space, $String2$ from the second space and $g \in \mathbb G$.

$h_3:  \{0,1\}^*\to\mathbb Z_q^*$
Nothing special from the above cases.


They say you need 3 distinct hash functions. It is not clear that you may benefit from domain separation like below.
\begin{align}
h_1(x)&amp;:  \operatorname{SHA256}(\texttt{"Hash-one"}||x)\\
h_2(x)&amp;:  \operatorname{SHA256}(\texttt{"Hash-two"}||x)\\
h_3(x)&amp;:  \operatorname{SHA256}(\texttt{"Hash-threee"}||x)
\end{align}
If it is not this case you may need 3 different hash functions.
Also note that, if the $q &gt; 256$ you cannot use SHA256 directly then use SHA512, Blake2, etc. and trim the result whenever needed.