Chapter 4: Cryptography

แปลโดย : Claude 3 Opus (Pro)

Chapter 4 : Cryptography

Whitfield Diffie always had a thing for codes. Ever since his fifth-grade teacher introduced him to a technique called the substitution cipher—a basic starting point in the mathematical branch of cryptography—he’d been intrigued by this secret-keeping method. That such text-scrambling algorithms were at the time, in the 1950s, the domain of the Army, special agents, and spies only added to the mystique.

Young Whitfield was soon poring over any cryptography book that his father—a university professor—could find at the City College Library of New York. He studied standard works like Helen Forché Gaines’s 1939 book Cryptoanalysis, which detailed various schemes to convert messages into unreadable ciphertext, ideally so that only the intended recipient could decipher them.

With the very basic Caesar cipher (supposedly used by Julias Caesar), messages can for example be turned into ciphertext by substituting every letter with a different letter. The encryption key “+1,” say, replaces each letter by the next letter in the alphabet—“a” becomes “b,” “b” becomes “c,” and so on. The word “Secret” turns into “Tfdsfu.” To decipher the scrambled text, then, the same encryption key is used, but in reverse; each letter is replaced by the previous letter in the alphabet; “Tfdsfu” turns back into “Secret.”

This +1 encryption key isn’t very strong, of course. An adversary determined to decrypt the resulting ciphertext—a cryptanalyst—would probably guess it on their first try. And even if they wouldn’t guess it, a number of patterns in an encrypted text can help specialized codebreakers figure out which substitute letters likely correspond with which original letters. Especially in longer texts, the frequency of specific letters and the length of words, for example, offer clues.

Modern encryption keys therefore used far more advanced techniques, and for example applied some parts of a text to encrypt other parts. Encryption—and breaking encryption—was by the mid-twentieth century key to military operations, and executed by dedicated specialists who had advanced the field to the point where ciphertexts could appear entirely random. Without patterns to analyze, even the best cryptanalysts in the world were unable to break these codes.

Still, the basic idea remained mostly unchanged. Like in the Caesar cipher, the secret keys were always symmetric: the decryption key was the same as the encryption key, just used in reverse. To communicate securely, people first needed to share a key.

Sharing a key over an insecure communications channel was not an option, however. If eavesdroppers intercepted the key, they could decrypt all subsequent messages encrypted with that key, defeating the point of encrypting the messages in the first place. The keys were therefore typically shared in person. Both parties had to first meet up in a physical location before they could exchange encrypted messages.

This of course wasn’t always easy, or even possible. Long distances or extreme circumstances like war could complicate the process significantly. But, as Diffie learned during his early studies, cryptographers believed there was no other way; exchanging keys in person was how it had to be done.

บทที่ 4: วิทยาการรหัสลับ

วิทฟิลด์ ดิฟฟี่ มีความสนใจในรหัสลับมาโดยตลอด ตั้งแต่ครูชั้นประถมปีที่ 5 ของเขาแนะนำเทคนิคที่เรียกว่ารหัสแทนที่ (substitution cipher) - ซึ่งเป็นจุดเริ่มต้นพื้นฐานในสาขาคณิตศาสตร์ของวิทยาการรหัสลับ - เขาก็หลงใหลในวิธีการเก็บความลับนี้ ในช่วงทศวรรษ 1950 ขณะนั้น อัลกอริทึมการสลับข้อความแบบนี้เป็นเขตของกองทัพ สายลับ และสปายเท่านั้น ซึ่งยิ่งเพิ่มเสน่ห์ลึกลับให้กับมัน

วิทฟิลด์หนุ่มในไม่ช้าก็ค้นคว้าหนังสือวิทยาการรหัสลับทุกเล่มที่พ่อของเขา - ซึ่งเป็นศาสตราจารย์มหาวิทยาลัย - สามารถหาได้จากห้องสมุดวิทยาลัยนครนิวยอร์ก เขาศึกษางานมาตรฐานอย่างเช่นหนังสือ Cryptoanalysis ปี 1939 ของเฮเลน ฟอร์เช เกนส์ ซึ่งอธิบายรายละเอียดโครงร่างต่างๆ ในการแปลงข้อความให้เป็นข้อความรหัสที่อ่านไม่ออก โดยหวังว่ามีเพียงผู้รับที่ตั้งใจไว้เท่านั้นที่สามารถถอดรหัสได้

