← 回電腦概論 · All Lessons

How Computers Work · Unit 4 · Lesson 14 · 電腦概論 單元四 第十四課

How Does a Computer Keep a Secret?電腦怎麼保守祕密?

A message travels from your computer to a friend’s, and someone in the middle is watching. Send it in 3D with no lock, then lock it with a key and see what the watcher gets. Give your friend the wrong key. Let the watcher try every key. Then lock and unlock messages yourself, break a cipher as the watcher, and see how many keys a real lock has.
一則訊息從你的電腦送到朋友的電腦,中間有人在偷看。在 3D 裡先不上鎖送一次,再用金鑰鎖起來,看偷看的人拿到什麼。給朋友一把錯的金鑰;讓偷看的人把每一把金鑰都試一遍。接著自己加密、解密,當一次偷看的人破解密文,再看看真正的鎖有幾把金鑰。

Big idea · 一句話看懂

To keep a message secret, a computer scrambles it by a rule, using a secret number called a key. Anyone on the way can see the scrambled message but cannot understand it. Only someone with the right key can turn it back. The rule itself can be known to everyone. The lock is safe only if there are far too many keys to try.
要讓一則訊息保密,電腦會照一個規則把它打亂,打亂時用到一個祕密的數,叫做金鑰。路上的任何人都看得到被打亂的訊息,卻看不懂。只有拿著正確金鑰的人,才能把它變回來。規則本身可以讓所有人知道。要金鑰多到試不完,這把鎖才安全。

3D Model · 3D 模型

A Message, a Watcher, and a Key 一則訊息、一個偷看的人、一把金鑰

You are on the left and your friend is on the right. The message travels along the cable between you, past the teal relay points. Behind the middle one stands someone who can see everything that goes by. Choose a message, choose whether to lock it, and press Send. The three boxes on the right show what each person ends up with. Change the key and send again.
你在左邊,朋友在右邊。訊息沿著你們中間那條線走,經過幾個青色的中繼點。中間那個點的後面站著一個人,經過的東西他全都看得到。選一則訊息,決定要不要上鎖,然後按「送出」。右邊三個格子顯示每個人最後拿到什麼。改一改金鑰,再送一次。

Drag to turn · 拖曳旋轉

This 3D model needs WebGL, which this browser does not support. The buttons and the three boxes below still work, and so do the reading and the games.
這個瀏覽器不支援 WebGL,無法顯示 3D 模型;下面的按鈕和三個格子照樣能用,課文和小遊戲也都能用。

  • The envelope: your message on its way
    信封:正在路上的訊息
  • The padlock: the message has been scrambled with a key
    鎖頭:訊息已經用金鑰打亂了
  • The watcher: sees everything that passes the middle point
    偷看的人:經過中間那個點的東西全都看得到
  • Teal dots: machines the message passes through
    青色圓點:訊息途中經過的機器

A teaching model. The lock here is the letter-shift cipher that Julius Caesar used about two thousand years ago. It is easy to follow, and it is far too weak for real use: it has only 25 keys. Real encryption does not shift letters. It works on the bits of the message, with keys that are very long numbers. Real computers also do not need to meet in advance to agree on a key; a method called public-key cryptography lets them do that across the network. What is the same is the idea: a public rule, a secret key, and a watcher who sees only nonsense.
這是教學用的示意模型。這裡的鎖是大約兩千年前凱撒用過的字母位移。它很容易看懂,但實際使用遠遠不夠強:金鑰只有 25 把。真的加密不是移字母,而是對訊息的位元動手,用的金鑰是很長的數。真的電腦也不必事先見面約好金鑰;有一種叫公開金鑰密碼學的方法,讓它們隔著網路就能約好。相同的是這個道理:規則公開、金鑰保密,偷看的人只看到一串沒有意義的東西。

