关于「条文编号的仿射密码:可逆条件、密钥空间与已知样本破解」,《铁板神数的比特账》给出的定量结论是什么?
结论:第三章研究条文编号的仿射映射:模数 12,000 时可逆钥匙只值 25.195 比特,平均 3.288 对已知样本即可破解,任何一一对应的编码都不增加信息。
数据口径:书中参数为示意;全部计算由书中程序生成;本书分析结构与概率,不对任何个人作任何占断,也不构成法律或理财建议。 第五章说明一句条文的期望信息量至多 0.5307 比特,按示意规模每分钟有 19.01 人出生。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 12000, 25.195
| modulus m phi(m) keys m*phi(m) key bits units share | |
| 12,000 | 3,200 38,400,000 25.195 0.2667 |
| 17,024 | 6,912 117,669,888 26.810 0.4060 |
| 120,000 | 32,000 3,840,000,000 31.838 0.2667 |
| an 8-digit decimal PIN, for comparison | 26.575 bits |
| m | 12000, a = 7, b = 1234: image size 12,000 |
| a^-1 mod m | 5143; x = 1001 -> y = 8241 -> x = 1001 |
| a | 6: gcd 6, image 2,000, bits lost 2.585 |
| a | 15: gcd 15, image 800, bits lost 3.907 |
| a | 16: gcd 16, image 750, bits lost 4.000 |
| two keys (7,1234) then (11,5000) = one key (77, 6574): True |
查看完整验算程序
# Chapter 3. p31: Affine coding of verse numbers, y = (a*x + b) mod m.
# The map is a bijection exactly when gcd(a, m) = 1; then
# x = a^-1 * (y - b) mod m. The number of invertible keys is m * phi(m).
# A non-invertible a folds m inputs onto m / gcd(a, m) outputs and
# destroys log2 gcd(a, m) bits. Moduli: the two verse-bank readings of
# p11 and the 17024 "variation number" of the Huangji jingshi (Ch. 7).
# Keys a = 7, b = 1234 and a = 6 are arbitrary examples.
import math
def phi(m):
r, n, p = m, m, 2
while p * p <= n:
if n % p == 0:
while n % p == 0:
n //= p
r -= r // p
p += 1
if n > 1:
r -= r // n
return r
print(" modulus m phi(m) keys m*phi(m) key bits units share")
for m in (12000, 17024, 120000):
f = phi(m)
print(" {:>9,} {:>8,} {:>15,} {:8.3f} {:9.4f}".format(
m, f, m * f, math.log2(m * f), f / m))
print(" an 8-digit decimal PIN, for comparison: {:.3f} bits".format(
math.log2(10 ** 8)))
m, a, b = 12000, 7, 1234
image = {(a * x + b) % m for x in range(m)}
inv = pow(a, -1, m)
x = 1001
y = (a * x + b) % m
print(" m = 12000, a = 7, b = 1234: image size {:,}".format(len(image)))
print(" a^-1 mod m = {}; x = {} -> y = {} -> x = {}".format(
inv, x, y, inv * (y - b) % m))
for a2 in (6, 15, 16):
g = math.gcd(a2, m)
img = len({(a2 * x + b) % m for x in range(m)})
print(" a = {:>2}: gcd {:>2}, image {:>5,}, bits lost {:.3f}".format(
a2, g, img, math.log2(m / img)))
# stacking two affine keys gives one affine key: no extra secrecy
a1, b1, a3, b3 = 7, 1234, 11, 5000
comp = (a3 * a1 % m, (a3 * b1 + b3) % m)
ok = all((a3 * ((a1 * x + b1) % m) + b3) % m ==
(comp[0] * x + comp[1]) % m for x in range(m))
print(" two keys (7,1234) then (11,5000) = one key {}: {}".format(
comp, ok))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《铁板神数考刻分决策树、条文库仿射编码与信息熵套取下界》第 3 章「条文编号的仿射密码:可逆条件、密钥空间与已知样本破解」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-157 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026157,
author = {Fan, Yafu},
title = {Tieban Shenshu Ke-Fen Decision Trees, Affine Coding of the Verse Bank and Entropy Lower Bounds on Elicitation},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}