ด้วยรหัสซีซาร์อันเรียบง่าย (ที่คาดว่าจูเลียส ซีซาร์ใช้) ข้อความสามารถถูกเปลี่ยนเป็นข้อความรหัสได้ โดยการแทนที่ทุกตัวอักษรด้วยตัวอักษรอื่น ตัวอย่างเช่น กุญแจเข้ารหัส "+1" แทนที่แต่ละตัวอักษรด้วยตัวอักษรถัดไปในตัวอักษร - "a" กลายเป็น "b", "b" กลายเป็น "c" และอื่นๆ คำว่า "Secret" กลายเป็น "Tfdsfu" เพื่อถอดรหัสข้อความที่สลับแล้ว ก็ใช้กุญแจเข้ารหัสเดียวกัน แต่ใช้ในทางกลับกัน แต่ละตัวอักษรจะถูกแทนที่ด้วยตัวอักษรก่อนหน้าในตัวอักษร "Tfdsfu" จะถูกเปลี่ยนกลับเป็น "Secret"

แน่นอนว่ากุญแจเข้ารหัส +1 นี้ไม่แข็งแรงมาก ศัตรูที่ตั้งใจจะถอดรหัสข้อความรหัสที่ได้ - นักวิเคราะห์รหัส - อาจเดาได้ในความพยายามครั้งแรก และถึงแม้จะไม่เดา จำนวนรูปแบบในข้อความที่เข้ารหัสก็สามารถช่วยให้ผู้เชี่ยวชาญถอดรหัสเฉพาะทางคาดเดาได้ว่าตัวอักษรแทนใดน่าจะสอดคล้องกับตัวอักษรดั้งเดิมใด โดยเฉพาะในข้อความที่ยาวขึ้น ความถี่ของตัวอักษรเฉพาะและความยาวของคำ ยกตัวอย่างเช่น ให้เบาะแสได้

ดังนั้น กุญแจเข้ารหัสสมัยใหม่จึงใช้เทคนิคที่ก้าวหน้ากว่ามาก และเช่นนำบางส่วนของข้อความไปเข้ารหัสส่วนอื่นๆ ในช่วงกลางศตวรรษที่ยี่สิบ การเข้ารหัสและการถอดรหัสเป็นกุญแจสำคัญของการปฏิบัติการทางทหาร และดำเนินการโดยผู้เชี่ยวชาญเฉพาะทางที่พัฒนาสาขานี้จนถึงจุดที่ข้อความรหัสอาจดูสุ่มโดยสิ้นเชิง หากไม่มีรูปแบบให้วิเคราะห์ แม้แต่นักวิเคราะห์รหัสที่เก่งที่สุดในโลกก็ไม่สามารถแกะรหัสเหล่านี้ได้

แต่กระนั้นแนวคิดพื้นฐานก็ยังคงเหมือนเดิมเป็นส่วนใหญ่ เหมือนกับในรหัสซีซาร์ กุญแจลับมีความสมมาตรเสมอ กุญแจถอดรหัสเป็นกุญแจเดียวกับกุญแจเข้ารหัส เพียงแต่ใช้ในทิศทางตรงกันข้าม เพื่อสื่อสารอย่างปลอดภัย ผู้คนจำเป็นต้องแบ่งปันกุญแจก่อน

อย่างไรก็ตาม การแชร์กุญแจผ่านช่องทางสื่อสารที่ไม่ปลอดภัยไม่ใช่ทางเลือก หากผู้ดักฟังสกัดกุญแจได้ พวกเขาก็สามารถถอดรหัสข้อความทั้งหมดที่เข้ารหัสด้วยกุญแจนั้นในภายหลังได้ ทำให้การเข้ารหัสข้อความตั้งแต่แรกไร้ประโยชน์ ดังนั้น กุญแจมักจะถูกแชร์แบบเผชิญหน้า ทั้งสองฝ่ายต้องมาพบกันในสถานที่จริงก่อน แล้วจึงจะสามารถแลกเปลี่ยนข้อความที่เข้ารหัสได้

แน่นอนว่าสิ่งนี้ไม่ได้ง่ายเสมอไป หรือแม้แต่เป็นไปได้ ระยะทางไกลหรือสถานการณ์สุดขีดเช่นสงครามอาจทำให้กระบวนการซับซ้อนขึ้นอย่างมาก แต่ตามที่ดิฟฟี่ได้เรียนรู้ในช่วงแรกของการศึกษา นักวิทยาการเข้ารหัสเชื่อว่าไม่มีทางอื่น การแลกเปลี่ยนกุญแจแบบเผชิญหน้าคือสิ่งที่ต้องทำ

Last updated