Trapdoor functions

A trapdoor function is one that is trivial to compute in one direction but extremely difficult to compute in another (the reverse). In mathematical notation, take the trapdoor function f(x)=u, it is easy to compute the value u given x, but very difficult to compute x given u. Trapdoor functions are heavily used in cryptography.

= Examples = A simple example of a trapdoor function is deriving two primes that produce a larger integer, known as the semiprime factorization problem.

f(p1,p2)=p1p2=u

If the resultant value, u, is suitably large, it is exceedingly difficult to derive the prime products - the naive algorithm is to divide u by increasing primes until the result is found, a long process! However, if one of the prime products is known, it becomes trivial to derive the other.

f'(p1,u)=up1=p2o