September 2, 2026 · Markdown notes
Oblivious Transfer
Oblivious Transfer
Definitions
全文 \(\kappa\) 为安全参数,消息长度为 \(\kappa\)。Sender 记 \(S\),receiver 记 \(R\)。
Definition (1-out-of-2 OT). \(S\) 输入 \((m_0,m_1)\in\{0,1\}^\kappa\times\{0,1\}^\kappa\),\(R\) 输入 choice bit \(b\in\{0,1\}\):
\[
\mathsf{OT}\big((m_0,m_1);\,b\big)\longrightarrow(\bot;\,m_b).
\]
- Sender security:\(R\) 学不到 \(m_{1-b}\)。
- Receiver security:\(S\) 学不到 \(b\)。
Definition (Correlated OT). \(S\) 输入 \(\Delta\in\{0,1\}^\kappa\),\(R\) 无输入。对 \(i\in[m]\),functionality 采样 \(q_i\xleftarrow{\$}\{0,1\}^\kappa\)、\(r_i\xleftarrow{\$}\{0,1\}\):
\[
\mathsf{COT}(\Delta;\,\bot)\longrightarrow\big((q_i)_{i\in[m]};\ (r_i,\,t_i)_{i\in[m]}\big),\qquad t_i=q_i\oplus r_i\Delta .
\]
- Sender security:\(R\) 学不到 \(\Delta\)。
- Receiver security:\(S\) 学不到 \(r_i\)。
Definition (Random OT). 双方无输入。functionality 采样 \((a_0,a_1)\xleftarrow{\$}\{0,1\}^\kappa\times\{0,1\}^\kappa\)、\(r\xleftarrow{\$}\{0,1\}\):
\[
\mathsf{ROT}(\bot;\,\bot)\longrightarrow\big((a_0,a_1);\ (r,\,a_r)\big).
\]
- Sender security:\(R\) 学不到 \(a_{1-r}\)。
- Receiver security:\(S\) 学不到 \(r\)。
Equivalence
三者可以互相构造:\(\mathsf{OT}\Rightarrow\mathsf{COT}\Rightarrow\mathsf{ROT}\Rightarrow\mathsf{OT}\)。
OT \(\Rightarrow\) COT. 对每个 \(i\),\(S\) 采样 \(q_i\),\(R\) 采样 \(r_i\),调用
\[
\mathsf{OT}\big((q_i,\,q_i\oplus\Delta);\,r_i\big)\longrightarrow\big(\bot;\,q_i\oplus r_i\Delta\big).
\]
COT \(\Rightarrow\) ROT. \(H:[m]\times\{0,1\}^\kappa\to\{0,1\}^\kappa\) 为 random oracle。第 \(i\) 个 random OT 取
\[
(a_0,a_1)=\big(H(i,q_i),\,H(i,q_i\oplus\Delta)\big),\qquad a_{r_i}=H(i,t_i).
\]
\(R\) 不知道 \(\Delta\),算不出 \(H(i,t_i\oplus\Delta)\);\(H\) 打断 \(m\) 个实例共用 \(\Delta\) 的关联。
ROT \(\Rightarrow\) OT(derandomization). \(S\) 输入 \((m_0,m_1)\),\(R\) 输入 \(b\):
\[
\begin{align*}
&\text{Sender}&&&\text{Receiver}\\
&(a_0,a_1)
&\xleftarrow{\ \ \mathsf{ROT}(\bot;\,\bot)\ \ }&\;&(r,\,a_r)\\
&&\xleftarrow{d}&\;&d\leftarrow b\oplus r\\
&c_0\leftarrow m_0\oplus a_d,\quad c_1\leftarrow m_1\oplus a_{1\oplus d}
&\xrightarrow{c_0,\,c_1}&\;&m_b\leftarrow c_b\oplus a_r
\end{align*}
\]
Correctness:\(c_b\) 的 pad 下标为 \(b\oplus d=r\)。
Security:\(d\) 被均匀的 \(r\) 遮住,\(S\) 学不到 \(b\);\(R\) 没有 \(a_{1\oplus r}\),打不开 \(c_{1\oplus b}\)。
Base OT: Chou–Orlandi
Motivation. OT 蕴含 key agreement,而 key agreement 不能 black-box 地从 one-way function 构造(Impagliazzo–Rudich),所以 OT 至少需要一次公钥运算。Chou–Orlandi 用 Diffie–Hellman 实现 1-out-of-2 OT。
Objects. \(\mathbb G\) 为素数阶 \(p\) 的循环群,生成元 \(g\),CDH 假设成立。\(H:\mathbb G\to\{0,1\}^\kappa\) 为 random oracle。\(S\) 持有 \((m_0,m_1)\),\(R\) 持有 \(b\)。
Protocol.
\[
\begin{align*}
&\text{Sender}&&&\text{Receiver}\\
&\alpha\xleftarrow{\$}\mathbb Z_p,\quad A\leftarrow g^{\alpha}
&\xrightarrow{A}&\;&\\
&&\xleftarrow{B}&\;&\beta\xleftarrow{\$}\mathbb Z_p,\quad B\leftarrow g^{\beta}A^{b}\\
&k_0\leftarrow H(B^{\alpha}),\quad k_1\leftarrow H\big((B/A)^{\alpha}\big)
&&&k\leftarrow H(A^{\beta})\\
&c_0\leftarrow m_0\oplus k_0,\quad c_1\leftarrow m_1\oplus k_1
&\xrightarrow{c_0,\,c_1}&\;&m_b\leftarrow c_b\oplus k
\end{align*}
\]
Claim. \(R\) 输出 \(m_b\)。
Correctness. \((B/A^{b})^{\alpha}=g^{\alpha\beta}=A^{\beta}\),故 \(k_b=k\)。
Security. \(B=g^{\beta}A^{b}\) 对 \(b=0,1\) 都在 \(\mathbb G\) 上均匀,\(S\) 学不到 \(b\)。\(R\) 要得到 \(k_{1-b}\) 需算
\[
(B/A^{1-b})^{\alpha}=A^{\beta}\cdot g^{\pm\alpha^2},
\]
而由 \(A=g^{\alpha}\) 求 \(g^{\alpha^2}\) 等价于 CDH。
对 malicious \(R\),simulator 只能从 \(R\) 对 \(H\) 的查询中读出 \(b\)。\(R\) 可以把查询推迟到收到 \(c_0,c_1\) 之后,而 simulator 在发出 \(c_0,c_1\) 之前就必须向 functionality 提交 \(b\),因此 CO 不能直接作为 UC 安全的 OT。
TODO
Definitions
Throughout, \(\kappa\) is the security parameter and messages have length \(\kappa\). The sender is denoted \(S\), the receiver \(R\).
Definition (1-out-of-2 OT). \(S\) inputs \((m_0,m_1)\in\{0,1\}^\kappa\times\{0,1\}^\kappa\), \(R\) inputs a choice bit \(b\in\{0,1\}\):
\[
\mathsf{OT}\big((m_0,m_1);\,b\big)\longrightarrow(\bot;\,m_b).
\]
- Sender security: \(R\) learns nothing about \(m_{1-b}\).
- Receiver security: \(S\) learns nothing about \(b\).
Definition (Correlated OT). \(S\) inputs \(\Delta\in\{0,1\}^\kappa\); \(R\) has no input. For \(i\in[m]\), the functionality samples \(q_i\xleftarrow{\$}\{0,1\}^\kappa\) and \(r_i\xleftarrow{\$}\{0,1\}\):
\[
\mathsf{COT}(\Delta;\,\bot)\longrightarrow\big((q_i)_{i\in[m]};\ (r_i,\,t_i)_{i\in[m]}\big),\qquad t_i=q_i\oplus r_i\Delta .
\]
- Sender security: \(R\) learns nothing about \(\Delta\).
- Receiver security: \(S\) learns nothing about \(r_i\).
Definition (Random OT). Neither party has input. The functionality samples \((a_0,a_1)\xleftarrow{\$}\{0,1\}^\kappa\times\{0,1\}^\kappa\) and \(r\xleftarrow{\$}\{0,1\}\):
\[
\mathsf{ROT}(\bot;\,\bot)\longrightarrow\big((a_0,a_1);\ (r,\,a_r)\big).
\]
- Sender security: \(R\) learns nothing about \(a_{1-r}\).
- Receiver security: \(S\) learns nothing about \(r\).
Equivalence
Each of the three can be built from another: \(\mathsf{OT}\Rightarrow\mathsf{COT}\Rightarrow\mathsf{ROT}\Rightarrow\mathsf{OT}\).
OT \(\Rightarrow\) COT. For each \(i\), \(S\) samples \(q_i\), \(R\) samples \(r_i\), and they call
\[
\mathsf{OT}\big((q_i,\,q_i\oplus\Delta);\,r_i\big)\longrightarrow\big(\bot;\,q_i\oplus r_i\Delta\big).
\]
COT \(\Rightarrow\) ROT. Let \(H:[m]\times\{0,1\}^\kappa\to\{0,1\}^\kappa\) be a random oracle. The \(i\)-th random OT is
\[
(a_0,a_1)=\big(H(i,q_i),\,H(i,q_i\oplus\Delta)\big),\qquad a_{r_i}=H(i,t_i).
\]
\(R\) does not know \(\Delta\), so it cannot compute \(H(i,t_i\oplus\Delta)\); \(H\) breaks the correlation from the \(m\) instances sharing \(\Delta\).
ROT \(\Rightarrow\) OT (derandomization). \(S\) inputs \((m_0,m_1)\), \(R\) inputs \(b\):
\[
\begin{align*}
&\text{Sender}&&&\text{Receiver}\\
&(a_0,a_1)
&\xleftarrow{\ \ \mathsf{ROT}(\bot;\,\bot)\ \ }&\;&(r,\,a_r)\\
&&\xleftarrow{d}&\;&d\leftarrow b\oplus r\\
&c_0\leftarrow m_0\oplus a_d,\quad c_1\leftarrow m_1\oplus a_{1\oplus d}
&\xrightarrow{c_0,\,c_1}&\;&m_b\leftarrow c_b\oplus a_r
\end{align*}
\]
Correctness: the pad index of \(c_b\) is \(b\oplus d=r\).
Security: \(d\) is masked by the uniform \(r\), so \(S\) learns nothing about \(b\); \(R\) lacks \(a_{1\oplus r}\) and cannot open \(c_{1\oplus b}\).
Base OT: Chou–Orlandi
Motivation. OT implies key agreement, and key agreement cannot be built black-box from one-way functions (Impagliazzo–Rudich), so OT needs at least one public-key operation. Chou–Orlandi realizes 1-out-of-2 OT with Diffie–Hellman.
Objects. \(\mathbb G\) is a cyclic group of prime order \(p\) with generator \(g\), in which CDH holds. \(H:\mathbb G\to\{0,1\}^\kappa\) is a random oracle. \(S\) holds \((m_0,m_1)\), \(R\) holds \(b\).
Protocol.
\[
\begin{align*}
&\text{Sender}&&&\text{Receiver}\\
&\alpha\xleftarrow{\$}\mathbb Z_p,\quad A\leftarrow g^{\alpha}
&\xrightarrow{A}&\;&\\
&&\xleftarrow{B}&\;&\beta\xleftarrow{\$}\mathbb Z_p,\quad B\leftarrow g^{\beta}A^{b}\\
&k_0\leftarrow H(B^{\alpha}),\quad k_1\leftarrow H\big((B/A)^{\alpha}\big)
&&&k\leftarrow H(A^{\beta})\\
&c_0\leftarrow m_0\oplus k_0,\quad c_1\leftarrow m_1\oplus k_1
&\xrightarrow{c_0,\,c_1}&\;&m_b\leftarrow c_b\oplus k
\end{align*}
\]
Claim. \(R\) outputs \(m_b\).
Correctness. \((B/A^{b})^{\alpha}=g^{\alpha\beta}=A^{\beta}\), hence \(k_b=k\).
Security. \(B=g^{\beta}A^{b}\) is uniform in \(\mathbb G\) for both \(b=0,1\), so \(S\) learns nothing about \(b\). To obtain \(k_{1-b}\), \(R\) must compute
\[
(B/A^{1-b})^{\alpha}=A^{\beta}\cdot g^{\pm\alpha^2},
\]
and computing \(g^{\alpha^2}\) from \(A=g^{\alpha}\) is equivalent to CDH.
For a malicious \(R\), the simulator can only read \(b\) from \(R\)'s queries to \(H\). \(R\) can delay its queries until after receiving \(c_0,c_1\), while the simulator must submit \(b\) to the functionality before sending \(c_0,c_1\); hence CO cannot be used directly as a UC-secure OT.
TODO