## Extractable Witness Encryption for KZG Commitments --- ## Brief Story ---- ![GB0NzWgb_400x400](https://hackmd.io/_uploads/r1BqmWyg1g.jpg =300x) ## $+$ ![Flag_of_Japan.svg](https://hackmd.io/_uploads/BJGhXbJe1l.png =300x) ---- ![Screenshot 2024-10-17 at 6.39.34 PM](https://hackmd.io/_uploads/HJHINZ1gJl.jpg) ---- ![Screenshot 2024-10-17 at 6.42.52 PM](https://hackmd.io/_uploads/SkWxrb1gJl.png) ---- ![Screenshot 2024-10-17 at 6.43.58 PM](https://hackmd.io/_uploads/BJfBrWyeyg.jpg) --- ## Witness Encryption ---- ### Encryption ![Witness Encryption (5)](https://hackmd.io/_uploads/HJxIszDeye.png) ---- ### Public Key Encryption ![Witness Encryption (6)](https://hackmd.io/_uploads/r1G9iGweJe.png) ---- ## Witness Encryption ![Witness Encryption (7)](https://hackmd.io/_uploads/ryc5ifvxkx.png) ---- ## Witness Encryption ![Witness Encryption (8)](https://hackmd.io/_uploads/rJZiiGDlkg.png) ---- ## NP Problem - If there is a witness, it can be verified by a deterministic algorithm in polynomial time. ---- ## NP Relation $$ \mathcal{R} = \{ (x, w) \mid M_r(x, w) = 1 \} $$ - $x$ -- Statement - $w$ -- Witness - $M_r(x, w)$ -- Check algorithm ---- ### Language $$ \mathcal{L} = \{ x \mid \exists w \text{ such that } (x, w) \in \mathcal{R} \} $$ ---- #### Correctness $$ (x, w) \in \mathcal{R} $$ ![Witness Encryption (1)](https://hackmd.io/_uploads/HJmXW68xkg.png) ---- #### Security $x \notin \mathcal{L}$ ![Witness Encryption (2)](https://hackmd.io/_uploads/BJZZzpUgJg.png) $c_0 \approx_c c_1$ ---- - If no witness exists, then $c$ should reveal nothing about $m$ - Without a valid solution, decryption should not be possible - Hard problems: determining $x \in \mathcal{L}$ is computationally infeasible without a witness. ---- ### Witness Encryption for Specific Relations - Witness Encryption schemes for arbitrary NP relations **exist** but are not efficient. - We will look at Witness Encryptions for KZG commitments. --- #### KZG Polynomial Commitment Scheme ![Screenshot 2024-10-23 at 12.49.40 PM](https://hackmd.io/_uploads/rJl4sqUlye.png) ---- ### WE for KZG ![Witness Encryption (9)](https://hackmd.io/_uploads/rkXwZqvl1g.png) ---- ### Language ![Screenshot 2024-10-23 at 4.59.17 PM](https://hackmd.io/_uploads/HJ12SR8x1l.png) $$ \pi:=\left[\frac{f(\tau)-\beta}{\tau-\alpha}\right]_1 $$ --- ### Key Encapsulation Mechanism ![Witness Encryption (10)](https://hackmd.io/_uploads/ryloL9veyg.png) ---- #### Extractable Witness KEM for KZG $$ \small \begin{aligned} &e\left(\operatorname{com}-[\beta]_1,[1]_2\right) = e\left(\pi,[\tau]_2-[\alpha]_2\right) \end{aligned} $$ $$ \small \textbf{Encap}^{\text{H}}(\text{ck}, (\text{com}, \alpha, \beta)) \begin{cases} r \leftarrow \mathbb{F}_p \\ s := e\left(r \cdot \left(\text{com} - [\beta]_1\right), [1]_2\right) \\ \text{ct} := r \cdot \left([\tau]_2 - [\alpha]_2\right) \\ \text{k} := \text{H}(s) \\ \text{return } (\text{ct}, \text{k}) \end{cases} $$ $$ \small \textbf{Decap}^{\text{H}}(\text{ck}, \pi, \text{ct}) \begin{cases} s := e(\pi, \text{ct}) \\ \text{k} := \text{H}(s) \\ \text{return } \text{k} \end{cases} $$ ---- ### Extractable WE for KZG Commitments $$ \small \operatorname{Enc}((\text{com}, \alpha, \beta), m) \begin{cases} \left(\mathrm{ct}_1, \mathrm{k}\right) \leftarrow \textbf{Encap}^{\text{H}}((\text{com}, \alpha, \beta)) \\ \mathrm{ct}_2 \leftarrow \mathrm{Enc}^{\text{sym}}(\mathrm{k}, m) \\ \text{return } \left(\mathrm{ct}_1, \mathrm{ct}_2\right) \end{cases} $$ $$ \small \operatorname{Dec}\left(\pi, \left(\mathrm{ct}_1, \mathrm{ct}_2\right)\right) \begin{cases} \mathrm{k} := \textbf{Decap}^{\text{H}}\left( \pi, \mathrm{ct}_1\right) \\ m := \operatorname{Dec}^{\text{sym}}\left(\mathrm{k}, \mathrm{ct}_2\right) \\ \text{return } m \end{cases} $$ --- ## Keaki :deciduous_tree: ---- - Rust implementation :crab: - Simple layout: - `kzg` Module - `setup`, `open`, `commit`, `verify`, `open_fk` - `kem` Module - `encapsulate`, `decapsulate` - `we` Module - `encrypt`, `decrypt` - `vec` Module - `we` wrapper to work with vectors ---- ### Vector $$ \mathbf{v} = [v_1, v_2, \dots, v_n] $$ - We can think of each value as the evaluation of a polynomial at the $n$-th root of unity. - This allows us to perform $iFFT$ to convert it into the coefficients representation. ---- ![Screenshot 2024-10-23 at 10.38.45 PM](https://hackmd.io/_uploads/BJqEBXDxkx.png) --- ## Oblivious Transfer - Cryptographic two-party protocol between a **sender** and a **receiver** - Allows the receiving party to decrypt **one** of the sending party’s messages - The sender does not learn the choice of the receiver - The receiver does not learn the non selected inputs ---- ## 1-out-of-2 Oblivious Transfer ![ot](https://hackmd.io/_uploads/B16tjgweke.png) ---- ## Laconic Oblivious Transfer ![Witness Encryption (4)](https://hackmd.io/_uploads/ryt0-ZDg1g.png) ---- ![Screenshot 2024-10-23 at 11.01.00 PM](https://hackmd.io/_uploads/HJy05Xwg1g.png) ---- ![Screenshot 2024-10-23 at 11.01.34 PM](https://hackmd.io/_uploads/SJ11s7Pgkl.png) ---- ![Screenshot 2024-10-23 at 11.10.46 PM](https://hackmd.io/_uploads/H1k637Pxye.png) --- :pray:
{"title":"Extractable Witness Encryption for KZG Commitments","description":"–","contributors":"[{\"id\":\"d13d5baa-53e5-4eb9-bfdc-6c8437c7cfbd\",\"add\":7271,\"del\":1896}]"}
    284 views