密码学的黎明:从隐写到现代信息安全
第 1 章:密码学的黎明:从隐写到现代信息安全
Chapter 1: The Dawn of Cryptography — From Steganography to Modern Information Security
人类为什么要发明密码?这个问题的答案并不浪漫——它源于一个冷酷的事实:只要存在两个以上的个体,就必然存在信息的不对称;而信息的不对称一旦被恶意利用,就会产生伤害。从公元前 5 世纪斯巴达战场上缠绕着羊皮纸的木棒,到 21 世纪量子计算机试图破解的 RSA 算法,人类用两千五百年的时间,把"让消息只被应该读到的人读到"这件事,从一门直觉性的手艺(craft),打磨成了一门基于数学严格性的科学(science)。本章的任务,是回答三个层层递进的核心问题:密码学到底在解决什么问题?它的历史经历了怎样的范式跃迁?以及为什么"公开算法、保密密钥"反而比"保密算法"更安全?
Why did humans invent cryptography? The answer is unsentimental: wherever there are more than two individuals, information asymmetry is inevitable, and once information asymmetry is exploited maliciously, harm follows. From the wooden rods wrapped in parchment on a 5th-century BCE Spartan battlefield, to the RSA algorithms that 21st-century quantum computers attempt to break, humanity has spent twenty-five centuries refining the act of "letting a message be read only by those who should read it"—transforming it from an intuitive craft into a science grounded in mathematical rigor. This chapter addresses three progressively deeper questions: What problem does cryptography actually solve? What paradigm shifts has its history undergone? And why is "open algorithm, secret key" actually more secure than "secret algorithm"?
---
1.1 隐写术与密码学:两种截然不同的"保密"哲学
1.1 Steganography and Cryptography: Two Fundamentally Different Philosophies of "Secrecy"
在讨论密码学之前,我们必须先厘清一个极易混淆的概念:隐写术(Steganography)与密码学(Cryptography)不是一回事。虽然两者都服务于"保密"这一表层目标,但它们的实现路径与安全模型截然不同。这一区分不仅是历史问题,更是设计任何现代信息安全系统时的第一块基石。
Before discussing cryptography, we must clarify a frequently confused concept: steganography (隐写术) and cryptography (密码学) are not the same thing. Although both serve the surface-level goal of "secrecy," their implementation paths and security models differ fundamentally. This distinction is not merely historical—it is the first cornerstone when designing any modern information security system.
1.1.1 古希腊的"天书棒":隐写术的经典范式
1.1.1 The Spartan Scytale: A Classic Steganographic Paradigm
公元前 5 世纪,波斯帝国与希腊城邦之间爆发了长达数十年的波希战争(Greco-Persian Wars)。斯巴达(Lacedaemon/Sparta)作为希腊军事同盟的核心成员,需要一种可靠的远距离通信手段来协调各城邦的军事行动。据古希腊历史学家普鲁塔克(Plutarch,约公元 46–119 年)在《希腊罗马名人传》(*Parallel Lives*)中记载,斯巴达军方使用了一种名为 Scytale(σκυτάλη,现代英语发音 /ˈskɪtəli/,希腊语原意为"棒")的通信工具。
In the 5th century BCE, the Greco-Persian Wars erupted between the Persian Empire and the Greek city-states. Sparta (Lacedaemon), as the core of the Greek military alliance, needed reliable long-distance communication to coordinate military actions among the city-states. According to the Greek historian Plutarch (c. 46–119 CE) in his *Parallel Lives*, Spartan military forces used a communication device called the Scytale (σκυτάλη, modern English pronunciation /ˈskɪtəli/, original Greek meaning "staff" or "stick").
Scytale 的工作原理极其优雅:一根特定直径的木棒,通信双方各持一根;发送方将一条长羊皮纸( parchment)螺旋形地缠绕在木棒上,沿木棒方向书写消息;写完后将羊皮纸解下,此时纸上的字母看起来是一串无意义的乱序字符;接收方只需将这条纸带缠绕在自己那根直径完全相同的木棒上,消息便会重新对齐成可读的句子。
The working principle of the Scytale is elegantly simple: a wooden rod of a specific diameter, held by both communicating parties. The sender spirally wraps a long strip of parchment around the rod and writes the message along the rod's axis; after writing, the parchment is unwound, and the letters on the paper appear as a meaningless scrambled sequence. The receiver only needs to wrap this strip around their own rod of exactly identical diameter, and the message will realign into readable sentences.
从信息安全的角度看,Scytale 解决的是"信息是否存在"(the existence of information)这一问题。一个截获了羊皮纸带的人看到的是一串无意义的字符,他会认为这要么是装饰图案,要么是某个抄写员的废稿——他根本不会意识到这是一条加密消息。这就是隐写术的本质:信息的内容是明文的(plaintext),但信息的存在性被掩盖了。
From an information security perspective, the Scytale solves the problem of "the existence of information." A person who intercepts the parchment strip sees a meaningless sequence of characters—they would assume it is either a decorative pattern or a scribe's discarded draft—they would not even realize this is an encrypted message at all. This is the essence of steganography: the content of the information is in plaintext, but the existence of the information itself is concealed.
与之对照的是,中国古代军事通信中同样存在一种"阴符"制度。据《六韬》(相传为周代姜子牙所著,实际成书于战国至魏晋之间)记载:"主与将有阴符,凡八等。有大胜克敌之符,长一尺;破军擒将之符,长九寸;……诸奉使行符,符不合者,逗留伺候;符合者,承而用之。" 阴符是一种预先约定的符号系统,不同长度、不同材质的木牌(竹牌)代表不同的军事命令。例如,"长一尺"代表"大胜克敌","长九寸"代表"破军擒将"。通信双方不需要传递具体的文字内容,只需传递一块特定规格的木牌。
In contrast, ancient Chinese military communication included a similar system called "Yinfu" (阴符, "dark tally"). According to the *Six Secret Teachings* (《六韬》, traditionally attributed to Jiang Ziya of the Zhou dynasty but actually composed between the Warring States and Wei-Jin periods): "The ruler and general have Yinfu tallies, in eight grades. A tally of one chi (尺) length signifies a great victory over the enemy; one of nine cun (寸) length signifies routing an army and capturing a general... When envoys carry tallies, those whose tallies do not match must wait and observe; those whose tallies match may proceed to use them." The Yinfu is a pre-agreed symbol system where wooden (or bamboo) tallies of different lengths and materials represent different military orders. For instance, "one chi in length" signifies "great victory over the enemy," while "nine cun in length" signifies "routing the army and capturing the general." The two parties need not transmit specific textual content—only a tally of a specific specification.
阴符的本质仍然是隐写术:它通过物理形态的差异来隐藏"信息的存在性",而不是改变信息的内容。但请注意,隐写术有一个致命的弱点:一旦被识破,信息完全暴露。如果敌人知道了阴符的规格表,那么任何一块木牌对他们来说都是明文消息。斯巴达 Scytale 也是一样:只要敌人知道了木棒的直径和缠绕方式,截获的纸带立刻就会变成一份"敌方战报"。
The essence of Yinfu is still steganography: it hides "the existence of information" through differences in physical form, rather than altering the content of the information. But note: steganography has a fatal weakness: once it is recognized, the information is completely exposed. If the enemy learns the Yinfu specification table, any wooden tally becomes plaintext to them. The Spartan Scytale shares this vulnerability: once the enemy knows the rod's diameter and winding method, the intercepted strip immediately becomes an "enemy war bulletin."
1.1.2 密码学的真正诞生:当敌人"知道你在通信"
1.1.2 The True Birth of Cryptography: When the Enemy "Knows You Are Communicating"
公元前 5 世纪左右的希腊世界,发生了另一件具有深远意义的事情。真正的密码学——即改变信息内容而非仅仅隐藏信息存在的技术——开始在军事和外交实践中出现。希罗多德(Herodotus, 约公元前 484–425 年)在《历史》(*Histories*)一书中记载了一个著名的故事:希斯提亚埃乌斯(Histaiaeus)想鼓励米利都(Miletus)起义反抗波斯人,他剃光了一个奴隶的头,把消息刺在头皮上,等头发长出来后派奴隶穿过边境。这当然还是隐写术。
Around the 5th century BCE in the Greek world, another development of profound significance occurred. True cryptography—the technique of altering the content of information rather than merely hiding its existence—began to emerge in military and diplomatic practice. Herodotus (c. 484–425 BCE) recorded a famous story in his *Histories*: Histaiaeus, wishing to encourage Miletus to revolt against the Persians, shaved a slave's head, tattooed a message on his scalp, and waited for the hair to grow back before sending the slave across the border. This is still steganography.
但在大约同一时期,另一种技术也开始在雅典和斯巴达出现:把消息写在一条长布条上,缠绕在一根特定尺寸的木棒(scytale)上——这就是 Scytale 真正的双面性。长期以来,Scytale 被教科书归类为"最早的密码学工具",但学界对此存在争议:它究竟是一种隐写术(纸条解下后看起来无意义)还是一种换位密码(transposition cipher,字母顺序被重新排列)?现代密码史学界倾向于认为,Scytale 在某种意义上是一种原始的换位密码:它通过改变字母的空间顺序来改变信息的"可见形态"。
But in approximately the same period, another technique also emerged in Athens and Sparta: writing a message on a long strip of cloth wound around a rod of specific dimensions—this is the true duality of the Scytale. For a long time, textbooks have categorized the Scytale as "the earliest cryptographic tool," but there is scholarly debate: is it a steganographic technique (the strip appears meaningless when unwound) or a transposition cipher (letters are rearranged in order)? Modern cryptographic historians tend to view the Scytale as, in some sense, an archaic transposition cipher: it alters the visible form of