โค้ดเบรกเกอร์ทำงานอย่างไร

Oct 25 2007
ตัวแบ่งรหัสใช้ตรรกะและสัญชาตญาณในการเปิดเผยข้อมูลลับ ตั้งแต่รหัสลับในสมัยกรีกโบราณไปจนถึงรูปแบบการเข้ารหัสคอมพิวเตอร์สมัยใหม่ รหัสต่างๆ มีความซับซ้อนและแก้ปัญหาได้ยากขึ้น ใครคือคนที่ทำลายรหัสและทำอย่างไร?
ภาพระยะใกล้นี้แสดงให้เห็นงานเขียนบางส่วนจากสมุดบันทึกของ Enigma codebreaker Alan Turing ซึ่งมีบทบาทสำคัญในการทำลายรหัสในช่วงสงครามโลกครั้งที่สอง รูปภาพ Chris Radburn / PA ผ่าน Getty Images

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


Carston M üller, SXC Binary code เป็นพื้นฐานสำหรับการเข้ารหัสที่ทันสมัยจำนวนมาก

บุคคลที่สื่อสารผ่านการเขียนลับเรียกว่าผู้เข้ารหัส นักเข้ารหัสอาจใช้รหัส รหัสลับ หรือทั้งสองอย่างร่วมกันเพื่อให้ข้อความปลอดภัยจากผู้อื่น สิ่งที่นักเข้ารหัสสร้างขึ้น นักเข้ารหัสพยายามที่จะเปิดเผย

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

คุณพูด Cryptology ฉันพูดว่า Cryptography
ในภาษาอังกฤษ คำว่าcryptologyและcryptographyมักจะใช้แทนกันได้ - ทั้งสองหมายถึงศาสตร์แห่งการเขียนลับ บางคนชอบแยกแยะคำศัพท์โดยใช้การเข้ารหัสเพื่ออ้างถึงวิทยาศาสตร์และการเข้ารหัสเพื่ออ้างถึงการฝึกเขียนลับ

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

 

หากต้องการเรียนรู้ว่าตัวแบ่งรหัสถอดรหัสข้อความลับได้อย่างไร คุณจำเป็นต้องรู้ว่าผู้คนสร้างรหัสอย่างไร ในส่วนถัดไป เราจะเรียนรู้เกี่ยวกับความพยายามครั้งแรกในการซ่อนข้อความ

สารบัญ
  1. Polybius Squares และ Caesar Shifts
  2. Trimethius Tableau
  3. Vigenère Cipher
  4. รหัส ADFGX
  5. เครื่องเข้ารหัส
  6. การเข้ารหัสลับ
  7. ทำลายรหัส
  8. รหัสที่ยังไม่ได้แก้ไขที่มีชื่อเสียง

Polybius Squares และ Caesar Shifts

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

ชาวกรีกเป็นหนึ่งในอารยธรรมแรก ๆ ที่ใช้รหัสลับเพื่อสื่อสารอย่างเป็นความลับ นักวิชาการชาวกรีกชื่อ Polybius เสนอระบบสำหรับการเข้ารหัสข้อความ โดยที่ผู้เข้ารหัสใช้แทนตัวอักษรแต่ละตัวด้วยตัวเลขตั้งแต่หนึ่งถึงห้าโดยใช้สี่เหลี่ยมจัตุรัสขนาด 5 คูณ 5 (ตัวอักษร I และ J ใช้สี่เหลี่ยมร่วมกัน) Polybius Square (บางครั้งเรียกว่ากระดานหมากรุก) มีลักษณะดังนี้:

1 2 3 4 5
1 อา บี ดี อี
2 F จี ชม ฉัน/J K
3 หลี่ เอ็ม นู๋ อู๋ พี
4 คิว R ตู่ ยู
5 วี W X Y Z

