Oblivious Transfer
Oblivious Transfer is a cryptographic technique in which a sender and a receiver engage in a series of messages between one another such that a sender has messages which a receiver can request, the receiver makes a choice, and prepares a response which the sender consumes and applies to the messages being sent but is unaware of the choice made by the receiver, then responds with the choice-applied message data such that upon receipt by the receiver, they are able to consume the intended message, but gain no awareness of the contents of the other messages.
We begin by explaining some base concepts of oblivious transfer protocols such that it becomes easier to follow along in the broader construction.
Simplest OT
In "The Simplest Protocol for Oblivious Transfer", Chou and Orlandi defined a new approach to oblivious transfer in which the construction relied only on the same assumptions as Diffie-Hellman. The approach is summarized below:
- Given a sender has two messages,
m0, m1
, and a receiver has a choice bitc
, both parties sample a random private scalarx ← 𝔽p
The sender’s private scalar will be denoted asa
, the receiver’s private scalar will be denoted asb
. - The sender calculates the point
A = a · G
, and sends this to the receiver. - If the receiver’s choice bit is
0
, the receiver replies withB = b · G
. If1
, the receiver replies withB = A + (b · G)
. - The sender calculates two keys,
k0 = H(a · B)
, andk1 = H(a · (B − A))
, then encryptsm0
withk0
,m1
withk1
, and sends both encrypted messages to the receiver. - The receiver calculates
kc = H(b · A)
, and then uses this value to decrypt their chosen message.
Because neither party has the other party’s private scalar, provided the discrete logarithm assumption holds, it is impossible for the receiver to calculate the other message’s key, and impossible for the sender to calculate the receiver’s choice.
Simplest OT is capable of only delivering a singular choice of two messages, and has to be re-evaluated from scratch for each subsequent bit of information learned. Because of this, it is a poor system to directly construct oblivious protocols, however it is exceptionally useful to build on top of as a base OT seed for extension.
Correlated OT
Correlated oblivious transfer is a variant of oblivious transfer where instead of sending a singular choice, the choices themselves are implicitly correlated. The traditional extension approach involves a Random OT base, where the initial choice is random, and then pseudo-random extensions of the random seeds enable larger correlated constructions with many bits being able to be transferred based on the correlation without the cost of doing a singular OT for every bit. This is utilized in many MPC protocols, and further extended in subsequent papers such as "Actively Secure OT Extension with Optimal Overhead". At the lower level, correlated OT looks like the following:
- The receiver obtains a
∆ ∈ 𝔽2κ
from the sender. - For every extension:
- Sample
v ← 𝔽ℓ2κ
. If the sender is corrupted, instead receivev ← 𝔽ℓ2κ
from the adversary. - Sample
u ← 𝔽ℓ2
and computew := v + u · ∆ ∈ 𝔽ℓ2κ
. If the receiver is corrupted, instead receiveu ← 𝔽ℓ2
andw ← 𝔽ℓ2κ
from the adversary, and recomputew := v + u · ∆ ∈ 𝔽ℓ2κ
.
Correlated OT Extension over LPN
In "Ferret: Fast Extension for Correlated OT with Small Communication", the authors contributed improvements to this protocol have sufficiently made COT feasible for general computability at speed. In short, the speed improvements are nearly over 200 times faster per correlation. For brevity, we list only the functions relevant to Quilibrium’s instantiation of Ferret, from the article:
- Given a family of efficiently-computable functions
Φ = {Φn,t}n,t ∈ ℕ
such that for anyn,t ∈ ℕ
witht ≤ n, Φn,t
takes as an input a sorted subset of[n]
of sizet
and outputs another subset of[m]
with the same size for some integert ≤ m ≤ n.
- The receiver obtains a
∆ ∈ 𝔽2κ
from the sender. - For extension, the receiver and sender agree to
n, t
, and the receiver sendsQ = {a0, ..., at−1}
whereQ ⊆ [n]
is a sorted set: - Sample
v ← 𝔽n2κ
. If the sender is corrupted, instead receivev ← 𝔽n2κ
from the adversary. - Define an
n
-sized bit vectoru := 𝕴(n, Q)
, and computew := v + u · ∆ ∈ 𝔽n2κ
. If the receiver is corrupted, instead receiveu ← 𝔽n2
andw ← 𝔽n2κ
from the adversary, and recomputew := v + u · ∆ ∈ 𝔽n2κ
. - Compute the set
T = {β0, ..., βt−1} := Φn,t({α0, ..., αt−1})
. - Wait for the adversary to input
m
setsI0, ..., Im−1 ⊆ [n] ∪ {−1}
. - Check that
αi ∈ Iβi
for alli ∈ [t]
and−1 ∈ Ij
for allj ∈ [m] \ T
. If the check fails, the process aborts.
- Given a family of efficiently-computable functions
Φ = {Φn,t}n,t ∈ ℕ
such that for anyn,t ∈ ℕ
witht ≤ n, Φn,t
takes as an input a sorted subset of[n]
of sizet
and outputs another subset of[m]
with the same size for some integert ≤ m ≤ n.
- The receiver obtains a
∆ ∈ 𝔽2κ
from the sender. - To COT Extend: Call Correlated OT, receive
ℓ
random COT correlations. - To MPCOT Extend: Call MPCOT, receive a multi-point COT of length
n
.
- Given LPN parameters
(n, k, t)
and code generatorC
such thatC(k, n, 𝔽)
outputs a matrixA ∈ 𝔽k×n2
. - Both parties initialize once, sender samples a uniform
∆ ∈ 𝔽2κ
and both parties invoke the Deal initialization step. - Both parties invoke the COT extend functionality of Deal, returning
v ← 𝔽k2κ
to sender,(u, w) ∈ 𝔽k2 × 𝔽k2κ
to the receiver such thatw := v + u · ∆
. - To Extend:
- The receiver samples
A ← C(k, n, 𝔽2)
ande ← HWt
, then sendsA
to the sender. LetQ = {a0, ..., at−1} ⊆ [n]
be the sorted indices of non-zero entries ine
. - The sender and receiver invokes the Deal MPCOT functionality, returning
s ∈ 𝔽n2κ
to the sender andr ∈ 𝔽n2κ
to the receiver, wherer + s = e · ∆
. If either party aborts, this protocol aborts. - The sender computes
y := v · A + s ∈ 𝔽n2κ
and the receiver computesx := u · A + e ∈ 𝔽n2
andz := w · A + r ∈ 𝔽n2κ
. - The sender updates vector
v := y[0 : k] ∈ 𝔽k2κ
, and outputs a vectory′ := y[k : n] ∈ 𝔽l2κ
. The receiver updates vectors(u, w) := (x[0 : k], z[0 : k]) ∈ 𝔽k2 × 𝔽k2κ
and outputs two vectors(x′, z′) := (x[k : n], z[k : n]) ∈ 𝔽l2 × 𝔽l2κ
.