关于「实证闭环:书稿与程序哈希树写入回执、小工具与预注册检验」,《默克尔树与书稿存证》给出的定量结论是什么?

结论:第八章给出把每卷书稿与程序哈希树写入回执的流程、书稿默克尔证明器与预注册检验方案:修订幅度检验需要 116 个事件,31 个以上宽修订即推翻经验命题。书中以标注框区分已发表的证据、可运行的 Python 计算(20 段程序)、原典与作者的假说。

数据口径:书中的书稿、时间戳、盐值与参数均为示意,全部计算由书中程序生成;哈希与时间戳只证明某段内容不晚于某时已经存在且未被改动,不等于著作权登记或权属证明,举证效力以法院与当地法规为准;本书不构成个人化法律建议。 第一章在九个文件的示意书稿上做单字节改动,凭总哈希猜改了哪个文件,命中率 0.1133,与瞎猜的 0.1111 无异。

English version

对照数据表

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

audit of 100 receipts: draws needed to catch >1 mismatch
mismatched P >0.95 P >= 0.99
195 99
278 90
545 59
1025 36
2013 19
edit-footprint test: n116 events, reject H0 if >= 31 are wide
size under p0.20: 0.0487
power under p0.30: 0.8073
wide = more than 0.1670 of the volume's files changed
查看完整验算程序
# Chapter 8. p82: sample sizes for the pre-registered checks.
# (1) Audit: a century has 100 volume receipts. If t of them no longer
#     match their files, how many receipts s must an auditor re-hash,
#     drawn at random without replacement, to catch at least one with
#     probability >= 0.99 (or 0.95)? Exact hypergeometric.
# (2) Edit footprint: p32 found the tree loses to a flat list once more
#     than about 0.167 of the leaves change. The book predicts that at
#     most 0.20 of real revision events are that wide. One-sided exact
#     binomial test of H0: p = 0.20 against p = 0.30, alpha 0.05, power
#     0.80: smallest number of events n and the rejection count c.
import math

VOL = 100


def catch(t, s):
    return 1.0 - math.comb(VOL - t, s) / math.comb(VOL, s)


def upper_tail(n, c, p):
    terms = [math.comb(n, j) * p ** j * (1 - p) ** (n - j)
             for j in range(c, n + 1)]
    return math.fsum(terms)


print("audit of %d receipts: draws needed to catch >= 1 mismatch" % VOL)
print("%10s %10s %10s" % ("mismatched", "P >= 0.95", "P >= 0.99"))
for t in (1, 2, 5, 10, 20):
    need = []
    for target in (0.95, 0.99):
        s = 1
        while catch(t, s) < target:
            s += 1
        need.append(s)
    print("%10d %10d %10d" % (t, need[0], need[1]))
p0, p1, alpha, power = 0.20, 0.30, 0.05, 0.80
n = 10
while True:
    c = 0
    while upper_tail(n, c, p0) > alpha:
        c += 1
    if upper_tail(n, c, p1) >= power:
        break
    n += 1
print("edit-footprint test: n = %d events, reject H0 if >= %d are wide"
      % (n, c))
print("  size under p = 0.20: %.4f" % upper_tail(n, c, p0))
print("  power under p = 0.30: %.4f" % upper_tail(n, c, p1))
print("  wide = more than %.4f of the volume's files changed" % 0.1670)

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《默克尔树哈希链与可信时间戳、专著版本防篡改与优先权举证最小证明母典》第 8 章「实证闭环:书稿与程序哈希树写入回执、小工具与预注册检验」(版本 1.0.0). 5D Library. DOI 待发布

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

BibTeX
@book{fan2026295,
  author    = {Fan, Yafu},
  title     = {Merkle Hash Trees and Trusted Timestamps: Tamper-Evidence for Monograph Versions and Minimal Proofs of Priority},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论