Secret sharing using the Chinese remainder theorem explained

Secret sharing consists of recovering a secret from a set of shares, each containing partial information about the secret. The Chinese remainder theorem (CRT) states that for a given system of simultaneous congruence equations, the solution is unique in some, with under some appropriate conditions on the congruences. Secret sharing can thus use the CRT to produce the shares presented in the congruence equations and the secret could be recovered by solving the system of congruences to get the unique solution, which will be the secret to recover.

Secret sharing schemes: several types

See main article: Secret sharing. There are several types of secret sharing schemes. The most basic types are the so-called threshold schemes, where only the cardinality of the set of shares matters. In other words, given a secret, and shares, any set of shares is a set with the smallest cardinality from which the secret can be recovered, in the sense that any set of shares is not enough to give . This is known as a threshold access structure. We call such schemes threshold secret sharing schemes, or -out-of- scheme.

Threshold secret sharing schemes differ from one another by the method of generating the shares, starting from a certain secret. The first ones are Shamir's threshold secret sharing scheme, which is based on polynomial interpolation in order to find from a given set of shares, and George Blakley's geometric secret sharing scheme, which uses geometric methods to recover the secret . Threshold secret sharing schemes based on the CRT are due to Mignotte and Asmuth–Bloom, they use special sequences of integers along with the CRT.

Chinese remainder theorem

Let

k\geqslant2,m1,...,mk\geqslant2

, and

b1,...,bk\inZ

. The system of congruences

\begin{cases} x\equiv&b1\bmodm1\\ &\vdots\\ x\equiv&bk\bmodmk\\ \end{cases}

has solutions in if and only if

bi\equivbj\bmod(mi,mj)

for all

1\leqslanti,j\leqslantk

, where

(mi,mj)

denotes the greatest common divisor (GCD) of and . Furthermore, under these conditions, the system has a unique solution in where

n=[m1,...,mk]

, which denotes the least common multiple (LCM) of

m1,...,mk

.

Secret sharing using the CRT

Since the Chinese remainder theorem provides us with a method to uniquely determine a number S modulo k-many relatively prime integers

m1,m2,...,mk

, given that S < \prod_^k m_i, then, the idea is to construct a scheme that will determine the secret given any shares (in this case, the remainder of modulo each of the numbers), but will not reveal the secret given less than of such shares.

Ultimately, we choose relatively prime integers

m1<m2<...<mn

such that is smaller than the product of any choice of of these integers, but at the same time is greater than any choice of of them. Then the shares

s1,s2,...,sn

are defined by

si=S\bmodmi

for

i=1,2,...,n

. In this manner, thanks to the CRT, we can uniquely determine from any set of or more shares, but not from less than . This provides the so-called threshold access structure.

This condition on can also be regarded as

n
\prod
i=n-k+2

mi<S<

k
\prod
i=1

mi.

Since is smaller than the smallest product of of the integers, it will be smaller than the product of any of them. Also, being greater than the product of the greatest integers, it will be greater than the product of any of them.

There are two secret sharing schemes that utilize essentially this idea, the Mignotte and Asmuth–Bloom schemes, which are explained below.

Mignotte threshold secret sharing scheme

As said before, the Mignotte threshold secret sharing scheme uses, along with the CRT, special sequences of integers called the -Mignotte sequences which consist of integers, pairwise coprime, such that the product of the smallest of them is greater than the product of the biggest ones. This condition is crucial because the scheme is built on choosing the secret as an integer between the two products, and this condition ensures that at least shares are needed to fully recover the secret, no matter how they are chosen.

Formally, let be integers. A -Mignotte sequence is a strictly increasing sequence of positive integers

m1<<mn

, with

(mi,mj)=1

for all, such that

mn-k+2mn<m1mk

. Let

\alpha=mn-k+2mn

and

\beta=m1mk

; we call the integers lying strictly between

\alpha

and

\beta

