A PRF is an efficient (i.e. computable in polynomial time), deterministic function that maps two distinct sets (domain and range) and looks like a truly random function.
Essentially, a truly random function would just be composed of a lookup table filled with uniformly distributed random entries. However, in practice, a PRF is given an input string in the domain and a hidden random seed and runs multiple times with the same input string and seed, always returning the same value. Nonetheless, given an arbitrary input string, the output looks random if the seed is taken from a uniform distribution.
A PRF is considered to be good if its behavior is indistinguishable from a truly random function. Therefore, given an output from either the truly random function or a PRF, there should be no efficient method to correctly determine whether the output was produced by the truly random function or the PRF.
Pseudorandom functions take inputs x ∈ { 0 , 1 } ∗ {\displaystyle x\in \{0,1\}^{*}} , where ∗ {\displaystyle {}^{*}} is the Kleene star. Both the input size I = | x | {\displaystyle I=|x|} and output size λ {\displaystyle \lambda } depend only on the index size n := | s | {\displaystyle n:=|s|} .
A family of functions,
f s : { 0 , 1 } I ( n ) → { 0 , 1 } λ ( n ) {\displaystyle f_{s}:\left\{0,1\right\}^{I(n)}\rightarrow \left\{0,1\right\}^{\lambda (n)}}
is pseudorandom if the following conditions are satisfied:
In an oblivious pseudorandom function, abbreviated OPRF, information is concealed from two parties that are involved in a PRF.4 That is, if Alice cryptographically hashes her secret value, cryptographically blinds the hash to produce the message she sends to Bob, and Bob mixes in his secret value and gives the result back to Alice, who unblinds it to get the final output, Bob is not able to see either Alice's secret value or the final output, and Alice is not able to see Bob's secret input, but Alice sees the final output which is a PRF of the two inputs -- a PRF of Alice's secret and Bob's secret.5 This enables transactions of sensitive cryptographic information to be secure even between untrusted parties.
An OPRF is used in some implementations of password-authenticated key agreement.6
An OPRF is used in the Password Monitor functionality in Microsoft Edge.7
PRFs can be used for:8
Goldreich, Oded; Goldwasser, Shafi; Micali, Silvio (October 1986). "How to Construct Random Functions" (PDF). Journal of the ACM. 33 (4): 792–807. doi:10.1145/6490.6503. web page and preprint /wiki/Oded_Goldreich ↩
Lindell, Yehuda; Katz, Jonathan (2008). Introduction to Modern Cryptography. Chapman & Hall/CRC. p. 88. ISBN 978-1-58488-551-1. 978-1-58488-551-1 ↩
Goldreich's FoC, vol. 1, def. 3.6.4. Pass's notes, def. 96.2 ↩
M. Bellare; S. Keelveedhi; T. Ristenpart (August 2013). Dupless: server-aided encryption for deduplicated storage (PDF). Proceedings of the 22nd USENIX Security Symposium. Washington, DC, USA: USENIX Association. pp. 1–16. /wiki/Mihir_Bellare ↩
Matthew Green. "Let’s talk about PAKE". 2018. https://blog.cryptographyengineering.com/2018/10/19/lets-talk-about-pake/ ↩
Lauter, Kristin; Kannepalli, Sreekanth; Laine, Kim; Cruz Moreno, Radames (January 1, 2021). "Password Monitor: Safeguarding passwords in Microsoft Edge". Microsoft Research Blog. Retrieved January 1, 2021. https://www.microsoft.com/en-us/research/blog/password-monitor-safeguarding-passwords-in-microsoft-edge/ ↩
Goldreich, O.; Goldwasser, S.; Micali, S. (1985). "On the Cryptographic Applications of Random Functions (Extended Abstract)". Advances in Cryptology. Lecture Notes in Computer Science. Vol. 196. p. 276. doi:10.1007/3-540-39568-7_22. ISBN 978-3-540-15658-1. 978-3-540-15658-1 ↩