This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Trapdoor function" – news ·newspapers ·books ·scholar ·JSTOR(July 2013) (Learn how and when to remove this message) |

Intheoretical computer science andcryptography, atrapdoor function is afunction that is easy to compute in one direction, yet difficult to compute in the opposite direction (finding itsinverse) without special information, called the "trapdoor". Trapdoor functions are a special case ofone-way functions and are widely used inpublic-key cryptography.[2]
In mathematical terms, iff is a trapdoor function, then there exists some secret informationt, such that givenf(x) andt, it is easy to computex. Consider apadlock and its key. It is trivial to change the padlock from open to closed without using the key, by pushing the shackle into the lock mechanism. Opening the padlock easily, however, requires the key to be used. Here the keyt is the trapdoor and the padlock is the trapdoor function.
An example of a simple mathematical trapdoor is "6895601 is the product of two prime numbers. What are those numbers?" A typical "brute-force" solution would be to try dividing 6895601 by many prime numbers until finding the answer. However, if one is told that 1931 is one of the numbers, one can find the answer by entering "6895601 ÷ 1931" into any calculator. This example is not a sturdy trapdoor function – modern computers can guess all of the possible answers within a second – but this sample problem could be improved byusing the product of two much larger primes.
Trapdoor functions came to prominence incryptography in the mid-1970s with the publication ofasymmetric (or public-key) encryption techniques byDiffie,Hellman, andMerkle. Indeed,Diffie & Hellman (1976) coined the term. Several function classes had been proposed, and it soon became obvious that trapdoor functions are harder to find than was initially thought. For example, an early suggestion was to use schemes based on thesubset sum problem. This turned out rather quickly to be unsuitable.
As of 2004[update], the best known trapdoor function (family) candidates are theRSA andRabin families of functions. Both are written as exponentiation modulo a composite number, and both are related to the problem ofprime factorization.
Functions related to the hardness of thediscrete logarithm problem (either modulo a prime or in a group defined over anelliptic curve) arenot known to be trapdoor functions, because there is no known "trapdoor" information about the group that enables the efficient computation of discrete logarithms.
A trapdoor in cryptography has the very specific aforementioned meaning and is not to be confused with abackdoor (these are frequently used interchangeably, which is incorrect). A backdoor is a deliberate mechanism that is added to a cryptographic algorithm (e.g., a key pair generation algorithm, digital signing algorithm, etc.) or operating system, for example, that permits one or more unauthorized parties to bypass or subvert the security of the system in some fashion.
Atrapdoor function is a collection ofone-way functions {fk :Dk →Rk } (k ∈K), in which all ofK,Dk,Rk are subsets of binary strings {0, 1}*, satisfying the following conditions:
If each function in the collection above is a one-way permutation, then the collection is also called atrapdoor permutation.[6]
In the following two examples, we always assume that it is difficult to factorize a large composite number (seeInteger factorization).
In this example, the inverse of modulo (Euler's totient function of) is the trapdoor:
If the factorization of is known, then can be computed. With this the inverse of can be computed, and then given, we can find.Its hardness follows from the RSA assumption.[7]
Let be a large composite number such that, where and are large primes such that, and kept confidential to the adversary. The problem is to compute given such that. The trapdoor is the factorization of. With the trapdoor, the solutions ofz can be given as, where. SeeChinese remainder theorem for more details. Note that given primes and, we can find and. Here the conditions and guarantee that the solutions and can be well defined.[8]