นักเข้ารหัสจะเขียนตัวอักษร "B" เป็น "12" ตัวอักษร O คือ "34" ในการเข้ารหัสวลี "How Stuff Works" ผู้เข้ารหัสจะเขียนว่า "233452 4344452121 5234422543" เนื่องจากเขาแทนที่ตัวอักษรแต่ละตัวด้วยตัวเลขสองตัว จึงเป็นเรื่องยากสำหรับคนที่ไม่คุ้นเคยกับรหัสที่จะระบุว่าข้อความนี้หมายถึงอะไร ผู้เข้ารหัสอาจทำให้ยากยิ่งขึ้นด้วยการผสมลำดับของตัวอักษรแทนที่จะเขียนตามลำดับตัวอักษร

Julius Caesar ได้คิดค้นรหัสลับในยุคแรกขึ้นอีกอันหนึ่ง ซึ่งเรียบง่ายมาก แต่ยังทำให้ศัตรูของเขาสับสน เขาสร้างข้อความที่เข้ารหัสโดยเปลี่ยนลำดับของตัวอักษรตามจำนวนตัวอักษรที่กำหนด ตัวอย่างเช่น หากคุณจะเลื่อนตัวอักษรภาษาอังกฤษลงสามตำแหน่ง ตัวอักษร "D" จะแทนตัวอักษร "A" ในขณะที่ตัวอักษร "E" จะหมายถึง "B" เป็นต้น คุณสามารถเห็นภาพรหัสนี้โดยการเขียนตัวอักษรสองตัวทับกันโดยใช้ข้อความธรรมดาและรหัสที่ตรงกันดังนี้:

ข้อความธรรมดา เอ d อี g ชม. ฉัน เจ k l
รหัส ดี อี F จี ชม ฉัน เจ K หลี่ เอ็ม นู๋ อู๋ พี
ข้อความธรรมดา o พี q r t ยู วี w x y z
รหัส คิว R ตู่ ยู วี W X Y Z อา บี

สังเกตว่าตัวอักษรเข้ารหัสล้อมรอบตัว "A" หลังจากถึง "Z" เมื่อใช้ระบบการเข้ารหัสนี้ คุณสามารถเข้ารหัสวลี "How Stuff Works" เป็น "KRZ VWXII ZRUNV"

ทั้งสองระบบนี้คือ Polybius Square และ Caesar Shift ซึ่งเป็นพื้นฐานของระบบการเข้ารหัสในอนาคตจำนวนมาก

ในส่วนถัดไป เราจะดูวิธีการเข้ารหัสขั้นสูงสองสามวิธีเหล่านี้

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

Trimethius Tableau

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

นักเข้ารหัสเริ่มค้นหาวิธีใหม่ในการเข้ารหัสข้อความ Caesar Shift นั้นง่ายเกินไปที่จะถอดรหัส เมื่อให้เวลาและความอดทนเพียงพอ เกือบทุกคนสามารถค้นพบข้อความธรรมดาที่อยู่เบื้องหลังข้อความที่เข้ารหัส กษัตริย์และนักบวชจ้างนักวิชาการให้คิดวิธีใหม่ๆ ในการส่งข้อความลับ

นักวิชาการคนหนึ่งคือ Johannes Trimethius ซึ่งเสนอให้จัดวางตัวอักษรในเมทริกซ์หรือฉาก เมทริกซ์มีความยาว 26 แถวและกว้าง 26 คอลัมน์ แถวแรกมีตัวอักษรตามที่เขียนตามปกติ แถวถัดไปใช้ Caesar Shift เพื่อย้ายตัวอักษรไปหนึ่งช่อง แต่ละแถวเปลี่ยนตัวอักษรอีกจุดหนึ่งเพื่อให้แถวสุดท้ายเริ่มต้นด้วย "Z" และลงท้ายด้วย "Y" คุณสามารถอ่านตัวอักษรได้ตามปกติโดยดูจากแถวแรกหรือคอลัมน์แรก ดูเหมือนว่านี้:


อย่างที่คุณเห็น แต่ละแถวคือ Caesar Shift ในการเข้ารหัสตัวอักษร ผู้เข้ารหัสจะเลือกแถวหนึ่งและใช้แถวบนสุดเป็นแนวทางข้อความธรรมดา ตัวอย่างเช่น นักเข้ารหัสที่ใช้แถวที่ 10 จะเข้ารหัสตัวอักษรธรรมดา "A" เป็น "J"

