关于「原典考辨:孙子与柯克霍夫斯」,《单兵零信任母典》给出的定量结论是什么?
结论:再看三行例子。遭攻机会 0.02,指望不来,期望成本 2.0,准备 5.2,不准备反而便宜;可十年之内,至少遭攻一回之机会,已有 0.1829。遭攻机会 0.10,指望不来,期望成本 10.0,准备 6.0;十年之内,至少遭攻一回,0.6513。遭攻机会 0.30,两者 30.0 对 8.0;十年之内,0.9718。
数据口径:全书只写防守,不写任何攻击、入侵、绕过或规避检测手法;书中主机、域名、令牌全为合成,参数为示意,全部计算由书中程序生成;本书为非个人化经营分析,不构成安全审计或法律意见,任何生产变更须经人工复核放行。 书中以标注框区分已发表之证据、可运行之 Python 计算(20 段程序)、原典与作者之假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.02, 0.10, 0.1829, 0.30, 0.6513, 0.9718
| break-even attack probability a* | 0.0556 |
| worst regret: hope 85.0, ready 5.0 | |
| a | 0.02: hope 2.0, ready 5.2; P(>=1 in 10 y) 0.1829 |
| a | 0.10: hope 10.0, ready 6.0; P(>=1 in 10 y) 0.6513 |
| a | 0.30: hope 30.0, ready 8.0; P(>=1 in 10 y) 0.9718 |
| one attempt passes all three layers | 0.006 |
| 10 attempts: P(breach) 0.0584 | |
| 100 attempts: P(breach) 0.4522 | |
| 1,000 attempts: P(breach) 0.9976 |
查看完整验算程序
# Chapter 7. p72: "do not rely on their not coming; rely on being ready".
# Two policies under an unknown yearly attack probability a:
# hope no preparation cost; loss 100 if attacked;
# ready cost 5 a year; loss bounded at 10 if attacked.
# Expected yearly cost: hope 100 a, ready 5 + 10 a; break-even a* = 5/90.
# Regret = cost minus the better policy's cost at that a; the policy
# with the smaller worst-case regret is the minimax-regret choice.
# Second clause, "rely on being unassailable": with three independent
# layers failing per attempt with 0.1, 0.2, 0.3, one attempt gets through
# with 0.006; over n attempts the chance of at least one breach is
# 1 - (1 - 0.006)^n. All numbers illustrative.
import math
if __name__ == "__main__":
a_star = 5.0 / 90.0
print("break-even attack probability a* = {:.4f}".format(a_star))
grid = [i / 1000.0 for i in range(1001)]
reg_h = max(100.0 * a - min(100.0 * a, 5.0 + 10.0 * a) for a in grid)
reg_r = max(5.0 + 10.0 * a - min(100.0 * a, 5.0 + 10.0 * a)
for a in grid)
print("worst regret: hope {:.1f}, ready {:.1f}".format(reg_h, reg_r))
for a in (0.02, 0.1, 0.3):
print("a = {:.2f}: hope {:>5.1f}, ready {:>5.1f}; P(>=1 in 10 y) "
"{:.4f}".format(a, 100.0 * a, 5.0 + 10.0 * a,
1.0 - (1.0 - a) ** 10))
p = math.prod([0.1, 0.2, 0.3])
print("one attempt passes all three layers: {:.3f}".format(p))
for n in (10, 100, 1000):
print(" {:>5,} attempts: P(breach) {:.4f}".format(
n, 1.0 - (1.0 - p) ** n))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《单兵硅基帝国零信任网安架构、源站隧道隐身与反爬虫防勒索母典》第 7 章「原典考辨:孙子与柯克霍夫斯」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-336 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026336,
author = {Fan, Yafu},
title = {Zero-Trust Cybersecurity for a One-Commander Silicon Empire: Origin Cloaking, Secret Hygiene and Anti-Scraper Defense},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}