# Hash function with values in a multiplicative group of prime order [closed]

I have to implement a cryptographic protocol which involves a cryptographic hash function $H: \{0,1\}^* \to G$. It is viewed as random oracle. $G$ is a multiplicative group of prime order.

I want to know the steps to implement this function. Are there standard functions to do this?

The protocols also have pairing operations. It would be helpful if you could shed some light on their implementation too.

-

## closed as unclear what you're asking by DrLecter, e-sushi, rath, AFS, Ilmari KaronenDec 2 '13 at 16:31

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

There are (at least) two different meanings to 'G is a multiplicative group'? Do you mean that it's a prime-ordered subgroup of $Z^*_p$, for some prime $p$? Or, is it some group which happens to be expressed in multiplicative notation (that is, the group operation is written $A \times B = C$)? – poncho Jun 17 '13 at 15:25
The other obvious question is "do you care if you can deduce the relationship between the hashes of various strings? For example, if $A = hash("foo")$, and $B = hash("bar")$, do you care if someone can compute $n$ with $nA = B$? If you don't care (and whether you do or not will depend on what you're doing with this hash function), then there's an easy solution for any finite group. – poncho Jun 17 '13 at 19:17
which group are you using? – CodesInChaos Jun 17 '13 at 20:32
Reading "The protocols also have pairing operations", I would guess that you are asking about the "hash to curve" problem. Did I get this right ? – minar Jul 5 '13 at 20:38