Trimethius didn't stop there -- he suggested that cryptographers encipher messages by using the first row for the first letter, the second row for the second letter, and so on down the tableau. After 26 consecutive letters, the cryptographer would start back at the first row and work down again until he had enciphered the entire message. Using this method, he could encipher the phrase "How Stuff Works" as "HPY VXZLM EXBVE."

ฉากของ Trimethius เป็นตัวอย่างที่ดีของการเข้ารหัสแบบหลายตัวอักษร การเข้ารหัสในยุคแรกส่วนใหญ่เป็นแบบmonoalphabeticซึ่งหมายความว่าตัวอักษรตัวเลขหนึ่งตัวแทนที่ตัวอักษรข้อความธรรมดา รหัสตัวเลขหลายตัวอักษรใช้ตัวอักษรหลายตัวเพื่อแทนที่ข้อความธรรมดา แม้ว่าจะใช้ตัวอักษรเดียวกันในแต่ละแถว แต่ตัวอักษรของแถวนั้นมีความหมายต่างกัน นักเข้ารหัสเข้ารหัสข้อความธรรมดา "A" ในแถวที่สามเป็น "C" แต่ "A" ในแถวที่ 23 คือ "W" ระบบของ Trimethius จึงใช้ตัวอักษร 26 ตัว สำหรับแต่ละตัวอักษรในตัวอักษรปกติ

ในส่วนถัดไป เราจะเรียนรู้ว่านักวิชาการที่ชื่อ Vigenère สร้างรหัสตัวเลขที่ซับซ้อนได้อย่างไร

Vigenère Cipher

ในช่วงปลายทศวรรษ 1500 Blaise de Vigenère ได้เสนอระบบ polyalphabetic ที่ถอดรหัสได้ยากเป็นพิเศษ วิธีการของเขาใช้การผสมผสานระหว่างฉาก Trimethius และกุญแจ กุญแจกำหนดว่าตัวอักษรใดในตารางที่ตัวถอดรหัสควรใช้ แต่ไม่จำเป็นว่าจะต้องเป็นส่วนหนึ่งของข้อความจริง ลองดูที่ฉาก Trimethius อีกครั้ง:

สมมติว่าคุณกำลังเข้ารหัสข้อความโดยใช้คำสำคัญ "CIPHER" คุณจะต้องเข้ารหัสตัวอักษรตัวแรกโดยใช้แถว "C" เป็นแนวทาง โดยใช้ตัวอักษรที่อยู่บริเวณจุดตัดของแถว "C" และคอลัมน์ของตัวอักษรข้อความธรรมดาที่เกี่ยวข้อง สำหรับตัวอักษรตัวที่สอง ให้ใช้แถว "I" เป็นต้น เมื่อคุณใช้แถว "R" เพื่อเข้ารหัสตัวอักษร คุณจะต้องเริ่มที่ "C" อีกครั้ง ด้วยการใช้คำสำคัญและวิธีการนี้ คุณสามารถเข้ารหัส "How Stuff Works" ด้วยวิธีนี้:

กุญแจ ฉัน พี ชม อี R ฉัน พี ชม อี R
ธรรมดา ชม อู๋ W ตู่ ยู F F W อู๋ R K
รหัส เจ W หลี่ Z X หลี่ ชม นู๋ หลี่ วี วี บี ยู

ข้อความเข้ารหัสของคุณจะเขียนว่า "JWL ZXLHN LVVBU" หากคุณต้องการเขียนข้อความที่ยาวขึ้น คุณจะต้องใช้คีย์ซ้ำแล้วซ้ำอีกเพื่อเข้ารหัสข้อความธรรมดาของคุณ ผู้รับข้อความของคุณจะต้องทราบรหัสก่อนจึงจะสามารถถอดรหัสข้อความได้