Model and code are drawn and programmed by My Culture Connect. Every message is tested to lock and unlock exactly with every key, in tools/computers/test/cipher.test.mjs.
模型與程式由人師教育協會自行繪製、撰寫;每一則訊息都測過「用每一把金鑰加密再解密,都和原文一模一樣」(tools/computers/test/cipher.test.mjs)。

Reading · 英文閱讀

14

Unit 14: How Does a Computer Keep a Secret?

In Lesson 13 you saw that a message does not go straight from your computer to the other one. It passes through many machines on the way, and you do not control any of them. Anyone who runs one of those machines could look at what goes by. So how can you send something private? The answer is very old. It is called cryptography: writing a message so that only the person it is meant for can understand it.

第十三課說過,訊息不是從你的電腦直接到另一台電腦。它在路上會經過很多台機器,而那些機器沒有一台歸你管。管那些機器的任何人,都可以看一看經過的東西。那要怎麼送出不想讓別人看到的東西?答案非常古老,叫做密碼學(cryptography):把訊息寫成只有該收到的人才看得懂的樣子。

Here is one way, used by Julius Caesar. Move every letter three places along the alphabet: A becomes D, B becomes E, and so on. “MEET ME AT NOON” turns into “PHHW PH DW QRRQ.” Scrambling a message like this is called encryption. There are two parts to it. The rule is “move each letter along.” The key is the number that says how far: here, 3.

這裡有一個方法,是凱撒用過的。把每個字母在字母表上往後移三格:A 變成 D,B 變成 E,依此類推。「MEET ME AT NOON」就變成「PHHW PH DW QRRQ」。像這樣把訊息打亂,叫做加密(encryption)。它有兩個部分。規則是「把每個字母往後移」。金鑰(key)是說明要移幾格的那個數:這裡是 3。

Your friend knows the key, so your friend moves every letter back three places and reads the message. That is decryption. The watcher in the middle sees the same letters, but without the key they mean nothing. Notice what has to be secret. It is not the rule. Everyone can know the rule. Only the key must be kept between the two of you, and you must both have exactly the same one.

你的朋友知道金鑰,所以把每個字母往回移三格,就讀到訊息了。這叫解密(decryption)。中間偷看的人看到的是同樣那些字母,可是沒有金鑰,它們毫無意義。注意到底是什麼要保密。不是規則——規則誰都可以知道。只有金鑰必須留在你們兩人之間,而且兩個人拿的必須一模一樣。

Caesar’s lock has a weakness. There are only 25 possible keys. A watcher can simply try them all, one after another, until the message makes sense. So the safety of a lock depends on how many keys there are. A computer’s key is a number written in bits, and you saw in Lesson 1 that every extra bit doubles the count. A standard method used today has keys of 128, 192, or 256 bits. A key of 128 bits can be any one of a number of keys that is 39 digits long.

凱撒的鎖有一個弱點:金鑰只有 25 種可能。偷看的人只要一把一把全部試過,試到訊息讀得通為止。所以一把鎖安不安全,要看金鑰有幾把。電腦的金鑰是用位元寫成的數,而第一課說過,每多一個位元,數目就加倍。今天有一種標準的加密方法,金鑰是 128、192 或 256 個位元。128 個位元的金鑰,可能的數目是一個 39 位數。

One puzzle remains. How can two computers that have never met agree on a key, when the watcher hears everything they say? In 1976, two researchers, Whitfield Diffie and Martin Hellman, described a way. Each side has two keys. One is published for everyone to use for locking. The other is kept secret and is the only one that unlocks. Anyone can send you a locked message, and only you can open it.

還剩下一個難題。兩台從來沒見過面的電腦,要怎麼約好一把金鑰?它們說的每一句話,偷看的人都聽得到。1976 年,兩位研究者迪菲(Whitfield Diffie)和赫爾曼(Martin Hellman)提出了一個辦法。每一方都有兩把金鑰。一把公開,讓所有人用來上鎖;另一把自己留著,只有它能開鎖。任何人都可以送一則上了鎖的訊息給你,而只有你打得開。

