Skip to Content
CSE5313CSE5313 Coding and information theory for data science (Lecture 18)

CSE5313 Coding and information theory for data science (Lecture 18)

Secret sharing

The president and the vice president must both consent to a nuclear missile launch.

We would like to share the nuclear code such that:

  • Share1,Share2NuclearCodeShare1, Share2 \mapsto Nuclear Code
  • Share1↦̸NuclearCodeShare1 \not\mapsto Nuclear Code
  • Share2↦̸NuclearCodeShare2 \not\mapsto Nuclear Code
  • Share1↦̸Share2Share1 \not\mapsto Share2
  • Share2↦̸Share1Share2 \not\mapsto Share1

In other words:

  • The two shares are everything.
  • One share is nothing.

Solution

Scheme:

  • The nuclear code is a field element mFqm \in \mathbb{F}_q, chosen at random mMm \sim M (M arbitrary).
  • Let p(x)=m+rxFq[x]p(x) = m + rx \in \mathbb{F}_q[x].
    • rUr \sim U, where U=UniformFqU = Uniform \mathbb{F}_q, i.e., Pr(α=1/q)Pr(\alpha = 1/q) for every αFq\alpha \in \mathbb{F}_q.
  • Fix α1,α2Fq\alpha_1, \alpha_2 \in \mathbb{F}_q (not random).
  • s1=p(α1)=m+rα1,s1S1s_1 = p(\alpha_1) = m + r\alpha_1, s_1 \sim S_1.
  • s2=p(α2)=m+rα2,s2S2s_2 = p(\alpha_2) = m + r\alpha_2, s_2 \sim S_2.

And then:

  • One share reveals nothing about mm.
  • I.e., I(Si;M)=0I(S_i; M) = 0 (gradient could be anything)
  • Two shares reveal prevealp(0)=mp \Rightarrow reveal p(0) = m.
  • I.e., H(MS1,S2)=0H(M|S_1, S_2) = 0 (two points determine a line).

Formalize the notion of secret sharing

Problem setting

A dealer is given a secret mm chosen from an arbitrary distribution MM.

The dealer creates nn shares s1,s2,,sns_1, s_2, \cdots, s_n and send to nn parties.

Two privacy parameters: t,zNt,z\in \mathbb{N} z<tz<t.

Requirements:

For A[n]\mathcal{A}\subseteq[n] denote SA={si:iA}S_\mathcal{A} = \{s_i:i\in \mathcal{A}\}.

  • Decodability: Any set of tt shares can reconstruct the secret.
    • H(MST)=0H(M|S_\mathcal{T}) = 0 for all T[n]\mathcal{T}\subseteq[n] with Tt|\mathcal{T}|\geq t.
  • Security: Any set of zz shares reveals no information about the secret.
    • I(M;SZ)=0I(M;S_\mathcal{Z}) = 0 for all Z[n]\mathcal{Z}\subseteq[n] with Zz|\mathcal{Z}|\leq z.

This is called (n,z,t)(n,z,t)-secret sharing scheme.

Interpretation

  • Z[n]\mathcal{Z} \subseteq [n], Zz|\mathcal{Z}| \leq z is a corrupted set of parties.
  • An adversary which corrupts at most zz parties cannot infer anything about the secret.

Applications

  • Secure distributed storage.
    • Any z\leq z hacked servers reveal nothing about the data.
  • Secure distributed computing with a central server (e.g., federated learning).
    • Any z\leq z corrupted computation nodes know nothing about the data.
  • Secure multiparty computing (decentralized).
    • Any z\leq z corrupted parties cannot know the inputs of other parties.

Scheme 1: Shamir secret sharing scheme

Parameters n,tn,t, and z=t1z=t-1.

Fix Fq\mathbb{F}_q, q>nq>n and distinct points α1,α2,,αnFq{0}\alpha_1, \alpha_2, \cdots, \alpha_n \in \mathbb{F}_q\setminus \{0\}. (public, known to all).