Vigenèreแนะนำรูปแบบที่ซับซ้อนยิ่งขึ้นโดยใช้ตัวอักษรรองพื้นตามด้วยข้อความเป็นกุญแจ จดหมายพื้นฐานกำหนดแถวที่โปรแกรมเข้ารหัสลับใช้เพื่อเริ่มข้อความเป็นครั้งแรก ทั้งผู้เข้ารหัสและผู้รับรู้ดีว่าควรใช้อักษรตัวใดก่อน วิธีนี้ทำให้ถอดรหัสรหัสยากมาก แต่ก็ใช้เวลานานเช่นกัน และข้อผิดพลาดหนึ่งข้อในช่วงต้นของข้อความอาจทำให้ทุกอย่างที่ตามมาสับสน แม้ว่าระบบจะปลอดภัย แต่คนส่วนใหญ่พบว่ามันซับซ้อนเกินไปที่จะใช้งานอย่างมีประสิทธิภาพ นี่คือตัวอย่างของระบบของ Vigenère ในกรณีนี้ ตัวอักษรรองพื้นคือ " D ":

กุญแจ ดี ชม อู๋ W ตู่ ยู F F W อู๋ R K
ธรรมดา ชม อู๋ W ตู่ ยู F F W อู๋ R K
รหัส K วี K อู๋ หลี่ นู๋ Z K บี K F บี

ในการถอดรหัส ผู้รับจะดูที่ตัวอักษรตัวแรกของข้อความที่เข้ารหัส ในกรณีนี้คือ "K" และใช้ตาราง Trimethius เพื่อค้นหาตำแหน่งที่ "K" อยู่ในแถว "D" - จำไว้ว่าทั้ง ผู้เข้ารหัสและผู้รับรู้ล่วงหน้าว่าตัวอักษรตัวแรกของคีย์จะเป็น "D" เสมอ ไม่ว่าข้อความที่เหลือจะพูดอะไร ตัวอักษรที่ด้านบนของคอลัมน์นั้นคือ "H" ตัว "H" จะกลายเป็นอักษรตัวถัดไปในรหัสของรหัส ดังนั้นผู้รับจะดูที่แถว "H" ถัดไปและค้นหาตัวอักษรตัวถัดไปในรหัสตัวเลข ซึ่งในกรณีนี้คือ "V" ซึ่งจะทำให้ผู้รับมี "O" ตามวิธีนี้ ผู้รับสามารถถอดรหัสข้อความทั้งหมดได้ แม้ว่าจะใช้เวลาสักครู่

ระบบ Vigenère ที่ซับซ้อนกว่านั้นยังใช้ไม่ได้จนถึงปี 1800 แต่ก็ยังใช้ในเครื่องเข้ารหัสที่ทันสมัย ​​[แหล่งข่าว:  Kahn ]

ในส่วนถัดไป เราจะเรียนรู้เกี่ยวกับรหัส ADFGX ที่สร้างโดยเยอรมนีในช่วงสงครามโลกครั้งที่ 1

รหัส ADFGX

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

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

ขั้นตอนแรกคือการสร้างเมทริกซ์ที่ดูเหมือนกระดานหมากรุก Polybius มาก:

อา ดี F จี X
อา อา บี ดี อี
ดี F จี ชม ฉัน/J K
F หลี่ เอ็ม นู๋ อู๋ พี
จี คิว R ตู่ ยู
X วี W X Y Z

นักเข้ารหัสจะใช้คู่ของตัวอักษรเข้ารหัสเพื่อเป็นตัวแทนของตัวอักษรธรรมดา แถวของตัวอักษรจะกลายเป็นตัวเลขตัวแรกในคู่ และคอลัมน์จะกลายเป็นตัวเลขตัวที่สอง ในตัวอย่างนี้ ตัวอักษรที่เข้ารหัส "B" จะกลายเป็น "AD" ในขณะที่ "O" จะกลายเป็น "FG" เมทริกซ์ ADFGX บางตัวไม่ได้พล็อตตัวอักษรตามลำดับตัวอักษร

ถัดไป ผู้เข้ารหัสจะเข้ารหัสข้อความของเขา มายึดติดกับ "How Stuff Works" กัน เมื่อใช้เมทริกซ์นี้ เราจะได้ "DFFGXD GFGGGXDADA XDFGGDDXGF"

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

ดี อี ยู ตู่ ชม
ดี F F จี X ดี จี
F จี จี จี X ดี อา
ดี อา X ดี F จี จี
ดี ดี X จี F

