Alice splits a secret s \red{s} s into n \red{n} n shares, such that
- any combination of < = L \red{<= L} <=L shares cannot learn the secret
- any combination of > L \red{> L} >L shares learns the secret
其中, L \red{L} L is the degree of polynomial f \red{f} f that f ( 0 ) = s \red{f(0) = s} f(0)=s.
在阶为
L
\red{L}
L 的曲线上选取
n
\red{n}
n 的点作为共享的秘密,即计算:
s
h
a
r
e
1
=
f
(
1
)
,
s
h
a
r
e
2
=
f
(
2
)
,
.
.
.
,
s
h
a
r
e
n
=
f
(
n
)
\red{share_1 = f(1), share_2 = f(2),..., share_n = f(n)}
share1=f(1),share2=f(2),...,sharen=f(n)
注:阶为1的曲线,只是需要2个点确定一条直线;阶为2的曲线,至少需要3个点确定一条直线;以此类推,阶为
L
\red{L}
L 的曲线,至少要
L
+
1
\red{L + 1}
L+1 个点确定一条直线。
恢复 secret s \red{s} s 时,需要用 Lagrange Interpolation (拉格朗日插值定理)