English narration · English + 中文 subtitles burned in · 英語ナレーション・英語+中文字幕 burning-in
17.1
How encryption works · 暗号化の仕組み
Syllabus · シラバス
English
Candidates should be able to:
Notes and guidance
Show understanding of how encryption works
Including the use of public key, private key, plain text, cipher text, encryption, symmetric key cryptography and asymmetric key cryptography How the keys can be used to send a private message from the public to an individual/organisation How the keys can be used to send a verified message to the public How data is encrypted and decrypted, using symmetric and asymmetric cryptography Purpose, benefits and drawbacks of quantum cryptography
Show awareness of the Secure Socket Layer (SSL) / Transport Layer Security (TLS)
Purpose of SSL/TLS Use of SSL/TLS in client-server communication Situations where the use of SSL/TLS would be appropriate
Show understanding of digital certification
How a digital certificate is acquired How a digital certificate is used to produce digital signatures
Source: Cambridge International syllabus · 出典: Cambridge International シラバス
English
Encryption 加密 turns readable plaintext 明文 (plain text) into unreadable ciphertext 密文 (cipher text) using a maths operation that depends on a key. Only someone with the right key can reverse it — decryption 解密 — to get the plaintext back. An attacker who intercepts the ciphertext without the key sees only meaningless data, because trying every possible key would take far too long. A newer approach, quantum cryptography 量子密码学, uses quantum physics to share a key in a way that reveals any eavesdropper.
Symmetric encryption
Symmetric encryption 对称加密 (symmetric key cryptography) uses the same key for both encryption and decryption, so sender and receiver must both hold the secret key. It is fast and good for bulk data (a whole disk, a video stream). Its problem is key distribution 密钥分发: how do you share the key safely in the first place? Asymmetric encryption solves this.
"Describe what is meant by symmetric key encryption" (two marks).The same key is used to encrypt the plaintext and to decrypt the ciphertext, so the key must be shared between sender and receiver and kept secret from everyone else. Two drawbacks. The key has to be exchanged before the message can be sent, and if it is intercepted in transit the interceptor can read every message; a separate key is needed for every pair of correspondents; and it gives no proof of who sent the message, because both ends hold the same key. "Give two reasons for using key cryptography": so that data is unreadable by anyone who intercepts it (confidentiality); so that the receiver can be sure the data came from the claimed sender and was not altered (authenticity and integrity 完整性). The two methods are symmetric and asymmetric key cryptography.
Asymmetric encryption (public-key)
Asymmetric encryption 非对称加密 (asymmetric key cryptography) gives each user a pair of related keys: a public key 公钥 they publish, and a private key 私钥 they keep secret. Data encrypted with the public key can be decrypted only with the matching private key, and vice versa.
To send a secret message to Alice: get her published public key, encrypt with it, and send. Only Alice — holding the matching private key — can decrypt. No prior key exchange is needed. The trade-off is that it is much slower than symmetric, so it is not used for large data.
"State what is meant by a private key."A key known only to its owner (never transmitted), used to decrypt data that was encrypted with the matching public key, and to create digital signatures."Describe the process of asymmetric encryption" (four marks): (1) the receiver generates a pair of keys, a public key and a private key, mathematically related; (2) the public key is made available to anyone who wants to send to them; (3) the sender encrypts the plaintext with the receiver's public key; (4) the ciphertext can only be decrypted with the receiver's private key, which never leaves the receiver, so nobody who intercepts the message can read it.
Worked example. Fred wants to send Sheila a confidential document. Explain how asymmetric encryption is used.
Sheila has a key pair; she sends Fred her public key (or he obtains it from her certificate). Fred encrypts the document with Sheila's public key and sends the ciphertext. Only Sheila's private key can decrypt it, and only Sheila holds that, so nobody else, including Fred once it is encrypted, can read the document. The keys are used the receiver's way round: her public key to lock, her private key to unlock. An organisation that holds a key pair "to receive secure transmissions" does exactly this: it publishes the public key, keeps the private key, and decrypts what arrives.
Two differences between symmetric and asymmetric encryption. Symmetric uses one key for both directions; asymmetric uses two related keys, one to encrypt and the other to decrypt. In symmetric encryption the key must be kept secret by both parties and exchanged securely; in asymmetric encryption the public key can be published and only the private key is secret. Symmetric encryption is much faster and suits large amounts of data; asymmetric is slower, so it is used for keys and signatures rather than bulk data.
A private key must stay secret, so it is sometimes kept on a small hardware security key 硬件安全密钥. You plug it in or tap it to prove who you are, and the secret key never leaves the device.
Hybrid approach (used by almost every real system)
Use asymmetric encryption to exchange a fresh session key 会话密钥, then use that symmetric key for the data:
the client makes a random session key.
it encrypts the session key with the server's public key.
the server decrypts it with its private key.
both ends now share the session key and use fast symmetric encryption for the rest.
This is how HTTPS and SSH work.
The exam's version of the key-exchange problem. "A symmetric key is to be exchanged before the message is sent. Explain how the key can be exchanged securely." The sender encrypts the symmetric key with the receiver's public key and sends it; the receiver decrypts it with their private key; both now hold the symmetric key, which was never exposed in transit, and use it for the messages. Asymmetric encryption solves the distribution problem; symmetric encryption then does the fast work.
Hashing (related, not encryption)
A cryptographic hash 密码散列 function takes any input and gives a fixed-size digest 摘要 such that the same input always gives the same digest, it is infeasible to find two inputs with the same digest, and a tiny change in input changes the digest completely. Hashing is one-way — you cannot get the input back. It is used for storing password checks, integrity checks, and digital signatures.
Quantum cryptography
Quantum cryptography uses the physics of light to distribute keys: the bits of a key are sent as photons whose quantum states encode the values. "Describe its purpose": to transmit an encryption key securely, in such a way that any attempt to intercept it can be detected, because measuring a photon changes its state; an eavesdropper 窃听者 therefore leaves evidence, and the corrupted key is thrown away and a new one sent. Benefits: interception is always detectable; the key cannot be copied without being altered; it is secure against future advances in computing power (a mathematical key can eventually be cracked, a quantum one cannot be read without disturbing it). Drawbacks: it needs specialised, expensive equipment; it works only over limited distances on dedicated optical fibre (or line of sight), not across the existing internet; it distributes the key only, so ordinary encryption still protects the message; and it is a new technology with few suppliers and little experience.
秘密鍵は secret に keep する必要があるため、時折小さなハードウェアセキュリティキーに kept されることがあります。接続したりタッチしたりして自分自身であることを证明すると、秘密鍵はデバイスから never 離れません。
ハードウェアセキュリティキーは、自分自身であることを証明するための秘密鍵を stored する
ハイブリッドアプローチ(ほぼ全ての実システムで使用)
新しいセッション鍵を exchange するために非対称暗号化を使用し、その後、その対称鍵を使ってデータを transfer する:
クライアントがランダムなセッション鍵を生成する。
セッション鍵をサーバーの公開鍵で暗号化する。
サーバーは自身の秘密鍵で復号する。
両端は now share してセッション鍵を持ち、残りの部分では高速な対称暗号化を使用する。
これが HTTPS と SSH が動作する仕組みである。
試験における鍵交換問題のバージョン。 「メッセージを送信する前に対称鍵を exchange する必要がある。鍵を securely exchange する方法を説明しなさい。」 送信者は対称鍵を受信者の公開鍵で暗号化して送信します;受信者は自身の秘密鍵で復号します;双方 now hold して対称鍵を持ち、これは途中 transmission で never exposed であり、メッセージに use されます。非対称暗号化が distribution 問題を解決し、対称暗号化が subsequent fast work を行う。
A hash is one-way: easy to compute, practically impossible to reverse. A tiny change in the input flips a large, unpredictable part of the output — the avalanche effect that makes hashes good for passwords. · ハッシュは一方向性である:計算は容易だが、逆算は事実上不可能である。入力のわずかな変化が、出力の大きく予測不能な部分を変化させる — ハッシュがパスワードに適している理由である雪崩効果。
Explore · 探索
The Caesar cipher · 凯撒暗号(Caesar cipher)
Shift each letter to encrypt the message. A simple cipher shows the idea of a key — and why a small key is easy to break. · 文字をシフトしてメッセージを暗号化します。簡単な暗号は鍵という概念を示し、なぜ小さな鍵では破読しやすいかを理解できます。
TLS 传输层安全 (Transport Layer Security, the successor to the Secure Socket Layer, SSL) is a protocol that gives encryption and authentication for data sent over a network. It encrypts the data in transit, authenticates the server with a certificate, and provides integrity (detecting tampering).
Outline of a TLS handshake:
the client connects and proposes cipher options.
the server picks one and sends its digital certificate (with its public key) — issuing and validating these certificates is digital certification.
the client checks the certificate.
the two ends exchange a fresh session key using asymmetric crypto.
all later traffic uses fast symmetric encryption with the session key.
The result is an encrypted, authenticated, integrity-checked tunnel for higher-level protocols (HTTP, SMTP). It is appropriate wherever sensitive information is sent: HTTPS web browsing, online banking and payments, secure email, and VPNs.
"Describe the purpose of SSL/TLS" and "state two functions." The purpose is to provide secure communication between a client and a server over a network. Its functions: it encrypts the data sent, so that it cannot be read if intercepted; it authenticates 认证 the server (and optionally the client) by means of a digital certificate, so the client knows it is talking to the genuine site; and it checks the integrity of the data, so that changes in transit are detected. Two examples of where it is appropriate: online banking and online shopping (card payments); also logins, private email, file transfer, VoIP and instant messaging: any transaction in which private data crosses the internet.
The two protocols that make up TLS. The handshake 握手 protocol sets up the session: it agrees the encryption algorithms (cipher suite), authenticates the server with its certificate, and exchanges the session key. The record protocol then carries the data: it encrypts each message with the session key, adds an integrity check, and passes it to the transport layer.
"Explain how SSL/TLS is used when client–server communication is initiated" (six marks). (1) The client (browser) sends a request to the server for a secure connection, saying which encryption methods it supports. (2) The server sends back its digital certificate, which contains its public key. (3) The client checks the certificate is valid (issued by a trusted Certificate Authority, not expired, for the right domain). (4) The client generates a session key, encrypts it with the server's public key and sends it. (5) The server decrypts the session key with its private key. (6) Both sides now hold the session key and all further data is sent using symmetric encryption with it. Give the steps in this order; the marks are for the certificate, the public key, the session key and the switch to symmetric encryption.
「SSL/TLSの目的を説明し、2つの機能を述べよ」。目的は、ネットワークを介してクライアントとサーバー間で** secure communication を提供することです。機能:送信されたデータを暗号化するため、盗聴されても読み取ることができない;デジタル証明書によってサーバー(およびオプションでクライアント)を認証するため、クライアントが正規のサイトと通信していることを確認できる;データの完全性をチェックするため、途中での変更を検知できる。適切な例:オンライン銀行取引とオンラインショッピング**(カード決済);さらにログイン、プライベートメール、ファイル転送、VoIP、インスタントメッセージングなど、プライベートデータがインターネットを横断するあらゆる取引。
Step through what happens before a padlock appears. The slow public-key crypto is used only to agree a shared key; the actual page then travels under fast symmetric encryption. · ロックアイコンが表示される前に何が起こるかを確認します。スローな公開鍵暗号は共有鍵の合意にのみ使われ、実際のページデータは高速な対称暗号によって保護されます。
A digital certificate 数字证书 binds an identity (a domain, an organisation) to a public key, and is signed by a trusted Certificate Authority 证书颁发机构 (CA). It contains the subject (who it identifies), the subject's public key, the issuer (the CA), a validity period, and the CA's signature over all of it.
To verify one, the client (which holds a list of trusted root CAs):
checks the expiry dates.
checks the subject name matches the URL.
checks it is signed by a trusted CA, using the CA's public key to verify the signature.
follows the certificate chain up to a trusted root.
If anything fails, the browser shows the "Your connection is not private" warning. When it verifies cleanly, the client knows the identity was vetted by a trusted CA, the public key really belongs to that identity, and the certificate is current.
"Describe what is meant by a digital certificate" (two marks).An electronic document, issued by a Certificate Authority, that verifies the identity of its owner (a person, organisation or website) and contains the owner's public key.Items found in one: the serial number; the name of the owner (subject) and, for a website, its domain; the owner's public key; the name of the issuing CA; the validity period (dates); the signature algorithm used; and the CA's digital signature of the whole certificate.
"Explain how an organisation acquires a digital certificate" (four marks). (1) The organisation generates its own key pair, a public key and a private key. (2) It sends a request containing its public key and its identity details to a Certificate Authority. (3) The CA verifies the identity (checks that the applicant really is the organisation or owns the domain). (4) The CA creates the certificate containing the public key and the identity, signs it with the CA's own private key, and returns it. (5) The organisation installs the certificate on its server so that it can be sent to clients. The private key never leaves the organisation.
"Explain why a digital certificate is required to validate a digital signature." To check a signature the receiver needs the sender's public key, and needs to be sure that the key really belongs to the claimed sender; the certificate supplies the public key together with the identity, and because the certificate is signed by a trusted CA the receiver can trust that binding. Without it an impostor could publish a public key in someone else's name and sign messages as them. The same reasoning answers "what should be included with a program downloaded from the internet to prove it is genuine": a digital signature, checked against the publisher's certificate.
A digital signature 数字签名 proves who signed a message and that it was not changed. To sign:
compute a cryptographic hash of the message.
encrypt the hash with the sender's private key — that is the signature.
send the message and the signature.
To verify: compute the hash of the received message; decrypt the signature with the sender's public key to get the sender's hash; compare. If they match, the message was signed by the holder of the private key (authentication 身份验证) and was not changed (integrity). A signature does not hide the message — for confidentiality as well, encrypt and sign.
"Explain the role of a digital certificate in creating a digital signature" (three marks). The sender's certificate was issued by a CA and contains the sender's public key together with the sender's identity; the sender produces the signature by hashing the message and encrypting the hash with their private key, the partner of the key in the certificate; the receiver uses the public key from the certificate to decrypt the hash and, because the certificate binds that key to the sender, the signature proves who signed.
"Explain how a digital signature is used to verify a message" (four marks). (1) The receiver decrypts the signature with the sender's public key (taken from the sender's certificate), which yields the hash that the sender computed. (2) The receiver hashes the received message with the same hash algorithm. (3) The two hashes are compared. (4) If they match, the message came from the holder of the private key (authentic) and has not been altered since it was signed (integrity); if they differ, the message is rejected. A banker receiving confidential data with a signature does exactly this before trusting it; the data itself may separately be encrypted with the banker's public key for confidentiality.
Putting it together
A secure request to https://www.bank.com: the server sends its certificate; the client verifies it against trusted CAs; the client uses the server's public key to exchange a session key; then data flows encrypted with that key. Encryption stops eavesdroppers, the certificate proves the server's identity, and integrity checks stop a man-in-the-middle 中间人攻击 altering the data.
Worked example. Alice sends Bob a contract. She wants Bob to be certain it came from her and was not altered, and she wants nobody else to be able to read it. Which keys does she use, and in which direction? These are two different jobs needing two different key pairs. For the signature (authentication and integrity): Alice hashes the contract and encrypts that hash with her own private key; Bob decrypts it with Alice's public key and compares it against his own hash of the message. Only Alice holds her private key, so only she could have produced it. For confidentiality: Alice encrypts the contract itself with Bob's public key, so only Bob's private key can open it. One rule keeps all four straight: you sign with your own private key and encrypt with the recipient's public key. A signature on its own does not hide the message.
** worked example.** アリスがボブに契約書を送る。アリスは、この文書が自分から送られたことと改ざんされていないことをボブに確信させたい。さらに、第三者には読まれないようにしたい。アリスはどの鍵を、どのような方向で使うべきか。これらは2つの異なるタスクであり、2つの異なる鍵ペアが必要である。署名(認証と完全性)のために:アリスは契約書のハッシュを取り、それを自身の秘密鍵で暗号化する;ボブはアリスの公開鍵で復号し、自分のメッセージに対するハッシュと比較する。アリス自身が秘密鍵を持っているのは彼だけなので、彼だけが生成した可能性がある。機密性のために:アリスは契約書そのものをボブの公開鍵で暗号化するため、ボブの秘密鍵のみで開くことができる。4つを区別するための1つのルールがある:「署名は自身の秘密鍵で行い、暗号化は相手の公開鍵で行う」。署名だけではメッセージは隠されない。
Symmetric: one shared secret key, fast, key exchange is the weakness. Asymmetric: public key to encrypt, private key to decrypt, slow, no exchange problem. Two differences, two drawbacks, two reasons: the exam asks for them in pairs.
Confidentiality uses the receiver's keys (public to lock, private to unlock); a signature uses the sender's keys (private to sign, public to check). Say whose key every time.
The TLS start-up is six steps: request, certificate with public key, check, session key encrypted with the public key, decrypted with the private key, symmetric encryption from then on.
A certificate is identity plus public key, signed by a CA; acquisition is key pair, request, verification, signing, installation. It is needed to validate a signature because it proves whose public key it is.
A signature is a hash encrypted with the private key; verification is decrypt, re-hash, compare. Integrity and authenticity are the two things it proves.
Quantum cryptography distributes keys and detects eavesdropping; its limits are cost, distance and novelty.
Common mistakes
Saying a message is encrypted with the sender's public key; the receiver's public key encrypts, the receiver's private key decrypts.
Describing a signature as "encrypting the message with the private key" instead of encrypting its hash.
Claiming a certificate contains the private key; it holds the public key and the identity, signed by the CA.
Listing "the server sends its private key" in the TLS handshake; only the public key travels, inside the certificate.
Giving "SSL/TLS makes the connection faster" as a function; its functions are encryption, authentication and integrity.
Confusing hashing with encryption: a hash cannot be reversed and has no key; encryption is reversible with the key.
Answering "why is a certificate needed for a signature" with "to encrypt it"; it is needed to trust the public key.
Type to search notes, lessons, code, vocabulary and past-paper questions across every subject. · すべての科目でノートImplemented、Implemented、コード、語彙、過去問問題を検索するために入力してください。