ถัดไป ผู้เข้ารหัสจะจัดเรียงตารางใหม่เพื่อให้ตัวอักษรของคำสำคัญเรียงตามลำดับตัวอักษร โดยเปลี่ยนคอลัมน์ที่สอดคล้องกันของตัวอักษรตามลำดับ:

ดี อี ชม ตู่ ยู
ดี ดี F จี X จี F
ดี F จี อา X จี จี
จี ดี อา จี F ดี X
ดี ดี F จี X

He would then write out the message by following down each column (disregarding the letters of the key word on the top row). This message would come out as "DDG DFDD FGAD GAG XXFF GGDG FGXX." It's probably clear why this code was so challenging -- cryptographers enciphered and transposed every plaintext character. To decode, you would need to know the key word (DEUTSCH), then you'd work backward from there. You'd start with a grid with the columns arranged alphabetically. Once you filled it out, you could rearrange the columns properly and use your matrix to decipher the message.

Words Count
One of the ways you can guess at a key word in an ADFGX cipher is to count the number of words in the ciphered message. The number of ciphered words will tell you how long the key word is -- each ciphered word represents a column of text, and each column corresponds to a letter in the key word. In our example, there are seven words in the ciphered message, meaning there are seven columns with a seven-letter key word. Sure enough, DEUTSCH has seven letters. Because the ciphered words and the original message can have different word counts -- seven ciphered words versus three plaintext words in our example -- deciphering the message becomes more challenging.

In the next section, we'll look at some of the devices cryptographers have invented to create puzzling ciphers.

Cipher Machines

One of the earliest cipher devices known is the Alberti Disc, invented by Leon Battista Alberti, in the 15th century. The device consisted of two discs, the inner one containing a scrambled alphabet and the outer one a second, truncated alphabet and the numbers 1 to 4. The outer disc rotated to match up different letters with the inner circle, which letters the cryptographer used as plaintext. The outer disc's letters then served as the cipher text.


William West/AFP/ Getty Images
Dan Brown's novel "The Da Vinci Code" follows the adventures
of a symbology professor as he solves codes and ciphers, some
of which he breaks using a Cardano Grille.


Because the inner disc's alphabet was scrambled, the recipient would need an identical copy of the disc the cryptographer used to decipher the message. To make the system more secure, the cryptographer could change the disc's alignment in the middle of a message, perhaps after three or four words. The cryptographer and recipient would know to change the disc settings after a prescribed number of words, perhaps first setting the disc so that the inner circle "A" matched with the outer circle "W" for the first four words, then with "N" for the next four, and so on. This made cracking the cipher much more difficult.

Cardano Grilles and Steganography
A clever way to hide a secret message is in plain sight. One way to do this is to use a Cardano Grille -- a piece of paper or cardboard with holes cut out of it. To cipher a message, you lay a grille on a blank sheet of paper and write out your message through the grille's holes. You fill the rest of the paper with innocent text. When your recipient receives the message, he lays an identical grille over it to see the secret text. This is a form of steganography, hiding a message within something else.

In the 19th century, Thomas Jefferson proposed a new ciphering machine. It was a cylinder of discs mounted on a spindle. On the edge of each disc were the letters of the alphabet, arranged in random sequence. A cryptographer could align the discs to spell out a short message across the cylinder. He would then look at another row across the cylinder, which would appear to be gibberish, and send that to the recipient. The recipient would use an identical cylinder to spell out the series of nonsense letters, then scan the rest of the cylinder, looking for a message spelled out in English. In 1922, the United States Army adopted a device very similar to Jefferson's; other branches of the military soon followed suit [source: Kahn].

Perhaps the most famous ciphering device was Germany's Enigma Machine from the early 20th century. The Enigma Machine resembled a typewriter, but instead of letter keys it had a series of lights with a letter stamped on each. Pressing a key caused an electric current to run through a complex system of wires and gears, resulting in a ciphered letter illuminating. For instance, you might press the key for the letter "A" and see "T" light up.


Photo Courtesy U.S. Army
German soliders using an
Enigma Machine in the field.