You use all this every day. When a web address begins with https, the browser and the server are encrypting everything they send to each other. The machines in between see only scrambled data. But remember what encryption does and does not do. It keeps the message private on the way. It cannot tell you whether the person at the other end is honest, and it cannot help if you give your password to the wrong person.

這些東西你每天都在用。網址開頭是 https 的時候,瀏覽器和伺服器會把它們互相傳送的一切都加密。中途的機器只看得到打亂的資料。不過要記得加密能做什麼、不能做什麼。它讓訊息在路上不被別人看懂。它沒辦法告訴你另一頭的人是不是誠實,而如果你把密碼交給了不該給的人,它也幫不上忙。
Read aloud · 課文朗讀

Questions · 閱讀理解

In Caesar’s cipher, what is the rule and what is the key? Which one must be kept secret?

The rule is to move every letter along the alphabet. The key is the number that says how many places. The rule can be known to everyone; only the key must be secret.

Why is a cipher with only 25 keys not safe?

Someone who catches the message can try all 25 keys one after another until the message makes sense. A lock is safe only when there are far too many keys to try.

What does https at the start of a web address tell you, and what does it not tell you?

It tells you that the browser and the server encrypt what they send to each other, so the machines in between cannot read it. It does not tell you whether the one at the other end is honest.

Words & Phrases · 生字及片語

secret(n.)祕密Can you keep a secret?你守得住祕密嗎?key(n.)金鑰;鑰匙Only someone with the key can read the message.只有拿著金鑰的人才讀得懂這則訊息。encrypt(v.)加密The browser encrypts the data before it is sent.瀏覽器在送出資料之前先把它加密。decrypt(v.)解密Your friend uses the same key to decrypt it.你的朋友用同一把金鑰把它解密。scramble(v.)打亂The letters were scrambled, so nobody could read the note.字母被打亂了,所以沒有人讀得懂那張紙條。private(adj.)私人的;不公開的This is a private message, not for everyone.這是一則私人訊息,不是給所有人看的。protect(v.)保護A long key protects the message better.金鑰越長,把訊息保護得越好。break(v.)破解;打破It took only a minute to break the simple code.破解那個簡單的密碼只花了一分鐘。

Quick Check · 小測驗

1. What does encryption do to a message?

2. In Caesar’s cipher with the key 3, what does A become?

3. What must be kept secret?

4. Why is Caesar’s cipher easy to break?

5. According to the reading, what does https NOT tell you?

Try It in the Model · 在模型裡試試

Four ways to send the same message 同一則訊息的四種送法

Then choose your own key with the plus and minus buttons, and send each of the three messages.
接著用加號和減號選一把自己的金鑰,把三則訊息各送一次。

With no lock不上鎖

The watcher reads every word · 偷看的人每個字都讀到

The message goes as you wrote it. Compare the three boxes when it arrives. Who knows the secret now?
訊息照你寫的原樣送出去。送到的時候比一比三個格子:現在有誰知道這個祕密?

Locked with the key 3用金鑰 3 上鎖

The watcher gets PHHW PH DW QRRQ · 偷看的人拿到 PHHW PH DW QRRQ

The watcher still gets the message. What is different about what the watcher has?
偷看的人還是拿到了訊息。他拿到的東西有什麼不一樣?

The wrong key拿錯金鑰

Locked with 3, opened with 4 · 用 3 上鎖,用 4 開

Your friend’s key is off by just one. How close to the real message is the result?
朋友的金鑰只差了一。解出來的東西,離真正的訊息有多近?

The watcher tries every key偷看的人一把一把試

Broken on the third try · 試到第三把就破了

The watcher has no key, but has patience. How many tries does it take? What would it take with the key 25?
偷看的人沒有金鑰,可是有耐心。他試了幾把?如果金鑰是 25 呢?

