关于「三份副本的错觉:丢失与泄露的二项分布账」,《数字资产灾难恢复与门限分片》给出的定量结论是什么?

结论:抄三份分放三处,在独立丢失的假定下是最防丢的做法:示意参数下的年丢失概率只有 0.000125,但泄露概率升到 0.058808,是一份副本的 2.940 倍。三取二相对一份副本两项同时变好,相对三份副本则是用丢失换泄露。要在两本账上都赢过三份副本,示意参数下至少要 5 份,五取二是最小的方案。沙米尔的论文支撑门限方案的数学性质与钥匙管理的两难,不支撑「门限在任何参数下都同时占优」。下一章打开分片的内部:有限域、多项式与插值,看 \(k-1\) 份为什么不泄露任何信息,以及一份被悄悄改坏的分片能不能被发现。

数据口径:书中所有秘密都是玩具整数,参数均为示意,全部计算由书中程序生成;本书是数学模型与演练清单,不连接也不描述任何真实服务器,生产环境的备份与密钥操作须人工放行,不构成个人化法律或理财建议。 第一章在每份每年丢失 0.05、泄露 0.02 的示意参数下,算出三份副本的年丢失概率 0.000125、泄露概率 0.058808,三取二分别为 0.007250 与 0.001184,五取二是两项都胜过三份副本的最小方案。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.000125, 0.058808, 2.940

q0.05 loss, p = 0.02 leak per piece per year
scheme k n P(secret lost) P(secret leaked)
one copy1 1 0.050000 0.020000
two copies1 2 0.002500 0.039600
three copies1 3 0.000125 0.058808
2-of-3 shares2 3 0.007250 0.001184
3-of-5 shares3 5 0.001158 0.000078
4-of-7 shares4 7 0.000194 0.000005
ratios loss leak
three copies / one copy0.0025 2.940
2-of-3 / one copy0.1450 0.0592
2-of-3 / three copies58.0 0.0201

核心公式

\[P_{\text{丢}} = \sum_{j=n-k+1}^{n} \binom{n}{j} q^j (1-q)^{n-j}, \qquad P_{\text{泄}} = \sum_{j=k}^{n} \binom{n}{j} p^j (1-p)^{n-j}.\]
查看完整验算程序
# Chapter 1. p11: whole copies versus (k, n) threshold shares, one year.
# Model: every piece is lost (destroyed, misplaced, holder unreachable)
# with probability q and leaked (read by someone not entitled) with
# probability p, independently. Loss of the secret = fewer than k pieces
# survive; leak of the secret = at least k pieces leak. A whole copy is
# the special case k = 1. q = 0.05 and p = 0.02 per piece per year are
# illustrative; the secret itself is never needed for this arithmetic.
import math

Q, P = 0.05, 0.02


def tail(n, r, x):
    # binomial upper tail: at least x of n pieces fail
    terms = [math.comb(n, j) * r ** j * (1 - r) ** (n - j)
             for j in range(x, n + 1)]
    return math.fsum(terms)


def loss(k, n, q=Q):
    return tail(n, q, n - k + 1)


def leak(k, n, p=P):
    return tail(n, p, k)


SCHEMES = [("one copy", 1, 1), ("two copies", 1, 2),
           ("three copies", 1, 3), ("2-of-3 shares", 2, 3),
           ("3-of-5 shares", 3, 5), ("4-of-7 shares", 4, 7)]
print("q = %.2f loss, p = %.2f leak per piece per year" % (Q, P))
print("scheme          k  n   P(secret lost)  P(secret leaked)")
for name, k, n in SCHEMES:
    print("%-14s %2d %2d   %14.6f  %16.6f"
          % (name, k, n, loss(k, n), leak(k, n)))
base_loss, base_leak = loss(1, 3), leak(1, 3)
print("ratios                    loss    leak")
print("three copies / one copy  %6.4f   %5.3f"
      % (base_loss / loss(1, 1), base_leak / leak(1, 1)))
print("2-of-3 / one copy        %6.4f  %6.4f"
      % (loss(2, 3) / loss(1, 1), leak(2, 3) / leak(1, 1)))
print("2-of-3 / three copies    %6.1f  %6.4f"
      % (loss(2, 3) / base_loss, leak(2, 3) / base_leak))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《数字资产灾难恢复与密钥分片、沙米尔秘密共享门限与异地增量快照单点失联自救母典》第 1 章「三份副本的错觉:丢失与泄露的二项分布账」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-272 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026272,
  author    = {Fan, Yafu},
  title     = {Disaster Recovery for Digital Assets: Shamir Secret-Sharing Thresholds, Off-Site Incremental Snapshots and Self-Rescue from Single Points of Loss},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论