What made the Enigma Machine such a formidable ciphering device was that once you pressed a letter, a rotor in the machine would turn, changing the electrode contact points inside the machine. This means if you pressed "A" a second time, a different letter would light up instead of "T." Each time you typed a letter, the rotor turned, and after a certain number of letters, a second rotor engaged, then a third. The machine allowed the operator to switch how letters fed into the machine, so that when you pressed one letter, the machine would interpret it as if you had pressed a different letter.

How does a cryptanalyst crack such a difficult code? In the next section, we'll learn how codes and ciphers are broken.

Cryptanalysis

While there are hundreds of different codes and cipher systems in the world, there are some universal traits and techniques cryptanalysts use to solve them. Patience and perseverance are two of the most important qualities in a cryptanalyst. Solving a cipher can take a lot of time , sometimes requiring you to retrace your steps or start over. It is tempting to give up when you are faced with a particuarly challenging cipher. 

Another important skill to have is a strong familiarity with the language in which the plaintext is written. Trying to solve a coded message written in an unfamiliar language is almost impossible.

Navajo Code Talkers
During World War II, the United States employed Navajo Native Americans to encode messages. The Navajos used a code system based on how their language translated into English. They assigned terms like "airplane " to code words such as "Da-he-tih-hi," which means "Hummingbird." To encipher words that didn't have a corresponding code word, they used an encoded alphabet. This encoded alphabet used Navajo translations of English words to represent letters; for instance, the Navajo word "wol-la-chee" meant "ant," so "wol-la-chee" could stand for the letter "a." Some letters were represented by multiple Navajo words. The Navajo language was so foreign to the Japanese, they never broke the code [source: Kahn].

A strong familiarity with a language includes a grasp of the language's redundancy.

Redundancy means that every language contains more characters or words than are actually needed to convey information. The rules of the English language create redundancy -- for example, no English word will begin with the letters "ng." English also relies heavily on a small number of words. Words like "the," "of," "and," "to," "a," "in," "that," "it," "is," and "I" account for more than one quarter of the text of an average message written in English [source: Kahn].

Knowing the redundant qualities of a language makes a cryptanalyst's task much easier. No matter how convoluted the cipher is, it follows some language's rules in order for the recipient to understand the message. Cryptanalysts look for patterns within ciphers to find common words and letter pairings.

One basic technique in cryptanalysis is frequency analysis. Every language uses certain letters more often than others. In English, the letter "e" is the most common letter. By counting up the characters in a text, a cryptanalyst can see very quickly what sort of cipher he has. If the distribution of cipher frequency is similar to the distribution of the frequency of a normal alphabet, the cryptanalyst may conclude that he's dealing with a monoalphabetic cipher.


© 2007
This chart shows the frequency with which
each letter in the English language is used.


In the next section, we'll look at more complex cryptanalysis and the role luck plays in breaking a cipher.

Tricks of the Trade
Cryptographers use many methods to confuse cryptanalysts. Acrophony is a method that encodes a letter by using a word that starts with that letter's sound. "Bat" might stand for "b," while "cunning" could stand for "k." A polyphone is a symbol that represents more than one letter of plaintext -- a "%" might represent both an "r" and a "j" for example, whereas homophonic substitution uses different ciphers to represent the same plaintext letter -- "%" and "&" could both represent the letter "c." Some cryptographers even throw in null symbols that don't mean anything at all.

Breaking the Code

More complicated ciphers require a combination of experience, experimentation and the occasional shot-in-the-dark guess. The most difficult ciphers are short, continuous blocks of characters. If the cryptographer's message includes wordbreaks, spaces between each enciphered word, it makes deciphering much easier. The cryptanalyst looks for groups of repeated ciphers, analyze where those groups of letters fall within the context of words and make guesses at what those letters might mean. If the cryptanalyst has a clue about the message's content, he might look for certain words. A cryptanalyst intercepting a message from a Navy captain to command might look for terms referring to weather patterns or sea conditions. If he guesses that "hyuwna" means "stormy," he might be able to crack the rest of the cipher.


Christopher Furlong/  Getty Images
Breaking the code carved into the ceiling of the Rosslyn Chapel in Scotland reveals a series of musical passages. 