Given mMm\sim M the dealer:

  • Choose r1,r2,,rzU1,U2,,Uzr_1, r_2, \cdots, r_z \sim U_1, U_2, \cdots, U_z (uniformly random from Fq\mathbb{F}_q).
  • Defines pFq[x]p\in \mathbb{F}_q[x] by p(x)=m+r1x+r2x2++rzxzp(x) = m + r_1x + r_2x^2 + \cdots + r_zx^z.
  • Send share si=p(αi)s_i = p(\alpha_i) to party ii.

Theorem valid encoding scheme

This is an (n,t1,t)(n,t-1,t)-secret sharing scheme.

Decodability:

  • degp=t1\deg p=t-1, any tt shares can reconstruct pp by Lagrange interpolation.

Proof

Specifically, any tt parties T[n]\mathcal{T}\subseteq[n] can define the interpolation polynomial h(x)=iTsiδi(x)h(x)=\sum_{i\in \mathcal{T}} s_i \delta_{i}(x), where δi(x)=jT{i}xαjαiαj\delta_{i}(x)=\prod_{j\in \mathcal{T}\setminus \{i\}} \frac{x-\alpha_j}{\alpha_i-\alpha_j}. (δi(αi)=1\delta_{i}(\alpha_i)=1, δi(αj)=0\delta_{i}(\alpha_j)=0 for jij\neq i).

degh=degp=t1\deg h=\deg p=t-1, so h(x)=p(x)h(x)=p(x) for all xTx\in \mathcal{T}.

Therefore, h(0)=p(0)=mh(0)=p(0)=m.

Privacy:

Need to show that I(M;SZ)=0I(M;S_\mathcal{Z})=0 for all Z[n]\mathcal{Z}\subseteq[n] with Z=z|\mathcal{Z}|=z.

that is equivalent to show that MM and sZs_\mathcal{Z} are independent for all Z[n]\mathcal{Z}\subseteq[n] with Z=z|\mathcal{Z}|=z.

Proof

We will show that Pr(sZM=m)=Pr(M=m)\operatorname{Pr}(s_\mathcal{Z}|M=m)=\operatorname{Pr}(M=m), for all sZSZs_\mathcal{Z}\in S_\mathcal{Z} and mMm\in M.

Let m,Z=(i1,i2,,iz)m,\mathcal{Z}=(i_1,i_2,\cdots,i_z), and sZs_\mathcal{Z}.

[mU1U2Uz]=[1111αi1αi2αi3αinαi12αi22αi32αin2αi1zαi2zαi3zαinz]=sZ=[si1si2siz]\begin{bmatrix} m & U_1 & U_2 & \cdots & U_z \end{bmatrix} = \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 \\ \alpha_{i_1} & \alpha_{i_2} & \alpha_{i_3} & \cdots & \alpha_{i_n} \\ \alpha_{i_1}^2 & \alpha_{i_2}^2 & \alpha_{i_3}^2 & \cdots & \alpha_{i_n}^2 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ \alpha_{i_1}^{z} & \alpha_{i_2}^{z} & \alpha_{i_3}^{z} & \cdots & \alpha_{i_n}^{z} \end{bmatrix}=s_\mathcal{Z}=\begin{bmatrix} s_{i_1} \\ s_{i_2} \\ \vdots \\ s_{i_z} \end{bmatrix}

So,

[U1U2Uz]=(sZ[mmmm])[αi11αi21αi31αin1][1111α1α2α3αnα12α22α32αn2α1z1α2z1α3z1αnz1]1\begin{bmatrix} U_1 & U_2 & \cdots & U_z \end{bmatrix} = (s_\mathcal{Z}-\begin{bmatrix} m & m & m & \cdots & m \end{bmatrix}) \begin{bmatrix} \alpha_{i_1}^{-1} & \alpha_{i_2}^{-1} & \alpha_{i_3}^{-1} & \cdots & \alpha_{i_n}^{-1} \\ \end{bmatrix} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 \\ \alpha_1 & \alpha_2 & \alpha_3 & \cdots & \alpha_n \\ \alpha_1^2 & \alpha_2^2 & \alpha_3^2 & \cdots & \alpha_n^2 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ \alpha_1^{z-1} & \alpha_2^{z-1} & \alpha_3^{z-1} & \cdots & \alpha_n^{z-1} \end{bmatrix}^{-1}

