Implementation of the Oblivious Pseudo Random Function (OPRF) protocol defined in RFC 9497.
The introduction of RFC 9497 puts it best:
A Pseudorandom Function (PRF)
F(k, x)is an efficiently computable function taking a private keykand a valuexas input. This function is pseudorandom if the keyed functionK(_) = F(k, _)is indistinguishable from a randomly sampled function acting on the same domain and range asK(). An Oblivious PRF (OPRF) is a two-party protocol between a server and a client, wherein the server holds a PRF keykand the client holds some inputx. The protocol allows both parties to cooperate in computingF(k, x), such that the client learnsF(k, x)without learning anything aboutkand the server does not learn anything aboutxorF(k, x).
The scope of RFC 9497 and this crate covers three types of OPRFs:
- Base OPRF: The basic OPRF protocol, as described above.
- Verifiable OPRF (VOPRF): An extension of the base OPRF protocol where the server also provides a
proof that it used the correct key
kin the computation ofF(k, x), which the client can verify without learningk. - Partial OPRF (POPRF): An extension to VOPRF where a shared input
ybetween the client and server is also used in the computation:F(k, x, y).
- Main crate documentation (100% coverage).
- Benchmarks.
- Examples.