Chang Gung University
September 28, 2024
Hardware isolation for secure execution
Ex: Intel SGX, ARM TrustZone
Low latency but limited scalability
Computation on encrypted data
Strong privacy but very high overhead
$$\tilde T\text{ is such that }\forall m,d.\,\text{Dec}_{sk}\left(\tilde T_m\big(\text{Enc}_{pk}(d)\big)\right)=T_m(d)$$
Data Owner
$$\begin{aligned}c_1 & \leftarrow \text{Enc}_{pk}(\color{blue}d\color{black}) \\ r & \leftarrow\text{Dec}_{\color{blue}sk\color{black}}(c_2)\end{aligned}$$
$$\xrightarrow{\hspace*{2em}c_1\hspace*{2em}}$$
$$\xleftarrow{\hspace*{2em}c_2\hspace*{2em}}$$
Model Owner
$$\begin{aligned}c_2\leftarrow\tilde T_{\color{red}m\color{black}}(c_1)\end{aligned}$$
Source: https://ieeexplore.ieee.org/document/9936637
Joint computation while keeping inputs private
Ex: Garbled Circuit
High computational+communication overhead
Data Owner
$$\color{blue}d\color{black}$$
$$\downarrow$$
$$T_{\color{red}m\color{black}}(\color{blue}d\color{black})$$
Model Owner $$\color{red}m\color{black}$$
$$\xrightarrow{\hspace*{2em}c_1\hspace*{2em}}$$
$$\xleftarrow{\hspace*{2em}c_2\hspace*{2em}}$$
$$\xrightarrow{\hspace*{2em}c_3\hspace*{2em}}$$
$$\xleftarrow{\hspace*{2em}c_4\hspace*{2em}}$$
$$\hspace*{2.5em}\vdots\hspace*{2.5em}$$
$$\xrightarrow{\hspace*{1em}\begin{array}{|c|}\hline \text{Garbled Table} \\\hline\hline \text{Enc}_{\color{blue}X_0^a,X_0^b\color{black}}(\color{blue}X_{f(0,0)}^c\color{black}) \\\hline \text{Enc}_{\color{blue}X_0^a,X_1^b\color{black}}(\color{blue}X_{f(0,1)}^c\color{black}) \\\hline \text{Enc}_{\color{blue}X_1^a,X_0^b\color{black}}(\color{blue}X_{f(1,0)}^c\color{black}) \\\hline \text{Enc}_{\color{blue}X_1^a,X_1^b\color{black}}(\color{blue}X_{f(1,1)}^c\color{black}) \\\hline\end{array}\hspace*{1em}}$$
$$\xrightarrow{\hspace*{4.5em}X_1^a\hspace*{4.5em}}$$
$$\xrightarrow{\hspace*{3em}\text{OT}\left(\color{blue}X_0^b\color{black},\color{blue}X_1^b\color{black}\right)\hspace*{3em}}$$
$$\xleftarrow{\hspace*{4em}X_{f(1,0)}^c\hspace*{4em}}$$
$$\xrightarrow{\hspace*{2.5em}f(1,0)\text{ (optional)}\hspace*{2.5em}}$$
Data Owner
$$\color{blue}a=1\color{black}$$
Model Owner $$\color{red}b=0\color{black}$$
$$\text{Dec}_{X_1^a,\color{red}X_0^b\color{black}}(?)$$
$$\text{head}_j=\text{softmax}\left(\frac{\sum_{\ell=jm}^{(j+1)m}Q_\ell K_\ell^T}{\sqrt{md}}\right)\left(V_{jm}||\ldots||V_{(j+1)m}\right)\in\mathbb R^{b\times md}$$
(How to play rock-paper-scissors over internet)
Text
Text
$$\text{Attention}(\mathbf Q,\mathbf K,\mathbf V):=\text{Softmax}\left(\frac{\mathbf{QK}^T}{\sqrt d}\right)\mathbf V$$