One-way function

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
Question dropshade.png Open problem in computer science:
Do one-way functions exist?
(more open problems in computer science)

In computer science, a one-way function is a function that is easy to compute on every input, but hard to invert given the image of a random input. Here, "easy" and "hard" are to be understood in the sense of computational complexity theory, specifically the theory of polynomial time problems. Not being one-to-one is not considered sufficient of a function for it to be called one-way (see Theoretical Definition, below).

The existence of such one-way functions is still an open conjecture. In fact, their existence would prove that the complexity classes P and NP are not equal, thus resolving the foremost unsolved question of theoretical computer science.[1]:ex. 2.2, page 70 The converse is not known to be true, i.e. the existence of a proof that P and NP are not equal would not directly imply the existence of one-way functions.[2]

In applied contexts, the terms "easy" and "hard" are usually interpreted relative to some specific computing entity; typically "cheap enough for the legitimate users" and "prohibitively expensive for any malicious agents". One-way functions, in this sense, are fundamental tools for cryptography, personal identification, authentication, and other data security applications. While the existence of one-way functions in this sense is also an open conjecture, there are several candidates that have withstood decades of intense scrutiny. Some of them are essential ingredients of most telecommunications, e-commerce, and e-banking systems around the world.

Theoretical definition

A function f : {0,1}* → {0,1}* is one-way if and only if f can be computed by a polynomial time algorithm, but any polynomial time randomized algorithm F that computes a pseudo-inverse for f succeeds with negligible probability. That is, for all F, all positive integers c and all sufficiently large n = |x|,

Pr [ f ( F- ( 1n, f ( x ) ) ) = f ( x ) ] < | x | -c,

where 1n is the string of n 1s and the probability is over the choice of x from the discrete uniform distribution on {0,1}n, and the randomness of F. [3]

Note that, by this definition, the function must be "hard to invert" in the average-case, rather than worst-case sense. This is different from much of complexity theory (e.g., NP-hardness), where the term "hard" is meant in the worst-case. That's why even if some candidates for one-way functions (described below) are known to be NP-complete, it does not imply their one-wayness. The latter property is only based on the lack of known algorithm to solve the problem.

It is not sufficient to make a function "lossy" (not one-to-one) to have a one-way function. In particular, the function that outputs the string of n zeros on any input of length n is not a one-way function because it is easy to come up with an input that will result in the same output. More precisely: For a function that simply outputs a string of zeroes, an algorithm F that just outputs any string of length n on input f(x) will "find" a proper preimage of the output, even if it is not the input which was originally used to find the output string.

Related concepts

A one-way permutation is a one-way function that is also a permutation—that is, a one-way function that is both injective and surjective. One-way permutations are an important cryptographic primitive, and it is not known if their existence is implied by the existence of one-way functions.

A trapdoor one-way function or trapdoor permutation is a special kind of one-way function. Such a function is hard to invert unless some secret information, called the trapdoor, is known.

A collision-free hash function f is a one-way function that is also collision-resistant; that is, no randomized polynomial time algorithm can find a collision—distinct values x, y such that f(x) = f(y)—with non-negligible probability.[4]

Theoretical implications of one-way functions

If f is a one-way function, then the inversion of f would be a problem whose output is hard to compute (by definition) but easy to check (just by computing f on it). Thus, the existence of a one-way function implies that FPFNP, which in turn implies that P≠NP. However, it is not known whether P≠NP implies the existence of one-way functions.

The existence of a one-way function implies the existence of many other useful concepts, including:

The existence of one-way functions also implies that there is no natural proof for P≠NP.

Candidates for one-way functions

The following are several candidates for one-way functions (as of April 2009). Clearly, it is not known whether these functions are indeed one-way; but extensive research has so far failed to produce an efficient inverting algorithm for any of them.

Multiplication and factoring

The function f takes as inputs two prime numbers p and q in binary notation and returns their product. This function can be computed in O(n2) time where n is the total length (number of bits) of the inputs. Inverting this function requires finding the factors of a given integer N. The best factoring algorithms known run in O(2^{{(\log N)^{1/3} (\log \log N})^{2/3}}) time, which is only pseudo-polynomial in \log N, the number of bits needed to represent N.

