How can I convert numbers into prime numbers?
Thank you for your answers but I think I found a better method.


Take the hash of your input $h(x)$, preferably with random oracle approximation
Sample the interval $[2^kh(x), 2^k(h(x)+1)]$ and pick only primes, for each of them
Hash it with an universal hashing function $f$ until you find that $f(p)=h(x)$
Write to memory: $H(x)=p$


Done!



notes:


The random oracle makes collisions infeasible
Universal hashing gives high density of primes with high probability (there is a theorem out there but the principle is that, for a given prime, I have multiple hash outputs, so the probability that one of them is my input increases. See: Gennaro et al. - Secure hash-and-sign signatures without the Random Oracle, lemma 2)