In
computer science, a one-way function is a
function
Function or functionality may refer to:
Computing
* Function key, a type of key on computer keyboards
* Function model, a structured representation of processes in a system
* Function object or functor or functionoid, a concept of object-oriente ...
that is easy to compute on every input, but hard to
invert given the
image
An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensiona ...
of a random input. Here, "easy" and "hard" are to be understood in the sense of
computational complexity theory
In theoretical computer science and mathematics, computational complexity theory focuses on classifying computational problems according to their resource usage, and relating these classes to each other. A computational problem is a task solved ...
, specifically the theory of
polynomial time problems. Not being
one-to-one is not considered sufficient for a function to be called one-way (see
Theoretical definition
A theoretical definition defines a term in an academic discipline, functioning as a proposal to see a phenomenon in a certain way. A theoretical definition is a proposed way of thinking about potentially related events. Theoretical definitions cont ...
, below).
The existence of such one-way functions is still an open
conjecture
In mathematics, a conjecture is a conclusion or a proposition that is proffered on a tentative basis without proof. Some conjectures, such as the Riemann hypothesis (still a conjecture) or Fermat's Last Theorem (a conjecture until proven in 1 ...
. Their existence would prove that the
complexity classes
In computational complexity theory, a complexity class is a set of computational problems of related resource-based complexity. The two most commonly analyzed resources are time and memory.
In general, a complexity class is defined in terms of ...
P and NP are not equal, thus resolving the foremost unsolved question of theoretical computer science.
[ Oded Goldreich (2001). Foundations of Cryptography: Volume 1, Basic Tools,]
draft available
from author's site). Cambridge University Press. . (see als
The converse is not known to be true, i.e. the existence of a proof that P≠NP would not directly imply the existence of one-way functions.
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
Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adve ...
,
personal identification,
authentication
Authentication (from ''authentikos'', "real, genuine", from αὐθέντης ''authentes'', "author") is the act of proving an assertion, such as the identity of a computer system user. In contrast with identification, the act of indicati ...
, 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'' :
* →
* is one-way if ''f'' can be computed by a polynomial time algorithm, but any polynomial time
randomized algorithm that attempts to compute a pseudo-inverse for ''f'' succeeds with