Try It · 自己試試

Lock and Unlock a Message 自己加密、解密

Type a message in English and move the slider to choose a key. The two rows of letters show the rule: each letter in the top row becomes the one below it. Then switch to Unlock: the scrambled text moves up into the box, and the same key turns it back.
用英文打一則訊息,拉動滑桿選一把金鑰。那兩排字母就是規則:上面一排的每個字母,變成它正下方的那一個。接著切到「解密」:打亂的文字會移到上面的格子裡,同一把金鑰把它變回來。

Result · 結果

Only the 26 English letters are moved. Spaces, numbers, punctuation, and Chinese characters stay as they are. Nothing you type here is sent anywhere. And do not use this for a real secret: you are about to see how quickly it can be broken.只有 26 個英文字母會被移動;空白、數字、標點和中文都原樣不動。你在這裡打的東西不會送到任何地方。還有,不要拿它來保護真正的祕密:你馬上就會看到,它多快就被破解。

  • Set the key to 13 and lock a word. Then lock the result again with 13. What happens, and why?把金鑰設成 13,把一個字加密。再把結果用 13 加密一次。發生了什麼事?為什麼?
  • Write a note to a friend with a key you agreed on in person. Pass it through two classmates.和朋友當面約好一把金鑰,寫一張紙條給他,請兩位同學幫忙傳過去。
  • Locking with 2 and then with 3 is the same as locking once with 5. Two weak locks do not make a strong one.先用 2 加密、再用 3 加密,和直接用 5 加密一次是一樣的。兩把弱的鎖,不會變成一把強的鎖。

Game · 小遊戲

Be the Watcher 換你當偷看的人

Now change sides. You have caught three locked messages, and you do not know the key to any of them. But you know the rule, and there are only 25 keys. Each message is shown with every key tried. Find the line that is real English.
現在換邊。你攔到三則上了鎖的訊息,每一則的金鑰你都不知道。可是你知道規則,而金鑰只有 25 把。每一則訊息都把 25 把金鑰試過的結果列出來。找出真正是英文的那一行。