This function can be generalized by allowing p and q to range over a suitable set of semiprimes. Note that f is not one-way for arbitrary p,q>1, since the product will have 2 as a factor with probability 3/4 (because the probability that an arbitrary p is odd is 1/2, and likewise for q, so if they're chosen independently, the probability that both are odd is therefore 1/4; hence the probability that neither is odd is 1 - 1/4 = 3/4).

The Rabin function (modular squaring)

The Rabin function,[1]:57 or squaring modulo N=pq, where p and q are primes is believed to be a collection of one-way functions. We write

\text{Rabin}_{N}(x)\triangleq x^{2}\mod N

to denote squaring modulo N: a specific member of the Rabin collection. It can be shown that extracting square roots, i.e. inverting the Rabin function, is computationally equivalent to factoring N (in the sense of polynomial-time reduction). Hence it can be proven that the Rabin collection is one-way if and only if factoring is hard. This also holds for the special case in which p and q are of the same bit length. The Rabin cryptosystem is based on the assumption that this Rabin function is one-way.

Discrete exponential and logarithm

The function f takes a prime number p and an integer x between 0 and p−1; and returns the remainder of 2x divided by p. Modular exponentiation can be done in time O(n3) where n is the number of bits in p. Inverting this function requires computing the discrete logarithm modulo p; namely, given a prime p and an integer y between 0 and p−1, find x such that 2x = y. As of 2009, there is no published algorithm for this problem that runs in polynomial time. The ElGamal encryption scheme is based on this function.

Cryptographically secure hash functions

There are a number of cryptographic hash functions that are fast to compute like SHA 256. Some of the simpler versions have fallen to sophisticated analysis, but the strongest versions continue to offer fast, practical solutions for one-way computation. Most of the theoretical support for the functions are more techniques for thwarting some of the previously successful attacks.

Elliptic curves

An elliptic curve is a set of pairs of elements of a field satisfying y2 = x3 + ax + b. For cryptography, finite fields must be used. The elements of the curve form a group under an operation called "point addition" (which is not the same as the addition operation of the field). Multiplication kP of a point P by an integer k is defined as repeated addition of the point to itself. If k and P are known, it is easy to compute R=kP, but if only R and P are known, it is assumed to be hard to compute k.

Other candidates

Other candidates for one-way functions have been based on the hardness of the decoding of random linear codes, the subset sum problem (Naccache-Stern knapsack cryptosystem), or other problems.

Universal one-way function

There is an explicit function f that has been proved to be one-way, if and only if one-way functions exist.[5] In other words, if any function is one-way, then so is f. Since this function was the first combinatorial complete one-way function to be demonstrated, it is known as the "universal one-way function". The problem of determining the existence of one-way functions is thus reduced to the problem of proving that this specific function is one-way.

Goldreich gives one construction of a universal one-way function, which is denoted by funiv here.

funiv (desc(M), x) := (desc(M), M(x)),

where desc(M) is the description of Turing machine M, and x is an input string. M(x) is defined as the output of machine M given x as input if the running time is at most quadratic on the length of x, and otherwise, M(x) := x. This definition of M(x) guarantees funiv can be efficiently computed within polynomial time. Furthermore, funiv turns out to be one-way if there exists a one-way function g, since any efficient algorithm that can invert funiv (desc(Mg), x) with noticeable probability, can give an efficient algorithm that can invert g with noticeable probability. [6] That is, if g is one-way, then funiv (desc(Mg), x) must also be one-way. In fact, the one-wayness of funiv (desc(Mg), x) guarantees that funiv (desc(M), x) must also be one-way. [7]

See also

References

  1. 1.0 1.1 Oded Goldreich (2001). Foundations of Cryptography: Volume 1, Basic Tools, (draft available from author's site). Cambridge University Press. ISBN 0-521-79172-3. (see also wisdom.weizmann.ac.il)
  2. Goldwasser, S. and Bellare, M. "Lecture Notes on Cryptography". Summer course on cryptography, MIT, 1996–2001
  3. Many authors view this definition as strong one-way function. Weak one-way function can be defined similarly except that the probability that every adversarial F fails to invert f is non-negligible. However, one may construct strong one-way functions based on weak ones. Loosely speaking, strong and weak versions of one-way function are equivalent theoretically. See Goldreich's Foundations of Cryptography, vol. 1, ch 2.1-2.3.
  4. Lua error in package.lua at line 80: module 'strict' not found.
  5. Lua error in package.lua at line 80: module 'strict' not found.
  6. Goldreich's FoC vol. 1, ch. 2.4.1.
  7. Goldreich's FoC vol. 1, proposition 2.3.1.

Further reading

  • Jonathan Katz and Yehuda Lindell (2007). Introduction to Modern Cryptography. CRC Press. ISBN 1-58488-551-3.
  • Lua error in package.lua at line 80: module 'strict' not found. Section 10.6.3: One-way functions, pp. 374–376.
  • Lua error in package.lua at line 80: module 'strict' not found. Section 12.1: One-way functions, pp. 279–298.