Many polyalphabetic ciphers rely on key words, which makes the message vulnerable. If the cryptanalyst correctly guesses the right key word, he can quickly decipher the entire message. It's important for cryptographers to change key words frequently and to use uncommon or nonsense key words. Remembering a nonsense key word can be challenging, and if you make your cipher system so difficult that your recipient can't decipher the message quickly, your communication system fails.

Cryptanalysts take advantage of any opportunity to solve a cipher. If the cryptographer used a ciphering device, a savvy cryptanalyst will try to get the same device or make one based on his theories of the cryptographer's methodology. During World War II, Polish cryptanalysts obtained an Enigma Machine and were close to figuring out Germany's ciphering system when it became too dangerous to continue. The Polish exchanged their information and technology with the Allies, who created their own Enigma Machines and deciphered many of Germany's coded messages.

Modern high-level encryption methods rely on mathematical processes that are relatively simple to create, but extremely difficult to decipher. Public-key encryption is a good example. It uses two keys -- one for encoding a message and another for decoding. The encoding key is the public key, available to whomever wants to communicate with the holder of the secret key. The secret key decodes messages encrypted by the public key and vice versa. For more information on public-key encryption, see How Encryption Works .

The complex algorithms cryptographers use ensure secrecy for now. That will change if quantum computing becomes a reality. Quantum computers could find the factors of a large number much faster than a classic computer. If engineers build a reliable quantum computer, practically every encrypted message on the Internet will be vulnerable. To learn more about how cryptographers plan to deal with problem, read How Quantum Encryption Works .

In the next section, we'll look at some codes and ciphers that remain unsolved, much to cryptanalysts' chagrin.

Famous Unsolved Codes

While most cryptanalysts will tell you that, theoretically, there's no such thing as an unbreakable code, a few cryptographers have created codes and ciphers that no one has managed to crack. In most cases, there's just not enough text in the message for cryptanalysts to analyze. Sometimes, the cryptographer's system is too complex, or there may be no message at all -- the codes and ciphers could be hoaxes.

In the 1800s, a pamphlet with three encrypted messages began to show up in a small community in Virginia. The pamphlet described the adventures of a man named Beale who'd struck it rich panning for gold. Reportedly, Beale had hidden most of his wealth in a secret location and left a coded message leading to the treasure's location with an innkeeper. Twenty years passed with no word from Beale, and the innkeeper sought out help solving the coded messages. Eventually, someone determined that one of the messages used the Declaration of Independence as a code book, but the deciphered message only gave vague hints at the location of the treasure and claimed that the other messages would lead directly to it. No one has solved either of the other messages, and many believe the whole thing to be a hoax.


The Zodiac killer sent ciphered messages like this one to
San Francisco newspapers
in the 1960s.

In the mid 1960s, residents of San Francisco and surrounding counties were terrified of a vicious killer who taunted police with coded messages. The killer called himself the Zodiac and sent most of his letters to San Francisco newspapers, occasionally dividing up one long ciphered message between three papers. Allegedly, the ciphers perplexed law enforcement and intelligence agencies, though amateur cryptanalysts managed to crack most of them. There are a few messages that have never been solved, some supposedly a clue to the killer's identity.

Richard Feynman, physicist and pioneer in the field of nanotechnology , received three encoded messages from a scientist at Los Alamos and shared them with his graduate students when he couldn't decipher them himself. Currently, they are posted on a puzzle site. Cryptanalysts have only managed to decipher the first message, which turned out to be the opening lines of Chaucer's "Canterbury Tales" written in Middle English.

In 1990, Jim Sanborn created a sculpture called Kryptos for the CIA headquarters in Langley, Va. Kryptos contains four enciphered messages, but cryptanalysts have solved only three. The final message has very few characters (either 97 or 98, depending on whether one character truly belongs to the fourth message), making it very difficult to analyze. Several people and organizations have boasted about solving the other three messages, including the CIA and the NSA.