So exactly one solution for U1,U2,,UzU_1, U_2, \cdots, U_z is possible.

So Pr(U1,U2,,UzM=m)=1qz\operatorname{Pr}(U_1, U_2, \cdots, U_z|M=m)=\frac{1}{q^z} for all mMm\in M.

Recall the law of total probability:

Pr(sZ)=mMPr(sZM=m)Pr(M=m)=1qzmMPr(M=m)=1qz\operatorname{Pr}(s_\mathcal{Z})=\sum_{m'\in M} \operatorname{Pr}(s_\mathcal{Z}|M=m') \operatorname{Pr}(M=m')=\frac{1}{q^z}\sum_{m'\in M} \operatorname{Pr}(M=m')=\frac{1}{q^z}

So Pr(sZM=m)=Pr(M=m)    I(M;SZ)=0\operatorname{Pr}(s_\mathcal{Z}|M=m)=\operatorname{Pr}(M=m)\implies I(M;S_\mathcal{Z})=0.

Scheme 2: Ramp secret sharing scheme (McEliece-Sarwate scheme)

  • Any zz know nothing
  • Any tt knows everything
  • Partial knowledge for z<s<tz<s<t

Parameters n,tn,t, and z<tz<t.

Fix Fq\mathbb{F}_q, q>nq>n and distinct points α1,α2,,αnFq{0}\alpha_1, \alpha_2, \cdots, \alpha_n \in \mathbb{F}_q\setminus \{0\}. (public, known to all)

Given m1,m2,,mnMm_1, m_2, \cdots, m_n \sim M, the dealer:

  • Choose r1,r2,,rzU1,U2,,Uzr_1, r_2, \cdots, r_z \sim U_1, U_2, \cdots, U_z (uniformly random from Fq\mathbb{F}_q).
  • Defines p(x)=m1+m2x++mtzxtz1+r1xtz+r2xtz+1++rzxt1p(x) = m_1+m_2x + \cdots + m_{t-z}x^{t-z-1} + r_1x^{t-z} + r_2x^{t-z+1} + \cdots + r_zx^{t-1}.
  • Send share si=p(αi)s_i = p(\alpha_i) to party ii.

Decodability

Similar to Shamir scheme, any tt shares can reconstruct pp by Lagrange interpolation.

Privacy

Similar to the proof of Shamir, exactly one value of U1,,UzU_1, \cdots, U_z is possible!

Pr(sZm1,,mtz)=Pr(U1,,Uz)=theabove=1/qz\operatorname{Pr}(s_\mathcal{Z}|m_1, \cdots, m_{t-z}) = \operatorname{Pr}(U_1, \cdots, U_z) = the above = 1/q^z

(UiU_i‘s are uniform and independent).

Conclude similarly by the law of total probability.

Pr(sZm1,,mtz)=Pr(sZ)    I(SZ;M1,,Mtz)=0\operatorname{Pr}(s_\mathcal{Z}|m_1, \cdots, m_{t-z}) = \operatorname{Pr}(s_\mathcal{Z}) \implies I(S_\mathcal{Z}; M_1, \cdots, M_{t-z}) = 0.

Conditional mutual information

The dealer needs to communicate the shares to the parties.

Assumed: There exists a noiseless communication channel between the dealer and every party.

From previous lecture:

  • The optimal number of bits for communicating sis_i (i’th share) to the i’th party is H(si)H(s_i).
  • Q: What is H(siM)H(s_i|M)?

Tools:

  • Conditional mutual information.
  • Chain rule for mutual information.

Definition of conditional mutual information

The conditional mutual information I(X;YZ)I(X;Y|Z) of XX and YY given ZZ is defined as:

I(X;YZ)=H(XZ)H(XY,Z)=H(XZ)+H(X)H(X)H(XY,Z)=(H(X)H(XY,Z))(H(X)H(XZ))=I(X;Y,Z)I(X;Z)\begin{aligned} I(X;Y|Z)&=H(X|Z)-H(X|Y,Z)\\ &=H(X|Z)+H(X)-H(X)-H(X|Y,Z)\\ &=(H(X)-H(X|Y,Z))-(H(X)-H(X|Z))\\ &=I(X; Y,Z)- I(X; Z) \end{aligned}

where H(XY,Z)H(X|Y,Z) is the conditional entropy of XX given YY and ZZ.

The chain rule of mutual information

I(X;Y,Z)=I(X;YZ)+I(X;Z)I(X;Y,Z)=I(X;Y|Z)+I(X;Z)

Conditioning reduces entropy.

Lower bound for communicating secret

Consider the Shamir scheme (z=t1z = t - 1, one message).

Q: What is H(si)H(s_i) with respect to H(M)H(M) ? A: Fix any T={i1,,it}[n]\mathcal{T} = \{i_1, \cdots, i_t\} \subseteq [n] of size tt, and let Z={i1,,it1}\mathcal{Z} = \{i_1, \cdots, i_{t-1}\}.

H(M)=I(M;ST)+H(MST)(by def. of mutual information)=I(M;ST)(since ST suffice to decode M)=I(M;Sit,SZ)(since ST=SZSit)=I(M;SitSZ)+I(M;SZ)(chain rule)=I(M;SitSZ)(since Zz, it reveals nothing about M)=I(Sit;MSZ)(symmetry of mutual information)=H(SitSZ)H(SitM,SZ)(def. of conditional mutual information)H(SitSZ)(entropy is non-negative)H(SitSZ)(conditioning reduces entropy)\begin{aligned} H(M) &= I(M; S_\mathcal{T}) + H(M|S_\mathcal{T}) \text{(by def. of mutual information)}\\ &= I(M; S_\mathcal{T}) \text{(since }S_\mathcal{T}\text{ suffice to decode M)}\\ &= I(M; S_{i_t}, S_\mathcal{Z}) \text{(since }S_\mathcal{T} = S_\mathcal{Z} ∪ S_{i_t})\\ &= I(M; S_{i_t}|S_\mathcal{Z}) + I(M; S_\mathcal{Z}) \text{(chain rule)}\\ &= I(M; S_{i_t}|S_\mathcal{Z}) \text{(since }\mathcal{Z}\leq z \text{, it reveals nothing about M)}\\ &= I(S_{i_t}; M|S_\mathcal{Z}) \text{(symmetry of mutual information)}\\ &= H(S_{i_t}|S_\mathcal{Z}) - H(S_{i_t}|M,S_\mathcal{Z}) \text{(def. of conditional mutual information)}\\ &\leq H(S_{i_t}|S_\mathcal{Z}) \text{(entropy is non-negative)}\\ &\leq H(S_{i_t}|S_\mathcal{Z}) \text{(conditioning reduces entropy)} \\ \end{aligned}

So the bits used for sharing the secret is at least the bits of actual secret.

In Shamir we saw: H(si)H(M)H(s_i) \geq H(M).

  • If MM is uniform (standard assumption), then Shamir achieves this bound with equality.
  • In ramp secret sharing we have H(si)1tzH(M1,,Mtz)H(s_i) \geq \frac{1}{t-z}H(M_1, \cdots, M_{t-z}) (similar proof).
  • Also optimal if MM is uniform.

Downloading file with lower bandwidth from more servers

link to paper 

Last updated on