Broken · 破解了 0

    Trying every key like this is called a brute-force attack. It works on any cipher if the keys are few enough. That is the whole reason real keys are so long.像這樣把每一把金鑰都試一遍,叫做暴力破解(brute-force attack)。只要金鑰夠少,它對任何加密方法都有效。真正的金鑰要那麼長,原因就在這裡。

    See Why · 看看為什麼

    How Many Keys Are There? 金鑰有幾把?

    A computer’s key is a number written in bits. Move the slider to make the key longer, and watch how many different keys there could be. Remember that the watcher’s only way in is to try them.
    電腦的金鑰是用位元寫成的數。拉動滑桿把金鑰變長,看看可能的金鑰有幾把。別忘了,偷看的人唯一的辦法就是一把一把試。

    1 bit · 1 個位元256 bits · 256 個位元

    How many different keys there are · 一共有幾把不同的金鑰

    A number with 0 digits · 這個數有幾位數

    These are exact numbers: 2 multiplied by itself once for each bit. The standard called AES uses keys of 128, 192, or 256 bits. We do not say how long trying them all would take, because that depends on the machine. The point is the size of the number.這些都是精確的數字:有幾個位元,就把 2 自己乘幾次。叫做 AES 的那套標準,用的金鑰是 128、192 或 256 個位元。我們不說「全部試完要多久」,因為那要看用什麼機器;重點是這個數有多大。

    Stories Behind Secret Writing · 祕密書寫的故事

    Caesar’s three places, a cipher that undoes itself, a lock anyone can close, and a number with 39 digits 凱撒的三格、會自己解開的加密、誰都能鎖上的鎖、一個 39 位數

    Four short stories about keeping messages private.
    關於「不讓別人看懂訊息」的四個小故事。

    Caesar · 凱撒

    Three places down the alphabet在字母表上往後三格

    According to Britannica, the Roman writer Suetonius describes the cipher that Julius Caesar used in his letters: he replaced each letter with the letter three places down in the alphabet, and for letters at the end, the cipher went back around to the start. Caesar’s successor, Augustus, found this too complicated and replaced each letter with the one right after it. The method is still named after Caesar.
    根據大英百科,羅馬作家蘇埃托尼烏斯(Suetonius)記下了凱撒寫信時用的加密方法:把每個字母換成字母表上往後第三個字母,到了字母表的尾巴就繞回開頭。凱撒的繼承人奧古斯都覺得這樣太複雜,改成把每個字母換成緊接著的下一個。這個方法至今仍以凱撒為名。

    ROT13

    A cipher that undoes itself會自己解開的加密

    There are 26 letters, and 13 is half of 26. So if you shift a message by 13 and then shift it by 13 again, every letter has gone all the way around and is back where it began. Britannica notes that this cipher, called ROT13, has been widely used to protect text against being read by accident, and that it was chosen because applying it twice returns the original. CODE becomes PBQR, and PBQR becomes CODE.
    英文字母有 26 個,13 剛好是 26 的一半。所以把一則訊息移 13 格,再移 13 格,每個字母都繞了一整圈,回到原來的位置。大英百科提到,這種叫 ROT13 的加密一直被廣泛用來避免文字被不小心讀到;選 13,就是因為做兩次會回到原文。CODE 變成 PBQR,PBQR 又變回 CODE。

    1976

    A lock anyone can close誰都能鎖上的鎖

    With a cipher like Caesar’s, the two sides must somehow share one key, and a key that is sent can be caught on the way. Britannica calls what happened in 1976 one of the most inspired insights in the history of the subject: Whitfield Diffie and Martin Hellman proposed that each user keep a decryption key secret and publish an encryption key in a public directory. It was the first discussion of the idea in the open literature. Later it was revealed that James Ellis, Clifford Cocks, and Malcolm Williamson at Britain’s GCHQ had discovered it earlier, in secret.
    用凱撒那樣的加密,兩邊得想辦法拿到同一把金鑰,而送出去的金鑰可能在路上被攔走。大英百科把 1976 年發生的事稱為這門學問史上最有靈感的洞見之一:迪菲和赫爾曼提出,每個使用者把解密的金鑰自己留著,把加密的金鑰放在一份公開的名錄裡。這是公開文獻中第一次討論這個想法。後來才揭露,英國政府通訊總部(GCHQ)的艾利斯(James Ellis)、考克斯(Clifford Cocks)和威廉森(Malcolm Williamson)更早就祕密地發現了它。

    128 bits · 128 個位元

    A number with 39 digits一個 39 位數

    The United States standard called AES says its keys are 128, 192, or 256 bits long. The rest of this card is our own arithmetic. Caesar’s cipher has 25 keys, fewer than 5 bits would give. A key of 128 bits can be any of 340,282,366,920,938,463,463,374,607,431,768,211,456 keys. Each extra bit doubles the number, exactly as each extra switch did in Lesson 1. Trying keys one by one is the slow search from Lesson 10, and a good lock is designed so that there is no quicker way.
    美國一套叫 AES 的標準寫明,它的金鑰長度是 128、192 或 256 個位元。這張卡接下來的部分是我們自己算的。凱撒的加密有 25 把金鑰,比 5 個位元的還少。128 個位元的金鑰,可能的數目是 340,282,366,920,938,463,463,374,607,431,768,211,456 把。每多一個位元,數目就加倍,和第一課每多一個開關一樣。一把一把試金鑰,就是第十課那種慢的找法;好的鎖在設計上,就是要讓人找不到更快的方法。

    Myth vs. Fact · 常見迷思

    Four things people get wrong 四個常見的誤會

    ✗ Myth · 迷思If nobody can see my screen, nobody can see my message.只要沒人看到我的螢幕,就沒人看得到我的訊息。

    ✓ Fact · 事實A message passes through many machines between you and the other person. Without encryption, whoever runs them could read it.訊息在你和對方之間會經過很多台機器。沒有加密的話,管那些機器的人就讀得到。

    ✗ Myth · 迷思A code is safe as long as nobody knows how it works.只要沒人知道密碼是怎麼運作的,它就安全。

    ✓ Fact · 事實Everyone knows how Caesar’s cipher works. Safety has to come from the key, and from there being too many keys to try.凱撒的加密方法人人都知道。安全必須來自金鑰,而且金鑰要多到試不完。

    ✗ Myth · 迷思Once a message is encrypted, it cannot be read by anyone else.訊息一旦加密,別人就一定讀不到。

    ✓ Fact · 事實It depends on the lock. With only 25 keys, a brute-force attack tries them all. Britannica notes that Caesar’s cipher can be broken in other ways too.要看是什麼鎖。金鑰只有 25 把的話,暴力破解把它們全部試一遍就行了。大英百科指出,凱撒的加密還有別的破解方法。

    ✗ Myth · 迷思If the address starts with https, the site can be trusted.網址開頭是 https,這個網站就可以信任。

    ✓ Fact · 事實The letters mean that what travels between you and the server is encrypted. They say nothing about who runs the server or whether what it tells you is true.這幾個字母的意思是:你和伺服器之間傳的東西有加密。它們並沒有說那台伺服器是誰在管,也沒有說它告訴你的事是不是真的。

    Remember It · 記憶口訣

    A secret in a sentence 一句話記住保密

    Public rule, secret key規則公開,金鑰保密

    Everyone may know the method. Nobody else may know the key.
    方法誰都可以知道;金鑰不能讓別人知道。

    Same key at both ends兩邊同一把金鑰

    Off by one, and it is nonsense.
    差一,就是一堆亂碼。

    Few keys, weak lock金鑰少,鎖就弱

    25 keys can all be tried.
    25 把,全部試得完。

    One more bit, twice the keys多一個位元,金鑰多一倍

    That is why real keys are long.
    所以真的金鑰很長。

    Before You Start · 動手之前

    A few reminders 幾個提醒

    • Do not use a letter-shift cipher for anything that really must stay secret. It is a way to learn the idea, not a way to protect yourself.真正必須保密的東西,不要用字母位移來保護。它是用來學道理的,不是用來保護自己的。
    • Never write a real password in a classroom game, on a note, or in a tool on a web page.真正的密碼,絕對不要寫在課堂遊戲裡、紙條上,或網頁上的任何小工具裡。
    • Being “the watcher” is a game with made-up messages. Reading other people’s real messages without permission is wrong, and it may be against the law.「偷看的人」只是用編出來的訊息玩的遊戲。沒有得到同意就去看別人真正的訊息是不對的,也可能違法。
    • Use a school or family computer only with permission.用學校或家裡的電腦要先得到同意。

    Classroom Activity 1 · 課堂活動一

    Pass the Note 傳紙條

    You need · 準備材料

    • Two paper strips for each student, each with the alphabet written along it in evenly spaced letters每人兩條紙條,上面各寫一排間隔相同的字母表
    • Small slips of paper for messages寫訊息用的小紙片
    • A row of five or six students to be “the network”五、六位同學排成一排,當作「網路」

    Steps · 步驟

    1. Two students at opposite ends of the row agree on a key in a whisper. To use it, slide one alphabet strip along the other by that many letters.坐在那一排兩端的兩位同學,小聲約好一把金鑰。使用的方法:把一條字母表沿著另一條滑過那麼多格。
    2. The sender writes a short English message, encrypts it with the strips, and passes the slip along the row.送訊息的同學寫一句短短的英文,用紙條把它加密,再把紙片沿著那一排傳過去。
    3. One student in the middle is the watcher and may copy the slip before passing it on. The receiver decrypts it and reads it aloud.中間有一位同學是偷看的人,可以先把紙片抄下來再往下傳。收訊息的同學把它解密,大聲唸出來。
    4. Now give the watcher two minutes and a pair of strips. Can the watcher find the key by trying them one by one?接著給偷看的人兩分鐘和一組紙條。他能不能一把一把試,把金鑰找出來?

    Talk about the whisper. How did the two ends agree on the key without the watcher hearing? In a real network there is no whisper, which is the puzzle that public-key cryptography solved. In Taiwan’s junior high Information Technology curriculum, this lesson matches the topic “Information technology and human society”: 資 H-IV-1, protecting personal data, and 資 H-IV-3, information security.
    和學生談談那句「小聲約好」。兩端是怎麼不讓偷看的人聽到就約好金鑰的?真的網路上沒有辦法小聲說,這正是公開金鑰密碼學解決的難題。對照十二年國教國中「資訊科技」的學習內容,這一課對應「資訊科技與人類社會」主題:資 H-IV-1 個人資料保護、資 H-IV-3 資訊安全。

    Classroom Activity 2 · 課堂活動二

    Check It on Your Own Computer 在自己的電腦上驗證

    You need · 準備材料

    • A computer or phone with a web browser一台有瀏覽器的電腦或手機
    • The “Lock and Unlock a Message” tool on this page這一頁的「自己加密、解密」小工具
    • Paper and a pencil紙和鉛筆

    Steps · 步驟

    1. Look at the address of this page. Does it begin with https? Write down the first five letters.看看這一頁的網址。開頭是 https 嗎?把前五個字母寫下來。
    2. Visit three other sites you use for school. Write down whether each address begins with https.再看三個你上課會用到的網站。把每個網址的開頭是不是 https 記下來。
    3. In the tool, lock the word CODE with the key 13. Then lock the result with 13 again. What do you get?在小工具裡,用金鑰 13 把 CODE 這個字加密。再把結果用 13 加密一次。你得到什麼?
    4. Lock your own first name with a key of your choice. Give the result to a partner and see how long it takes them to break it.用你自己選的金鑰把你的名字(英文)加密,把結果交給同伴,看他多久能破解。

    CODE becomes PBQR, and PBQR becomes CODE again. On a phone the address may be partly hidden; tap the address bar to see all of it. An address beginning with https means the connection is encrypted. It is not a promise about the site itself.
    CODE 會變成 PBQR,PBQR 又變回 CODE。手機上的網址可能只顯示一部分,點一下網址列就看得到完整的。網址開頭是 https,表示連線有加密;它並不是對這個網站本身的保證。

    Sources · 資料出處

    Facts on this page were checked against these sources (October 2026); the model uses Caesar’s cipher only as an illustration, and every message is tested · 本頁的事實依下列資料查證(2026 年 10 月);模型只是拿凱撒的加密來示意,每一則訊息都有測試

    1. Cryptography is the “practice of the enciphering and deciphering of messages in secret code in order to render them unintelligible to all but the intended receiver”密碼學是用祕密的代碼把訊息加密與解密,使它除了預定的收訊者之外沒有人看得懂The Editors of Encyclopaedia Britannica, “cryptography” (revised by William L. Hosch) ↗
    2. In a Caesar cipher each letter is replaced by a letter a fixed number of positions away; with a shift of four, CIPHER becomes GMTLIV; Suetonius describes Julius Caesar replacing each letter with the one three places down, cycling back at the end; Augustus used a shift of one; ROT13 “was chosen because applying the same cipher twice returns the original text,” and CODE becomes PBQR; “The Caesar cipher allows only 25 different encryptions,” so a brute-force method can try all 25 shifts; it is also open to frequency analysis; a shift of two followed by a shift of three is the same as a shift of five凱撒密碼把每個字母換成固定距離外的另一個字母;位移 4 時 CIPHER 變成 GMTLIV;蘇埃托尼烏斯記載凱撒把每個字母換成往後第三個、到尾巴繞回開頭;奧古斯都用的位移是 1;ROT13 被選用是因為做兩次會回到原文,CODE 變成 PBQR;凱撒密碼只有 25 種不同的加密,所以可以用暴力法把 25 種位移全試一遍;它也擋不住頻率分析;先移 2 再移 3 等於移 5Sanat Pai Raikar, “Caesar cipher,” Encyclopaedia Britannica ↗
    3. In 1976 Whitfield Diffie and Martin Hellman “proposed that each user keep his decryption key secret and publish his encryption key in a public directory”; “This was the first discussion of two-key cryptography in the open literature”; it had been discovered earlier at GCHQ by James Ellis, Clifford Cocks, and Malcolm Williamson1976 年迪菲與赫爾曼提出,每個使用者把解密金鑰保密、把加密金鑰放在公開的名錄裡;這是公開文獻中第一次討論雙金鑰密碼學;英國政府通訊總部的艾利斯、考克斯、威廉森更早就發現了Gustavus J. Simmons, “public-key cryptography,” Encyclopaedia Britannica ↗
    4. “The AES algorithm is capable of using cryptographic keys of 128, 192, and 256 bits”AES 演算法可以使用 128、192、256 個位元的密碼金鑰NIST, FIPS 197, “Advanced Encryption Standard (AES)” ↗
    5. “HTTPS (HyperText Transfer Protocol Secure) is an encrypted version of the HTTP protocol. It uses TLS to encrypt all communication between a client and a server”HTTPS 是 HTTP 協定的加密版本,用 TLS 把用戶端和伺服器之間的所有通訊加密MDN Web Docs, “HTTPS” ↗
    6. “Encryption can protect data as it travels across networks, including data divided into packets for transmission over the Internet”加密可以保護在網路上傳送的資料,包括切成封包在網際網路上傳輸的資料The Editors of Encyclopaedia Britannica, “computer security” ↗
    7. 資 H-IV-1, protecting personal data; 資 H-IV-3, information security, whose notes list protecting data and protecting communications (p. 11; notes on p. 44)資 H-IV-1 個人資料保護;資 H-IV-3 資訊安全(說明列有「資料安全防護」「通訊安全防護」)(第 11 頁;附錄三的說明在第 44 頁)教育部《十二年國民基本教育課程綱要 國民中學暨普通型高級中等學校 科技領域》(2018) ↗
    8. Taiwan terms: plaintext 明文, ciphertext 密文, public key 公開金鑰, cryptography 密碼學 (K–12 information terms and computer science terms)台灣用語:plaintext 明文、ciphertext 密文、public key 公開金鑰、cryptography 密碼學(高中以下資訊名詞、電子計算機名詞)國家教育研究院《樂詞網》 ↗
    9. The model and the numbers: with the key 3, MEET ME AT NOON becomes PHHW PH DW QRRQ, and opening that with the key 4 gives LDDS LD ZS MNNM; every message locks and unlocks exactly with all 25 keys; 5 bits give 32 keys; 2 to the 128th power is 340,282,366,920,938,463,463,374,607,431,768,211,456, a number of 39 digits; 2 to the 256th power has 78 digits模型與數字:用金鑰 3,MEET ME AT NOON 變成 PHHW PH DW QRRQ;用金鑰 4 去開會得到 LDDS LD ZS MNNM;每一則訊息用 25 把金鑰加密再解密都和原文一模一樣;5 個位元有 32 把金鑰;2 的 128 次方是 340,282,366,920,938,463,463,374,607,431,768,211,456,一個 39 位數;2 的 256 次方有 78 位數Our own arithmetic, checked by tools/computers/test/cipher.test.mjs ↗