# Publicly verifiable secret sharing

In cryptography, a secret sharing scheme is publicly verifiable (PVSS) if it is a verifiable secret sharing scheme and if any party (not just the participants of the protocol) can verify the validity of the shares distributed by the dealer.
   In verifiable secret sharing (VSS) the object is to resist malicious players, such as (i) a dealer sending incorrect shares to some or all of the participants, and (ii) participants submitting incorrect shares during the reconstruction protocol, cf. [CGMA85]. In publicly verifiable secret sharing (PVSS), as introduced by Stadler [Sta96], it is an explicit goal that not just the participants can verify their own shares, but that anybody can verify that the participants received correct shares. Hence, it is explicitly required that (i) can be verified publicly.
The method introduced here according to the paper by Chunming Tang, Dingyi Pei, Zhuo Liu, and Yong He is non-interactive and maintains this property throughout the protocol.

## Initialization

The PVSS scheme dictates an initialization process in which:
* All system parameters are generated.
* Each participant must have a registered public key.
Excluding the initialization process, the PVSS consists of two phases:

## Distribution

1. Distribution of secret $s$ shares is performed by the dealer $D$, which does the following:
* The dealer creates $s_{1},s_{2}...s_{n}$ for each participant $P_{1},P_{2}...P_{n}$ respectively.
* The dealer publishes the encrypted share $E_{i}(s_{i})$ for each $P_{i}$.
* The dealer also publishes a string $\mathrm {proof} _{D}$ to show that each $E_{i}$ encrypts $s_{i}$
(note: $\mathrm {proof} _{D}$ guarantees that the reconstruction protocol will result in the same $s$.
2. Verification of the shares:
* Anybody knowing the public keys for the encryption methods $E_{i}$, can verify the shares.
* If one or more verifications fails the dealer fails and the protocol is aborted.

## Reconstruction

1. Decryption of the shares:
* The Participants $P_{i}$ decrypts their share of the secret $s_{i}$ using $E_{i}(s_{i})$.
(note: fault-tolerance can be allowed here: it's not required that all participants succeed in decrypting $E_{i}(s_{i})$ as long as a qualified set of participants are successful to decrypt $s_{i}$).
* The participant release $s_{i}$ plus a string $\mathrm {proof} _{P_{i}}$ this shows the released share is correct.
2. Pooling the shares:
* Using the strings $\mathrm {proof} _{P_{i}}$ to exclude the participants which are dishonest or failed to decrypt $E_{i}(s_{i})$.
* Reconstruction $s$ can be done from the shares of any qualified set of participants.

## Chaum-Pedersen Protocol

A proposed protocol proving: $\log _{_{g1}}h_{1}=\log _{_{g2}}h_{2}$ :
* The prover chooses a random $r\in {\boldsymbol {\mathrm {Z} }}_{q^{*}}$
* The verifier sends a random challenge $c\in _{R}{\boldsymbol {\mathrm {Z} }}_{q}$
* The prover responds with $s=r-cx(\mathrm {mod} \,q)$
* The verifier checks $\alpha _{1}=g_{1}^{s}h_{1}^{c}$ and $\alpha _{2}=g_{2}^{s}h_{2}^{c}$
Denote this protocol as: $\mathrm {dleq} (g_{1},h_{1},g_{2},h_{2})$ A generalization of $\mathrm {dleq} (g_{1},h_{1},g_{2},h_{2})$ is denoted as: ${\text{dleq}}(X,Y,g_{1},h_{1},g_{2},h_{2})$ where as: $X=g_{1}^{x_{1}}g_{2}^{x_{2}}$ and $Y=h_{1}^{x_{1}}h_{2}^{x_{2}}$:
* The prover chooses a random $r_{1},r_{2}\in Z_{q}^{*}$ and sends $t_{1}=g_{1}^{r_{1}}g_{2}^{r_{2}}$ and $t_{2}=h_{1}^{r_{1}}h_{2}^{r_{2}}$
* The verifier sends a random challenge $c\in _{R}{\boldsymbol {\mathrm {Z} }}_{q}$.
* The prover responds with $s_{1}=r_{1}-cx_{1}(\mathrm {mod} \,q)$ , $s_{2}=r_{2}-cx_{2}(\mathrm {mod} \,q)$.
* The verifier checks $t_{1}=X^{c}g_{1}^{s_{1}}g_{2}^{s_{2}}$ and $t_{2}=Y^{c}h_{1}^{s_{1}}h_{2}^{s_{2}}$
The Chaum-Pedersen protocol is an interactive method and needs some modification to be used in a non-interactive way: Replacing the randomly chosen $c$ by a 'secure hash' function with $m$ as input value.