2.3 · Encryption
2.3 · 加密
Making intercepted data useless
让被截获的数据变得毫无用处
Encryption does not stop data being intercepted. It scrambles the data so that whoever intercepts it cannot understand it. Two schemes do this: one shared key, or a public and private pair.
加密并不能阻止数据被截获。它会把数据打乱,使截获者无法理解其内容。有两种实现方式:一个共享密钥,或一对公钥与私钥。
Explainer · 2.3.1
讲解 · 2.3.1
The need for and purpose of encryption
加密的必要性与目的
When data crosses a public network it can be intercepted by an eavesdropper. Encryption uses an algorithm and a key to turn readable plaintext into scrambled ciphertext.
数据在公共网络上传输时,可能被窃听者截获。加密使用一种算法和一个密钥,把可读的明文转换为打乱的密文。
| Encryption does | 加密能做到的 | Encryption does not | 加密做不到的 |
|---|---|---|---|
| make the data meaningless to anyone without the key | 让没有密钥的人无法理解数据,使其毫无意义 | stop the data being intercepted or copied | 阻止数据被截获或复制 |
| let the intended recipient read it, using the key to decrypt it | 让预定的接收者使用密钥将其解密并读取 | prevent a hack, or stop data being stolen | 防止黑客攻击,或阻止数据被盗 |
The most common wrong answer is that encryption “stops data being stolen” or “prevents hacking”. It does neither. The intercepted data is still taken, it is just unreadable without the key. That is the whole purpose.
最常见的错误答案是认为加密"阻止了数据被盗"或"防止了黑客攻击"。事实上两者都不成立。被截获的数据仍然会被拿走,只是在没有密钥的情况下无法被读懂。这正是加密的全部目的。
Try it yourself
动手试试
A simple cipher
一个简单的密码
This is a basic shift cipher, just to show the idea: an algorithm (shift each letter along the alphabet) plus a key (how far to shift). Without the key, the ciphertext means nothing. Real encryption uses far stronger algorithms and keys.
这是一个基础的移位密码,仅用来展示其原理:一个算法(将每个字母在字母表中移动)加上一个密钥(移动多少位)。没有密钥,密文毫无意义。真正的加密所使用的算法和密钥要强得多。
Explainer · 2.3.2
讲解 · 2.3.2
Symmetric and asymmetric encryption
对称加密与非对称加密
| Symmetric | 对称加密 | Asymmetric | 非对称加密 | ||
|---|---|---|---|---|---|
| Keys | 密钥 | one key, used to both encrypt and decrypt | 一个密钥,同时用于加密和解密 | a pair: a public key and a private key, mathematically linked | 一对密钥:一个公钥和一个私钥,数学上相互关联 |
| Who has what | 谁持有什么 | the sender and the recipient both hold the same secret key | 发送方和接收方都持有同一个密钥 | the public key is shared with anyone; the private key is kept secret by its owner | 公钥可以与任何人共享;私钥由其所有者保密 |
| How a message is sent | 消息如何被发送 | encrypt with the shared key, decrypt with the same shared key | 用共享密钥加密,再用同一个共享密钥解密 | encrypt with the recipient’s public key, decrypt with the recipient’s private key | 用接收方的公钥加密,再用接收方的私钥解密 |
| Main weakness | 主要弱点 | the shared key has to be sent to the other person, and could be intercepted on the way (the key distribution problem) | 共享密钥必须发送给对方,途中可能被截获(密钥分发问题) | slower to compute; but no secret key ever has to be sent | 计算速度较慢;但从不需要发送任何秘密密钥 |
For symmetric, say the same key is used for encryption and decryption, not just “a key”. For asymmetric, be exact about direction: the public key encrypts, and only the matching private key decrypts. When a question asks for a comparison, cover both schemes, not just one.
对于对称加密,要说明加密和解密使用的是同一个密钥,而不只是笼统地说"一个密钥"。对于非对称加密,要说清楚方向:公钥用于加密,只有与之匹配的私钥才能解密。当题目要求比较时,要同时涵盖两种方案,而不是只写一种。
Try it yourself
动手试试
Follow the keys
追踪密钥流程
Alice wants to send Bob a private message. Step through each scheme and watch which key does what.
Chloe 想给 Lachlan 发送一条私密消息。逐步演示每种方案,观察每个密钥各自的作用。
Check your understanding
检验你的理解
What does encryption achieve when data is sent over a public network?
当数据在公共网络上传输时,加密能达成什么效果?
Check your understanding
检验你的理解
What is the main weakness of symmetric encryption?
对称加密的主要弱点是什么?
Check your understanding
检验你的理解
In asymmetric encryption, Alice encrypts a message with Bob’s public key. Which key decrypts it?
在非对称加密中,Alice 用 Bob 的公钥加密了一条消息。哪一个密钥能解密它?
Common mistakes
常见错误
2.3.1 / 2.3.2
考官针对 2.3.1 / 2.3.2 报告了以下模式
RecurringCandidates think encryption stops data being stolen or prevents a hack. It does neither. It makes intercepted data unreadable without the key; the intended recipient still decrypts and reads it.
反复出现考生认为加密能阻止数据被窃取或防止黑客攻击。两者都不对。加密只是让被截获的数据在没有密钥的情况下无法读懂;预定的接收者仍然会解密并读取它。
Symmetric is described vaguely as “the data is encrypted with a key”. The point that earns the mark is that the same key encrypts and decrypts, and therefore has to be shared securely.
对称加密被笼统地描述为"数据用一个密钥加密"。真正得分的要点是:同一个密钥既用于加密也用于解密,因此必须被安全地共享。
On comparison questions, candidates give a fact about one scheme only (“symmetric uses one key”) without saying how the other differs (“whereas asymmetric uses a public and a private key”).
在比较类题目中,考生只给出一种方案的事实("对称加密使用一个密钥"),却没有说明另一种方案有何不同("而非对称加密使用一个公钥和一个私钥")。
Wrong purpose: “Encryption is used so that hackers cannot steal the data.”
目的错误:"加密是为了让黑客无法窃取数据。"
Right: “Encryption is used so that if the data is intercepted, it is meaningless to the eavesdropper without the decryption key.”
正确:"加密的作用是,即使数据被截获,窃听者在没有解密密钥的情况下也无法理解其内容。"
Too vague: “Symmetric encryption uses a key to scramble the message.”
过于笼统:"对称加密使用一个密钥把消息打乱。"
Precise: “In symmetric encryption the same key is used to encrypt and to decrypt, so both sender and recipient must have that one key.”
精确:"在对称加密中,同一个密钥既用于加密也用于解密,因此发送方和接收方都必须持有这同一把密钥。"
Revision questions
复习题
Past-paper style. Write an answer, then reveal the marking points and mark yourself.
采用历年真题风格。写下答案,然后展开评分要点给自己打分。
[2]State the purpose of encrypting data before it is transmitted.
[2]陈述在传输数据之前对其进行加密的目的。
Marking points
评分要点
- So that if the data is intercepted, it is meaningless / unreadable to the eavesdropper.
- It can only be read with the correct decryption key, which the eavesdropper does not have.
- 使得如果数据被拦截,它对窃听者毫无意义 / 无法读懂。
- 只有用正确的解密密钥才能读取,而窃听者没有这个密钥。
[3]Describe how symmetric encryption is used to send a message, and give one drawback.
[3]描述如何使用对称加密发送一条消息,并给出一个缺点。
Marking points
评分要点
- The sender encrypts the message with a secret key.
- The same key has been shared with (or is sent securely to) the recipient.
- The recipient decrypts the message with that same key.
- Drawback: the single key has to be shared securely, and if it is intercepted anyone can decrypt the messages.
- 发送方用一个密钥加密消息。
- 同一个密钥已经共享给接收方(或安全地发送给接收方)。
- 接收方用同一个密钥解密消息。
- 缺点:那唯一的密钥必须安全共享,如果被拦截,任何人都能解密这些消息。
[4]Describe how asymmetric encryption uses a public key and a private key to send a confidential message.
[4]描述非对称加密如何利用公钥和私钥来发送一条保密消息。
Marking points
评分要点
- The recipient makes their public key available.
- The sender encrypts the message using the recipient's public key.
- The encrypted message is sent.
- Only the recipient's private key can decrypt it; the private key is never shared, so only the recipient can read the message.
- 接收方公开自己的公钥。
- 发送方使用接收方的公钥加密消息。
- 加密后的消息被发送。
- 只有接收方的私钥能解密它;私钥从不共享,所以只有接收方能读懂消息。
[3]Give three differences between symmetric and asymmetric encryption.
[3]给出对称加密与非对称加密之间的三处不同。
Marking points
评分要点
- Any three: symmetric uses one key, asymmetric uses a pair; symmetric uses the same key to encrypt and decrypt, asymmetric uses the public key to encrypt and the private key to decrypt; symmetric needs the key shared securely, asymmetric never shares the private key; symmetric is faster / less processing, asymmetric is slower / more processing.
- 任选三点:对称用一个密钥,非对称用一对;对称用同一个密钥加解密,非对称用公钥加密、私钥解密;对称需要安全共享密钥,非对称从不共享私钥;对称更快 / 处理量小,非对称更慢 / 处理量大。
[2]A student says “encryption stops hackers stealing my data”. Explain why this statement is not correct.
[2]一位学生说"加密能阻止黑客窃取我的数据"。解释为什么这个说法不正确。
Marking points
评分要点
- Encryption does not stop the data being intercepted or copied; the attacker still takes it.
- It only makes the intercepted data unreadable without the key.
- It also does not stop the system being hacked by other methods (e.g. a stolen password).
- 加密不能阻止数据被拦截或复制;攻击者仍然拿到了它。
- 它只是让被拦截的数据在没有密钥的情况下无法读懂。
- 它也不能阻止系统被其他手段入侵(例如被盗的密码)。
Flashcards
记忆卡片
Active recall for this subtopic’s key terms.
针对本子主题关键术语的主动回忆练习。
Keep this subtopic’s practice with you
把这个子主题的练习保存下来
Free account: unlock every revision question and flashcard for 2.3, and every other IGCSE 0478 statement.
免费账户:解锁 2.3 以及所有其他 IGCSE 0478 考纲陈述的全部复习题和记忆卡片。