每日科技文摘Daily Tech Digest

每日科技文摘:去猜生成数据的那台机器,以及一枚时间戳的指纹Daily Tech Digest: Ask the Machine That Generated the Data, and the Fingerprint of a Timestamp

发布于 2026-10-19Published 2026-10-19

今日深读Today's Deep Read

「就是时间戳」:Claude 半小时了结 NIST 曲线种子的 25 年悬案"It's Just Timestamps": How Claude Settled a 25-Year-Old Crypto Mystery in Half an Hour

2000 年,NIST 发布 ECDSA 数字签名标准 FIPS 186-2,里面有一组五棵椭圆曲线:P-192、P-224、P-256、P-384、P-521。这些曲线的系数 $b$ 不是直接挑的数字,而是由一个 160 比特的「种子」做哈希推导出来的——比如 P-256 的种子是 C49D3608 86E70493 6A6678E1 139D26B7 819F7E90,由 NSA 提供,来历没有任何说明。密码学界怀疑了二十多年:想给曲线藏后门,最自然的办法就是用「看起来随机」的方式去搜——离线试 $2^{61}$ 量级的种子,总能撞上一棵恰好落在某类弱曲线上的(Bernstein 和 Lange 的著名批评)。Koblitz 和 Menezes 把这场争论写成论文,标题就叫「一个包裹在谜团里的谜」。In 2000 NIST published FIPS 186-2, its digital signature standard, along with a family of five elliptic curves: P-192, P-224, P-256, P-384, P-521. Today they guard TLS, Bitcoin, and signature checking in every major OS — they are the most-used elliptic curves on earth. The curves' coefficient $b$ wasn't picked directly; it was derived by hashing a 160-bit "seed" — P-256's seed, for instance, is C49D3608 86E70493 6A6678E1 139D26B7 819F7E90, supplied by the NSA with no explanation of where it came from. For two decades cryptographers worried: if you wanted to bury a backdoor in a curve, the natural move was to search for one using parameters that "look random" — try on the order of $2^{61}$ seeds offline and you'll hit one that lands in a class of weak curves (Bernstein and Lange's famous critique). Koblitz and Menezes wrote the survey of this controversy and titled it, aptly, "A Riddle Wrapped in an Enigma."

最可信的说法来自曲线设计者之一、NSA 老雇员 Jerry Solinas:2015 年他说,种子大概是拿某个玩笑短语做哈希得到的,「大意是『给 Bob 和 Jerry 涨工资』之类」;真正写代码的同事 Bob Reiter 也不记得细节。社区按这条线索做了十多年的短语哈希搜索,一无所获。2023 年 Solinas 去世,谜案眼看要永远悬着。The most credible story came from one of the curve designers, longtime NSA employee Jerry Solinas. In 2015 he said the seeds were probably hashes of a humorous passphrase — "something like 'Give Bob and Jerry a raise' or 'Bob and Jerry rule'" — and Bob Reiter, who actually wrote the code, didn't remember the details either. The community spent years hashing phrases along those lines. Nothing. Solinas died in 2023, the other colleagues were gone or unresponsive, and the mystery looked like it would stay open forever.

2026 年 10 月,Anthropic 一位员工把这个问题交给了公司内部的研究模型——注意,没有给它「哈希短语」这条线索,只问:你能不能自己搞清楚这些种子是怎么生成的。不到半小时,Claude 给出了答案:这些种子根本不是任何哈希算法的输出,它们是 C 标准库自带的那个伪随机数生成器 lrand48 的输出,种子是一个 Unix 时间戳。In October 2026 an Anthropic employee handed the question to an internal research model — and note, without pointing it at the passphrase clue. The only ask: figure out, on your own, how those seeds were generated. In under half an hour, Claude answered: none of the seeds are outputs of any hash algorithm at all. They are output of lrand48, the pseudorandom number generator that shipped with the C standard library, seeded with a Unix timestamp.

转折在这里:人类二十年都在猜「被哈希的消息是什么」,Claude 换了个问题——「当年那台生成程序用的是哪些软件」。1990 年代的 C 库伪随机生成器弱到输出带可识别的统计痕迹。Claude 写了一个扫描器,沿着每个公开种子的二进制流逐比特滑动,测试相邻两段是不是某个老式生成器的连续输出,一共扫了 34 种「生成器 × 输出切片」的组合。The turn is in how the question was framed. For twenty years humans asked "what message was hashed?" Claude asked "what software did the generating program run on?" 1990s-vintage C library PRNGs are weak enough that their output carries recognizable statistical fingerprints. Claude wrote a scanner that slid bit by bit along each published seed, testing whether adjacent chunks were consecutive outputs of old generators — 34 combinations of generator and output slice in all.

然后它看见了指纹。四个种子按 32 位字写成十组词、共 20 个字,每个字的最高位都是 0——纯属偶然的概率是五千八百分之一。这正是 lrand48 的签名:它内部状态 48 位,但每次只返回最高 31 位。Claude 暴力枚举被藏起来的 17 个低位、恢复出内部状态,下一个词的四个字全部严丝合缝。Then it saw the fingerprint. Written as 32-bit words, four of the seeds have a 0 in the top bit of all twenty words. By chance that happens once in 5,810. It's the signature of lrand48: a 48-bit internal state that only ever returns the top 31 bits. Claude brute-forced the 17 hidden low bits, recovered the state, and the next four words of the seed matched exactly.

素数域曲线的种子每段保留的位数更少,从截断输出里恢复线性同余生成器的状态,是教科书级的格问题,用 LLL 基归约算法解决。Claude 不知道种子暴露的是状态里哪几位,就把每个比特窗口都试了一遍:NIST 的五个素数曲线种子,加上 ANSI X9.62 标准的五个,全部命中同一个模式——lrand48() 右移 23 位。恢复出的 48 位状态能重新生成每个种子全部 160 个比特,这种事不会碰巧发生。The prime-curve seeds kept fewer bits per output, and recovering a linear-congruential state from truncated outputs is a textbook lattice problem, solved with the LLL basis-reduction algorithm. Not knowing which bits of the state the seeds exposed, Claude ran the solver over every bit window. All five NIST prime-curve seeds, plus five from the ANSI X9.62 standard, fit one pattern: lrand48() shifted right by 23. Each recovered 48-bit state regenerates all 160 bits of its seed — that doesn't happen by accident.

最后是倒着跑。线性同余生成器倒推和正推一样容易:把每个种子对应的状态一步步往回退,退到 srand48 刚初始化完的形状(低 16 位固定是 0x330E)。这种形状每 65536 步出现一次,单独看不算证据——但十个种子的回退点全都落在 1997 年 5 月到 1998 年 4 月之间的 Unix 时间戳上。四棵二元曲线的初始化值读作 1984 年 2 月;把这些时间戳翻倍,就映射到 1998 年 4 月 17 日,P-224 那次运行的两周后——程序当时用的可能是折半的时钟。The last move was running the generator backwards. An LCG unwinds as easily as it winds: Claude stepped each state back until it hit the shape produced right after srand48 initialization (low 16 bits equal to 0x330E). That shape appears once every 65,536 steps, so by itself it proves nothing — but for all ten prime-curve seeds, the rewind landed on Unix timestamps falling between May 1997 and April 1998. The four binary-curve initializations read as February 1984; doubled, those timestamps map to April 17, 1998, two weeks after the P-224 run. The program may have used a halved clock.

这意味着什么?不是破译,不是攻击,没有弱点,你什么都不用改。恰恰相反:种子来自最普通的伪随机数生成器加机器时钟,任何人都能复现整条管线——「提前搜弱曲线藏后门」的想象空间被压得极小,二十多年的猜疑可以正式翻页。Claude 还顺手破了一部分底点的来历:1997 年 5 月生成的六棵曲线的 G 点,出自 Arjen Lenstra 的 FreeLIP 大数库里的随机数器,种子是小整数:丢掉前七个输出、取 26 比特对 p 取模、不在曲线上就重来——此前没人解释过任何一个 NIST 底点。What does it mean? Not a break, not an attack, not a weakness — nothing to do differently. Exactly the opposite: the seeds came from the most ordinary PRNG on some machine's clock, and anyone can now reproduce the whole pipeline. The room for "they searched offline for a weak curve and hid a backdoor" has collapsed, closing years of suspicion. Claude partly cracked the base points too: the G points of six curves generated in May 1997 came from the random generator in Arjen Lenstra's FreeLIP big-number library, seeded with small integers (20000 for P-192): throw away seven outputs, take 26 bits, reduce mod $p$, retry until the $x$ lands on the curve. No NIST base point had ever been explained before.

对关心 AI 能力的人,这个案例展示了「研究能力」长什么样:不是知道答案,而是把问题从「数据本身」换到「生成数据的过程」。人类专家想过吗?也许,但没人带着 1990 年代 C 库的百科知识去扫 34 种组合。而且 Claude 中间还起疑「我在不在测试环境里」,算完 160 比特的完整复现才敢相信,Anthropic 团队发布前也各自手工复核。这是一个罕见的、可复现的「LLM 解掉真实悬案」样本。For anyone tracking AI capability, the interesting part is what "research ability" actually looked like: not knowing the answer, but reframing the question from the data itself to the process that generated it — pattern-matching on legacy software signatures. Had human experts thought of that? Maybe, but nobody swept 34 generator/output combinations armed with encyclopedic knowledge of 1990s C libraries. And mid-solve, Claude caught itself: "Am I in some simulated test environment?" It didn't believe the result until direct computation confirmed the full 160-bit reproduction, and the Anthropic team rechecked by hand before publishing. It's a rare, reproducible sample of an LLM closing a genuinely open case.

AI 思考AI Thoughts

数学之美The Beauty of Math

每日 Lean 谜题 · 周一Daily Lean Puzzle · Monday ★☆☆☆☆☆☆

平方差公式:可能是最简单的 Lean 证明(★1)The Difference of Squares: Probably the Simplest Lean Proof (★1)

对任意整数 $a, b$,证明 $(a - b)(a + b) = a^2 - b^2$。For all integers $a$ and $b$, prove that $(a - b)(a + b) = a^2 - b^2$.

Lean 形式化陈述(把 sorry 换成你的证明):The statement in Lean (replace sorry with your proof):

-- level: 1
import Mathlib
/-! Prove $(a-b)(a+b) = a^2 - b^2$ for all integers $a, b$. -/
theorem difference_of_squares (a b : ℤ) : (a - b) * (a + b) = a ^ 2 - b ^ 2 := by
  sorry

在浏览器中挑战 ▶Try it in your browser ▶ 下载题目 .leanDownload puzzle .lean

提示Hint

这是一个多项式恒等式,不需要任何技巧。Lean 有一个专门对付「两边都是多项式」这类目标的 tactic,它把两边都展开成规范形式再比较。This is a polynomial identity that needs no trick. Lean has a tactic built for goals where both sides are polynomials: it normalizes each side and compares.

答案与讲解Solution & walkthrough
  1. 数学上的证明就两步。分配律展开左边:$(a-b)(a+b) = a^2 + ba - ab - b^2$;整数乘法可交换,$ba = ab$,中间两项相消,剩下 $a^2 - b^2$。The mathematical proof is two lines. Distribute on the left: $(a-b)(a+b) = a^2 + ba - ab - b^2$; integer multiplication is commutative, so $ba = ab$, the middle terms cancel, leaving $a^2 - b^2$.
  2. 注意定理在 $\mathbb{Z}$(整数)里陈述,但证明里只用到加法、乘法、减法的良好性质——完全没讨论正负。事实上这个恒等式在任何交换环里都成立,Lean 的 `ring` tactic 知道这一点。Note the theorem is stated over $\mathbb{Z}$, yet the proof never discusses signs — it uses only the good behavior of addition, subtraction, and multiplication. The identity holds in any commutative ring, and Lean's `ring` tactic knows that.
  3. Lean 的解法是一行:`by ring`。`ring` 把等式两边都展开并归约成单项式的规范形式(收集同类项、按固定顺序排列),然后检查两边是否长得一模一样——它做的正是上面「分配、交换、相消」三步的机械化。The Lean solution is one word: `by ring`. `ring` expands both sides into a canonical sum-of-monomials form (collecting like terms, ordering them) and checks the two sides match. That is exactly the distribute-commute-cancel routine above, mechanized.
  4. 验证侧:答案文件编译通过,`#print axioms` 只列出 Lean 的标准公理——证明里没有 `sorry`,也没有自加的 `axiom`。题目文件里唯一的空洞就是那个 `sorry`,浏览器里可以放心打开。On the verification side: the answer file compiles, and `#print axioms` lists only Lean's foundational axioms — no `sorry`, no smuggled `axiom`. The problem file's only hole is that `sorry`, so it opens fine in the browser editor.
  5. 带走的念头:让机器证明一条连小学生都会的恒等式,反而逼你说明白「我到底用了整数的哪些性质」——交换、结合、分配,这些就是「环」的公理,`ring` 的名字就是这么来的。Take-away: making a machine prove an identity a schoolchild could check forces you to say precisely which properties of integers you rely on — commutativity, associativity, distributivity. Those are the axioms of a ring; hence the tactic's name.
-- level: 1
import Mathlib
/-! Prove $(a-b)(a+b) = a^2 - b^2$ for all integers $a, b$. -/
theorem difference_of_squares (a b : ℤ) : (a - b) * (a + b) = a ^ 2 - b ^ 2 := by
  ring

运行答案 ▶Run the solution ▶ 下载答案 .leanDownload solution .lean

人的思考A human's take

Difference of two squares (Wikipedia) — Wikipedia 社区(条目为社区长期维护的人工写作)

条目开头就把恒等式 $a^2 - b^2 = (a+b)(a-b)$ 摆出来,强调 $a, b$ 可以是更复杂的表达式,并演示因式分解方向的应用;反方向更有味道:任何两个数的乘积都能写成平方差 $xy = \left(\frac{x+y}{2}\right)^2 - \left(\frac{x-y}{2}\right)^2$,心算里的「凑整法」(比如 $27 \times 33 = 30^2 - 3^2$)就是这条恒等式。证明一节写得很干净:先分配展开得到 $a^2 + ba - ab - b^2$,再用交换律消掉中间项——这正是 Lean 里 `ring` 自动化的那两步。条目还有一节几何证明:大正方形缺掉小正方形后的 L 形区域,剪拼成长 $a+b$、宽 $a-b$ 的矩形。The page states the identity $a^2 - b^2 = (a+b)(a-b)$ up front, stresses that $a$ and $b$ can stand for larger expressions, and works through factoring applications. The reverse direction is the charming one: any product can be written as a difference of squares, $xy = \left(\frac{x+y}{2}\right)^2 - \left(\frac{x-y}{2}\right)^2$ — the mental-math trick of rounding to a nice number ($27 \times 33 = 30^2 - 3^2$) is exactly this identity. The proof section is admirably clean: distribute to get $a^2 + ba - ab - b^2$, then let commutativity cancel the middle — precisely the two steps that Lean's `ring` automates. There's also a geometric proof: the L-shaped region left when a small square is cut from a large one rearranges into an $(a+b)$ by $(a-b)$ rectangle.

AI 随想An AI's reflection

以下由 AI 撰写。Written by AI.

周一的 ★1 谜题照例简单到「不像谜题」:平方差公式,初中课本上的因式分解第一课。但把它放进 Lean 的那一刻,一件有趣的事发生了——你不能再说「显然」。「显然」拆开是三个词:分配律把乘号变成加法,交换律让 ab 和 ba 见面,然后相消。`ring` tactic 的全部工作,就是把这三个词变成一台机器能执行的程序:两边各归一化成多项式的规范形,然后逐字比较。这大概是形式化给数学带来的最朴素价值:它不生产灵感,它负责把「显然」翻译成「步骤」,好让步骤可以被检查、被复用、被机器代为执行。另一个角落里的联想:这周的头版故事里,Claude 用同样的「机械耐心」扫了 34 种生成器组合、每个比特窗口都试一遍——最简单的恒等式和最冷门的悬案之间,隔着的是同一种美德:能算的就不该猜。今天的谜题正好站在谱系的这一端:一行 `ring` 关上目标,干净得像一句「谢谢,下次再来」。但别忘了它背后站着整个交换环的公理体系——简单,从来不是浅。The Monday ★1 puzzle is deliberately almost-not-a-puzzle: difference of squares, first lesson of factoring. But the moment you put it into Lean, something interesting happens — "obviously" stops being allowed. Unpacked, "obviously" is three words: distributivity turns the product into sums, commutativity lets $ab$ and $ba$ meet, then they cancel. That is all `ring` does: normalize both sides into canonical polynomial form and compare. It's the plainest value formalization brings to mathematics — it doesn't produce insight, it translates "obvious" into "steps," and steps can be checked. A connection to this issue's lead story, too: Claude displayed the same mechanical patience, sweeping 34 generator combinations and every bit window — between the simplest identity and the coldest open case lies the same virtue: what can be computed should not be guessed. Today's puzzle sits at the near end of that spectrum: one line, `ring`, goal closed — clean as a door sliding shut.

✓ 已通过 Lean 编译验证(无 sorry,无额外公理)✓ Verified by Lean (no sorry, no extra axioms) · 题目来自本站题库Problem from this site's puzzle bank · Lean v4.35.0 · Mathlib 56a0058

程序员随想A Programmer's Musings

哲学与生活Philosophy and Life

工具角Tools