• $H: \{0,1\}^{n} \rightarrow \{0,1\}^{n}$.
  • $H$ is bijective.
  • It is difficult to derive $x$ from $H(x)$.

Is this type of function possible? What would the strength of it be?

I realize that RSA and discrete logarithms can fulfill this, but I was thinking of using standard operators instead of those two. Other primitives could be acceptable.

  • 2
    $\begingroup$ Where is the interest of this construction? Consider that a random permutation can solve this. $\endgroup$ – Robert NACIRI Apr 17 '16 at 9:59
  • 2
    $\begingroup$ $g^x\bmod p$ with a $n$-bit prime sounds pretty standard and is really hard to invert. $\endgroup$ – SEJPM Apr 17 '16 at 13:03
  • $\begingroup$ Related question: crypto.stackexchange.com/questions/11576/… $\endgroup$ – Samuel Neves Apr 17 '16 at 15:28
  • $\begingroup$ @SEJPM That function is neither bijective nor does its output conform to $\{0,1\}^{n}$. $\endgroup$ – Melab Apr 17 '16 at 15:29
  • $\begingroup$ @RobertNAICRI I am unable to remember the first reason. The second reason is the output function of Skein which is used, I think, to prevent a length extension attack. How can a random permutation solve this when they are purely imaginary? $\endgroup$ – Melab Apr 17 '16 at 17:57

On the practical side of things, if your hypothetical function is hard to invert, and assuming collisions are hard to find, why does it matter that it be bijective? For sufficiently large $n$ you can't construct a counterexample anyway, so a hash function may as well be bijective as far as anyone cares.

Otherwise, not exactly what you're asking for but you could try for a white-box block cipher implementation, basically just pick a block cipher, pick a random key, and embed the key in your implementation in such a way as to not be easily retrievable from the code. There are some papers describing techniques to do so, it might be worth taking a look.


Conditions given are properties of all encryption algorithm if the encrypting key is constant. If mapping is bijective there will be no collision.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.