-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: lovesh <[email protected]>
- Loading branch information
Showing
20 changed files
with
1,356 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Publicly verifiable secret sharing protocols | ||
|
||
These allow a dealer to share commitments to the secret shares (`commitment_key * secret_share`) with a group such that a threshold number of group | ||
members can get commitment to the secret. This sharing can happen on a public bulletin board as the dealer's | ||
shares are encrypted for the corresponding party and anyone can verify that the shares are created correctly because the dealer | ||
also outputs a proof. This primitive is useful for sharing secrets on a blockchain as the blockchain can verify the proof. | ||
|
||
Based on Fig. 7 of the paper [A Unified Framework for Verifiable Secret Sharing](https://eprint.iacr.org/2023/1669). | ||
Implements the protocol in the paper and a variation. | ||
|
||
The dealer in the protocol in Fig 7. wants to share commitments to the shares of secrets of `k` - (`k_1`, `k_2`, ..., `k_n`) as (`g * k_1`, `g * k_2`, ..., `g * k_n`) | ||
to `n` parties with secret and public keys (`s_i`, `h_i = g * s_i`) such that any `t` parties can reconstruct commitment to the secret `g * k`. | ||
Notice the base `g` is the same in the public keys, the share commitments and the reconstructed commitment to the secret. This is implemented in [same_base](./same_base.rs) | ||
|
||
Let's say the dealer wants to share `j * k` where base `j` is also a group generator and discrete log of `j` wrt. `g` is not known | ||
such that party `i` gets `j * k_i` | ||
The dealer follows a similar protocol as above and broadcasts `y'_i = j * k_i . g * k_i = (j + g) * k_i` in addition | ||
to `y_i = h_i * k_i` and a proof that `k_i` is the same in both `y'_i` and `y_i`. Then each party can | ||
compute `g * k_i` as described in the paper and compute `j * k_i = y'_i - g * k_i`. Essentially, `y'_i` is | ||
an Elgamal ciphertext, `g * k_i` is the ephemeral secret key (between the dealer and party `i`) and | ||
`j * k_i` is the message. This is implemented in [different_base](./different_base.rs). Note that both `j` and `g` must be in the same group. | ||
|
||
The proof in the protocol described in the paper contains a polynomial of degree `t-1`. This adds to the proof `t` field | ||
elements (polynomial coefficients) and requires evaluation of a `t-1` degree polynomial during proving and verification. | ||
An alternate implementation is to have the proof contain `n` fields elements and avoid the polynomial evaluation during | ||
proving and verification making these faster but the proofs bigger. These are implemented in [same_base_alt](./same_base_alt.rs) and [different_base_alt](./different_base_alt.rs) |
Oops, something went wrong.