You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/threshold-encryption/1-threshold-encryption.md
+40-36Lines changed: 40 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,9 +210,10 @@ Below we describe the encryption-time validation in detail.
210
210
1. Recompute the hash-to-curve point:
211
211
`H' = H(U, V) ∈ G1`.
212
212
2. Check the pairing equation:
213
-
$$
213
+
214
+
```math
214
215
e(W, P) \stackrel{?}{=} e(H', U)
215
-
$$
216
+
```
216
217
217
218
**Why it works (bilinear proof).**
218
219
Assuming honest formation with the *same* scalar `r`:
@@ -246,41 +247,43 @@ Given a ciphertext `{U, V, W}` and a purported decryption share $D_i$ from node
246
247
**Setup.**
247
248
248
249
During encryption:
249
-
$$
250
+
```math
250
251
U = rP \in G_2,\qquad
251
252
W = r\,H(U,V) \in G_1,
252
-
$$
253
+
```
253
254
where $H(U,V)\in G_1$ is a hash-to-curve of `(U,V)`.
255
+
254
256
For node $i$:
255
-
$$
257
+
```math
256
258
Y_i = s_i P \in G_2,\qquad
257
259
D_i = s_i U = s_i (rP) = (r s_i) P \in G_2.
258
-
$$
260
+
```
261
+
259
262
Let $e: G_1 \times G_2 \to G_T$ be a bilinear pairing.
260
263
261
264
262
265
**Validation equations.**
263
266
264
267
1)**Ciphertext integrity (same $r$ across `U` and `W`).**
265
-
$$
268
+
```math
266
269
e(W, P)\;\stackrel{?}{=}\;e(H(U,V), U).
267
-
$$
270
+
```
268
271
If true, then $W = r H(U,V)$ and $U = rP$ share the same randomness $r$. (Smae as we did in 3.1)
269
272
270
273
2)**Per-share correctness (same $s_i$, same $r$).**
271
-
$$
274
+
```math
272
275
e(W, Y_i)\;\stackrel{?}{=}\;e(H(U,V), D_i).
273
-
$$
276
+
```
274
277
275
278
**Why it works.**
276
279
277
280
- For 1), we have already seen why it works from 3.1.
278
281
279
282
- For 2), for a valid share with $Y_i=s_iP$ and $D_i=s_iU=s_i(rP)$:
280
-
$$
283
+
```math
281
284
e(W,Y_i)=e(rH, s_iP)=e(H,P)^{r s_i},\qquad
282
285
e(H,D_i)=e(H, s_i r P)=e(H,P)^{r s_i},
283
-
$$
286
+
```
284
287
so the second equality holds **iff** $D_i$ was computed from the *same* $r$ (via $U$) and the *correct* secret share $s_i$ (via $Y_i$).
285
288
286
289
@@ -296,9 +299,9 @@ Verify that the decrypted message is mathematically consistent with the cipherte
296
299
297
300
During encryption:
298
301
299
-
$$
302
+
```math
300
303
U = rP, \quad V = G(rY) \oplus m
301
-
$$
304
+
```
302
305
303
306
where
304
307
- $r \in \mathbb{F}_r$ is a random scalar,
@@ -312,42 +315,42 @@ After decryption, the payload reveals a candidate scalar $r'$, which should equa
312
315
313
316
Compute:
314
317
315
-
$$
318
+
```math
316
319
Y' = r'Y
317
-
$$
320
+
```
318
321
319
322
Derive:
320
323
321
-
$$
324
+
```math
322
325
m' = V \oplus G(Y')
323
-
$$
326
+
```
324
327
325
328
and verify:
326
329
327
-
$$
330
+
```math
328
331
m' = m
329
-
$$
332
+
```
330
333
331
334
**Why it works.**
332
335
333
336
If the combined decryption shares are correct, then $r' = r$.
334
337
Hence:
335
338
336
-
$$
339
+
```math
337
340
Y' = r'Y = rY
338
-
$$
341
+
```
339
342
340
343
and
341
344
342
-
$$
345
+
```math
343
346
G(Y') = G(rY)
344
-
$$
347
+
```
345
348
346
349
Substituting into the expression for $m'$ gives:
347
350
348
-
$$
351
+
```math
349
352
m' = V \oplus G(rY) = (G(rY) \oplus m) \oplus G(rY) = m
350
-
$$
353
+
```
351
354
352
355
The equality holds **if and only if** $r'$ matches the original randomness $r$ and the ciphertext `{U, V}` was not tampered with. Any alteration in $r'$, $V$, or $Y$ breaks the equality, making the decryption invalid.
353
356
@@ -360,9 +363,10 @@ Verify that the AES key recovered from the decrypted payload is consistent with
360
363
**Setup.**
361
364
362
365
During encryption:
363
-
$$
366
+
```math
364
367
U = rP,\qquad V = G(rY)\oplus m,
365
-
$$
368
+
```
369
+
366
370
where $r\in\mathbb{F}_r$ is random, $Y=sP$ is the public key, $G: G_2\to\{0,1\}^{32}$ is a KDF/hash-to-key, and $m$ is the AES-256 key.
367
371
368
372
After decryption of the outer AES-GCM payload, we obtain a candidate scalar $r'$ (encoded in the plaintext). The ciphertext component $V$ is available from `{U,V,W}`.
@@ -371,25 +375,25 @@ After decryption of the outer AES-GCM payload, we obtain a candidate scalar $r'$
371
375
**Validation Equation.**
372
376
373
377
Compute:
374
-
$$
378
+
```math
375
379
Y' = r'Y,\qquad K' = G(Y'),\qquad m' = V \oplus K'.
376
-
$$
380
+
```
377
381
Accept iff:
378
-
$$
382
+
```math
379
383
m' = m.
380
-
$$
384
+
```
381
385
382
386
383
387
**Why it works.**
384
388
385
389
If the decrypted payload is correct and the combine of shares was honest, then $r'=r$. Hence:
386
-
$$
390
+
```math
387
391
Y' = r'Y = rY,\qquad K' = G(Y') = G(rY).
388
-
$$
392
+
```
389
393
Substitute into $m'$:
390
-
$$
394
+
```math
391
395
m' = V \oplus G(rY) = (G(rY)\oplus m)\oplus G(rY) = m.
392
-
$$
396
+
```
393
397
Therefore the equality holds **iff** $r'$ matches the original randomness and $V$ was not altered.
0 commit comments