8
$\begingroup$

I posted this question on crypto.SE but got no answer:

Let $w = a_0 \cdot a_1 \cdots a_{n-1} $ be a word from $ \{0,1\}^n $, $|w| = n$

Let $m = \sum_{i=0}^{n-1}{ a_i \cdot 2 ^ {n-1-i} } $ be the corresponding binary number constructed from the word. Let $k= \left \lfloor \frac{n!}{2^n} \right \rfloor \cdot (m+1)$ , then $ 1 \le k \le n! $.

Compute the Lehmer-Permutation $\pi_k$ from $k$ on $n$ numbers. ( https://en.wikipedia.org/wiki/Lehmer_code )

Set $ x := \pi_k \cdot w = a_{\pi_k(0)} \cdot a_{\pi_k(1)} \cdots a_{\pi_k(n-1)} $

Then $f(w) := x$.

So the function permutes the digits in the word $w$ and the permutation is determined by $w$.

Suppose you randomly choose uniformly a word from $\{0,1\}^{1000}$ and then you apply the function. Is it practically possible to invert the constructed word? That is, does somebody have an idea on how to invert the word?

More details may be found on:

http://orgesleka.blogspot.de/2015/09/candidate-one-way-function.html

This picture shows f applied on all words of length 7: graph-7

After two years, also posted on cs: https://cs.stackexchange.com/questions/110790/inverting-a-function

$\endgroup$
8
  • 1
    $\begingroup$ Also posted on Crypto.SE. Please do not post the same question on multiple sites. Each community should have an honest shot at answering without anybody's time being wasted. $\endgroup$
    – D.W.
    Commented Jul 24, 2016 at 1:53
  • 4
    $\begingroup$ It's fine to post on an site after waiting a suitable amount of time. (In this case the poster waited 3 days, which I'd say is within the lower limit of reasonable times.) It's always best to provide links, as well --- thanks for adding that, @D.W. $\endgroup$ Commented Jul 24, 2016 at 5:42
  • $\begingroup$ So you mean you first take a word consisting of numbers, say $w$. Then, from $w$ you have the Lehmer encoding that gives you a permutation $\sigma$. Thirdly, you apply $\sigma$ to the ordering of your letter in your intial word $w$ ? $\endgroup$ Commented Jun 17, 2019 at 9:37
  • $\begingroup$ @InfiniteLooper: Yes in short, that is how the function is computed. $\endgroup$
    – user6671
    Commented Jun 17, 2019 at 9:38
  • 2
    $\begingroup$ I try to imagine why it is difficult to give an answer to this question. If I correctly understand, the inversion can be done (in principle) by testing all the $w$ with the correct length. So the question is if it is possible to perform the inversion with a fast algorithm, say in polynomial time. Simple solutions are not immediately clear, but this is definetly not enough to declare that this is a one-way function. I guess that this is the reason why you are not receiving answers. $\endgroup$ Commented Jun 17, 2019 at 9:47

1 Answer 1

7
+500
$\begingroup$

Yes, you can use the Lehmer-Permutation to make a function that is suitable for cryptography, whose solution is just as hard as the Diffie-Helman problem. The relevant papers are:

(1) Roberto Mantaci, "A permutation representation that knows what "Eulerian" means", Discrete Mathematics and Theoretical Computer Science (4): 101–108, 2001, link.

and

(2) Iharantsoa Vero Rahrinirina, "Use of Signed Permutations in Cryptography", 2017, arXiv link.

In (1), the author shows that the Lehmer code of a permutation is a subexceedant function, and indeed you have a one-to-one correspondence between subexceedant functions and permutations. In (2), the author shows how to use a subexceedant function in cryptography. He discusses the importance of choosing a good base, just like you did by choosing $k$. For such a base, Section 3.1 shows how to do an analogue of the Diffie-Helman public key exchange with a subexceedant function. He points out in 3.4 that it's just as hard as the classic Diffie-Helman problem, i.e. hard enough for cryptography.

Lastly, the problem you raised, of choosing $w$ at random, is a special case of the public key setup of (2). Here Alice is the oracle who "knows" the random number chosen, and an attacker is trying to figure out Alice's private key based on her public key. If your choice of $k$ does what you claim on your blog (making the permutation well-distributed), then (1) and (2) show that your proposed $f$ is good for cryptography.

$\endgroup$
0

You must log in to answer this question.