the authorized range. We build a -threshold secret sharing scheme as follows: We choose the secret as a random integer

\alpha<S<\beta

in the authorized range. We compute, for every, the reduction modulo of that we call, these are the shares. Now, for any different shares
s
i1

,\ldots,

s
ik
, we consider the system of congruences:

\begin{cases} x\equiv&

s
i1

\bmod

m
i1

\\ &\vdots\\ x\equiv&

s
ik

\bmod

m
ik

\\ \end{cases}

By the Chinese remainder theorem, since

m
i1

,\ldots,

m
ik
are pairwise coprime, the system has a unique solution modulo
m
i1

m
ik
. By the construction of our shares, this solution is nothing but the secret to recover.

Asmuth–Bloom threshold secret sharing scheme

This scheme also uses special sequences of integers. Let be integers. We consider a sequence of pairwise coprime positive integers

m0<...<mn

such that

m0mn-k+2mn<m1mk

. For this given sequence, we choose the secret S as a random integer in the set .

We then pick a random integer such that

S+\alpham0<m1mk

. We compute the reduction modulo of

S+\alpham0

, for all, these are the shares

Ii=(si,mi)

. Now, for any different shares
I
i1
,...,I
ik
, we consider the system of congruences:

\begin{cases} x\equiv&

s
i1

\bmod

m
i1

\\ &\vdots\\ x\equiv&

s
ik

\bmod

m
ik

\\ \end{cases}

By the Chinese remainder theorem, since

m
i1

,...,

m
ik
are pairwise coprime, the system has a unique solution modulo
m
i1

m
ik
. By the construction of our shares, the secret S is the reduction modulo of .

It is important to notice that the Mignotte -threshold secret-sharing scheme is not perfect in the sense that a set of less than shares contains some information about the secret. The Asmuth–Bloom scheme is perfect: is independent of the secret and

n
\left.\begin{array}{r} \prod
i=n-k+2
m
i\\ \alpha \end{array}\right\}<
k
\prodmi
i=1
m0

Therefore can be any integer modulo

n
\prod
i=n-k+2

mi.

This product of moduli is the largest of any of the choose possible products, therefore any subset of equivalences can be any integer modulo its product, and no information from is leaked.

Example

The following is an example on the Asmuth–Bloom scheme. For practical purposes we choose small values for all parameters. We choose and . Our pairwise coprime integers being

m0=3,m1=11,m2=13,m3=17

and

m4=19

. They satisfy the Asmuth–Bloom required sequence because

3 ⋅ 17 ⋅ 19<11 ⋅ 13 ⋅ 17

.

Say our secret is 2. Pick

\alpha=51

, satisfying the required condition for the Asmuth–Bloom scheme. Then

2+51 ⋅ 3=155

and we compute the shares for each of the integers 11, 13, 17 and 19. They are respectively 1, 12, 2 and 3. We consider one possible set of 3 shares: among the 4 possible sets of 3 shares we take the set and show that it recovers the secret . Consider the following system of congruences:

\begin{cases} x\equiv&1\bmod 11\\ x\equiv&12\bmod 13\\ x\equiv&2\bmod 17\\ \end{cases}

To solve the system, let

M=111317

. From a constructive algorithm for solving such a system, we know that a solution to the system is

x0=1e1+12 ⋅ e2+2 ⋅ e3

, where each is found as follows:

By Bézout's identity, since

(mi,M/mi)=1

, there exist positive integers and, that can be found using the Extended Euclidean algorithm, such that

ri.mi+si.M/mi=1

. Set

ei=siM/mi

.

From the identities

1=1 ⋅ 221-20 ⋅ 11=(-5)187+72 ⋅ 13=5 ⋅ 143+(-42)17

, we get that

e1=221,e2=-935,e3=715

, and the unique solution modulo

11 ⋅ 13 ⋅ 17

is 155. Finally,

S=155\equiv2\mod3

.

See also

References

External links