A trapdoor function is a collection of one-way functions { fk : Dk → Rk } (k ∈ K), in which all of K, 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 a trapdoor permutation.5
In the following two examples, we always assume that it is difficult to factorize a large composite number (see Integer factorization).
In this example, the inverse d {\displaystyle d} of e {\displaystyle e} modulo ϕ ( n ) {\displaystyle \phi (n)} (Euler's totient function of n {\displaystyle n} ) is the trapdoor:
If the factorization of n = p q {\displaystyle n=pq} is known, then ϕ ( n ) = ( p − 1 ) ( q − 1 ) {\displaystyle \phi (n)=(p-1)(q-1)} can be computed. With this the inverse d {\displaystyle d} of e {\displaystyle e} can be computed d = e − 1 mod ϕ ( n ) {\displaystyle d=e^{-1}\mod {\phi (n)}} , and then given y = f ( x ) {\displaystyle y=f(x)} , we can find x = y d mod n = x e d mod n = x mod n {\displaystyle x=y^{d}\mod n=x^{ed}\mod n=x\mod n} . Its hardness follows from the RSA assumption.6
Let n {\displaystyle n} be a large composite number such that n = p q {\displaystyle n=pq} , where p {\displaystyle p} and q {\displaystyle q} are large primes such that p ≡ 3 ( mod 4 ) , q ≡ 3 ( mod 4 ) {\displaystyle p\equiv 3{\pmod {4}},q\equiv 3{\pmod {4}}} , and kept confidential to the adversary. The problem is to compute z {\displaystyle z} given a {\displaystyle a} such that a ≡ z 2 ( mod n ) {\displaystyle a\equiv z^{2}{\pmod {n}}} . The trapdoor is the factorization of n {\displaystyle n} . With the trapdoor, the solutions of z can be given as c x + d y , c x − d y , − c x + d y , − c x − d y {\displaystyle cx+dy,cx-dy,-cx+dy,-cx-dy} , where a ≡ x 2 ( mod p ) , a ≡ y 2 ( mod q ) , c ≡ 1 ( mod p ) , c ≡ 0 ( mod q ) , d ≡ 0 ( mod p ) , d ≡ 1 ( mod q ) {\displaystyle a\equiv x^{2}{\pmod {p}},a\equiv y^{2}{\pmod {q}},c\equiv 1{\pmod {p}},c\equiv 0{\pmod {q}},d\equiv 0{\pmod {p}},d\equiv 1{\pmod {q}}} . See Chinese remainder theorem for more details. Note that given primes p {\displaystyle p} and q {\displaystyle q} , we can find x ≡ a p + 1 4 ( mod p ) {\displaystyle x\equiv a^{\frac {p+1}{4}}{\pmod {p}}} and y ≡ a q + 1 4 ( mod q ) {\displaystyle y\equiv a^{\frac {q+1}{4}}{\pmod {q}}} . Here the conditions p ≡ 3 ( mod 4 ) {\displaystyle p\equiv 3{\pmod {4}}} and q ≡ 3 ( mod 4 ) {\displaystyle q\equiv 3{\pmod {4}}} guarantee that the solutions x {\displaystyle x} and y {\displaystyle y} can be well defined.7
Bellare, M (June 1998). "Many-to-one trapdoor functions and their relation to public-key cryptosystems". Advances in Cryptology — CRYPTO '98. Lecture Notes in Computer Science. Vol. 1462. pp. 283–298. doi:10.1007/bfb0055735. ISBN 978-3-540-64892-5. S2CID 215825522. 978-3-540-64892-5 ↩
Pass's Notes, def. 56.1 ↩
Goldwasser's lecture notes, def. 2.16 ↩
Ostrovsky, pp. 6–10, def. 11 ↩
Pass's notes, def 56.1; Dodis's def 7, lecture 1. ↩
Goldwasser's lecture notes, 2.3.2; Lindell's notes, p. 17, Ex. 1. ↩
Goldwasser's lecture notes, 2.3.4. ↩