แม้ว่าข้อความเหล่านี้และข้อความอื่นๆ จะยังไม่ได้รับการแก้ไขในปัจจุบัน แต่ก็ไม่มีเหตุผลใดที่จะเชื่อได้ว่าข้อความเหล่านั้นจะไม่ได้รับการแก้ไขตลอดไป เป็นเวลากว่า 100 ปีแล้วที่ข้อความเข้ารหัสที่เขียนโดย Edgar Allen Poe ไม่ได้รับการแก้ตัว ทำให้นักเข้ารหัสมืออาชีพและมือสมัครเล่นงงงวย แต่ในปี 2000 ชายคนหนึ่งชื่อ Gil Broza ถอดรหัสลับ เขาพบว่าตัวเลขนั้นใช้การแทนที่แบบโฮโมโฟนิกหลายตัว ซึ่ง Poe ใช้ตัวเลข 14 ตัวเพื่อแทนตัวอักษร "e" รวมถึงข้อผิดพลาดหลายประการ งานของ Broza พิสูจน์ให้เห็นว่าการที่โค้ดไม่ได้รับการแก้ไขไม่ได้หมายความว่าจะไม่สามารถแก้ไขได้ [แหล่งที่มา: Elonka.com ]

คุณคือผู้เข้ารหัสลับ
ข้อความต่อไปนี้เป็นข้อความเข้ารหัสโดยใช้วิธีการที่คล้ายกับที่กล่าวถึงในบทความนี้ มีเบาะแสในบทความที่สามารถช่วยคุณแก้รหัสได้ อาจใช้เวลาสักครู่ในการค้นหาวิธีการที่ ใช้ได้ผลแต่ด้วยความอดทนเพียงเล็กน้อย คุณจะเข้าใจ ขอให้โชคดี!
KWKWKKRWRKKKKKWRSRWWO
SWWSWORSSRWOROSROKSKWK
OKOKWSOWRSORWRKWOWKR
KSRKRWKWRWSWRROWRSOKS
KSRSWRKKOOWOOOKSKKRS
RWRWSWROSKKWRWKKSWKSS
รวบ
SWSWKWKOKKORKROWKRRK
WSWWWKWOOROWSKRKSKOWW

ไฮไลต์ด้านล่างด้วยเมาส์เพื่อดูคำตอบ:

คุณได้ถอดรหัสรหัสตามรหัส ADFGX ที่ใช้ในเยอรมนีในสงครามโลกครั้งที่ 1 คำสำคัญคือ Discovery

หากต้องการเรียนรู้เพิ่มเติมเกี่ยวกับการเข้ารหัส ให้ไปที่ลิงก์ในหน้าถัดไป

ข้อมูลเพิ่มเติมมากมาย


บทความที่เกี่ยวข้อง

  • การเข้ารหัสทำงานอย่างไร
  • คอมพิวเตอร์ควอนตัมจะทำงานอย่างไร
  • วิธีการทำงานของการเข้ารหัสควอนตัม
  • วิธีการฆ่าตัวตายควอนตัม
  • Safecracking ทำงานอย่างไร
  • สายลับทำงานอย่างไร
  • การดักฟังทำงานอย่างไร

ลิงค์ที่ยอดเยี่ยมเพิ่มเติม

  • Cryptograms.org
  • Elonka.com
  • สมาคมนักพูดรหัสนาวาโฮ
  • เครื่องเข้ารหัสปริศนา

แหล่งที่มา

  • Elonka.com http://www.elonka.comชื่อผู้แต่ง
  • คาห์น, เดวิด. "ผู้ทำลายรหัส" Macmillan Publishing Co., Inc.
    นิวยอร์ก พ.ศ. 2510
  • Kozaczuk, วลาดีสลอว์. "ปริศนา." University Publications of
    America, Inc. 1985.
  • พินค็อก, สตีเฟน. "ผู้ถอดรหัส" วอล์คเกอร์ แอนด์ คอมพานี.
    นิวยอร์ก. 2549.
  • Sutherland, Scott. "An Introduction to Cryptography."
    October 14, 2005. http://www.math.sunysb.edu/~scott/papers/MSTP/crypto/crypto.html
  • The Enigma Cipher Machine
    http://www.codesandciphers.org.uk/enigma/index.htm