Tell the direction of encryption (暗号化) apart from that of decryption (復号), and explain what encryption can and cannot protect.
Distinguish symmetric-key cryptography (共通鍵暗号方式) from public-key cryptography (公開鍵暗号方式) by how the keys are used, which key stays secret, and processing speed.
Explain what hybrid cryptography (ハイブリッド暗号方式) encrypts with which key, and how a hash function (ハッシュ関数) differs from encryption.
Encryption (暗号化) uses a key (鍵) and a fixed procedure to turn data that can be read as is (plaintext, 平文) into data that makes no sense to third parties (ciphertext, 暗号文).
The key is the data that decides the result, so the same procedure with a different key yields different ciphertext. Encryption serves confidentiality (機密性), keeping content unreadable to third parties even if it is intercepted or stolen, and it protects stored data as well as communications.
AnalogyIt is like rewriting a letter with a letter-substitution table agreed with the recipient before posting it. Anyone who peeks on the way cannot make sense of it without the table.
How to rememberThe Japanese word 暗号 joins 暗 (dark, unseen) and 号 (sign). Read it as turning text into signs you can see but not read, the forward direction.
Exam points
ExamEncryption (暗号化) protects the secrecy of the content; it does not stop data from being altered or deleted, and it cannot restore damaged data.
ExamIf a hard disk or files are stored encrypted, someone without the key will struggle to read them even if the PC or storage media is stolen.
Decryption (復号) uses a key to turn ciphertext back into the original plaintext, the reverse of encryption.
Plaintext
Encrypt with a key
Ciphertext
Decrypt with a key
Original plaintext
Decrypting with the correct key turns the ciphertext back into the original plaintext.
3 / 3
Decryption needs the correct key that matches the key used for encryption. The encryption procedure itself is usually public, so whether you can decrypt depends on whether you hold the key. If the key leaks, third parties can decrypt too, which is why key management decides how secure the system is.
AnalogyIt is like looking up the same substitution table in reverse to read the rewritten letter back into its original words.
How to rememberThe 復 in 復号 is the 復 of 復元 (restore) and 復旧 (recover). Think of it as returning ciphertext to its original form.
Exam points
ExamA cipher that shifts letters by adding a number and taking the remainder can be decrypted (復号) by retracing the steps in reverse and subtracting the number that was added. If the result goes negative, add the divisor back.
ExamDecryption uses the key that matches the encryption (暗号化) key, so anyone without that key cannot recover the content even if they obtain the ciphertext.
Mix-upA third party without the key working out the original content from ciphertext is called cryptanalysis (解読), which is distinct from decryption with the legitimate key.
Symmetric-key cryptography (共通鍵暗号方式) uses the same key for encryption and decryption, and the sender and receiver share that key while keeping it secret.
People communicating secretly with each other
Keys needed (1 per pair of people)
How to calculate
2 people
1
2 × 1 ÷ 2
3 people
3
3 × 2 ÷ 2
5 people
10
5 × 4 ÷ 2
n people
n(n−1)/2
Number of possible pairs
Using one key in both directions keeps the mechanism simple, but the key must first reach the other party safely, and this key distribution (鍵配送) is the hard part. Each relationship you want to keep private needs its own key, so every pair of people needs one key. AES is a typical example.
AnalogyThink of a lockbox with two identical keys, one for you and one for your partner. If the key is copied while it is being delivered, anyone can open the box.
How to rememberThe English name, symmetric, gives it away: the key on the sending side mirrors the one on the receiving side, so they are the same key.
Exam points
ExamIf a third party learns the shared key (共通鍵), they can decrypt (復号) with it, so the sender and receiver must keep it secret between themselves.
ExamFor n people to communicate secretly with one another, they need one key per possible pair, n(n−1)/2 keys in all. The number of keys climbs steeply as the group grows.
ExamSymmetric-key cryptography (共通鍵暗号方式) is computationally light, so encryption (暗号化) and decryption run fast. That makes it suited to encrypting large amounts of data.
Public-key cryptography (公開鍵暗号方式) uses a pair of keys, a public key (公開鍵) that can be given to anyone and a private key (秘密鍵) held only by its owner, and data encrypted with one is decrypted with the other.
Receiver creates a public/private key pair
Only the public key is handed out
Sender encrypts with the receiver's public key
Receiver decrypts with their own private key
Only the receiver holds the matching private key, so only the receiver can decrypt.
4 / 4
The public and private keys are generated as a mathematically linked pair, and working out the private key from the public key is practically impossible. The private key never leaves the person who created it, and only the public key is given to others. RSA is a typical example.
AnalogyIt is like handing out many padlocks that anyone can snap shut while keeping the only key yourself. When someone locks a box with one of them and sends it to you, only you can open it.
How to rememberIt is also called asymmetric cryptography: the encryption key and the decryption key do not mirror each other, so they are different keys.
Exam points
ExamTo send content confidentially, encrypt (暗号化) with the receiver's public key and decrypt (復号) with the receiver's private key. The sender's own keys play no part.
ExamIf each person holds one key pair, n people have 2n keys in total, n of which are private keys that stay undisclosed.
ExamAnything encrypted with a private key can be decrypted with the matching public key. Since anyone can obtain the public key, this direction does not keep the content secret.
Hybrid cryptography (ハイブリッド暗号方式) encrypts the message with symmetric-key cryptography (共通鍵暗号方式), encrypts that shared key with the receiver's public key, and sends the two together.
Prepare a shared key
Encrypt the message with the shared key
Encrypt the shared key with the receiver's public key
Receiver recovers the shared key with the private key and decrypts the message
The receiver uses the private key to recover the shared key and decrypt the message, while a third party without the private key cannot get the shared key out.
4 / 4
It combines the speed of symmetric-key cryptography with the easy key handover of public-key cryptography. The slow public-key calculation is needed only for the short shared key, while the bulky message is handled by the fast shared key. Encrypted web traffic (SSL/TLS) is one place it is used.
AnalogyIt is like shipping your belongings in an ordinary locked trunk and enclosing only the trunk key in a small box fastened with the recipient's padlock.
How to rememberJust as a hybrid car switches between its engine and motor depending on the situation, this scheme gives each of the two methods its own job.
Exam points
ExamThe sender encrypts (暗号化) the message with the shared key (共通鍵) and that shared key with the receiver's public key (公開鍵). The private key (秘密鍵) is what the receiver uses to recover the shared key, not something used for encryption.
Mix-upUnlike symmetric-key cryptography (共通鍵暗号方式) on its own, there is no need to deliver the shared key to the other party in advance by some other secure route.
A hash function (ハッシュ関数) derives a fixed-length value, the hash value (ハッシュ値), from data of any length, and the original data cannot be worked out from the hash value.
Input data
Resulting hash value
A short phrase of a few characters
Fixed-length value P
A document of several hundred pages
Value Q, the same length as P
Exactly the same document as above
Q every time
The same document with one character changed
Value R, very different from Q
Even a tiny change in the input changes the hash value drastically. Thanks to this, you can check whether two pieces of data are identical by comparing their short hash values instead of the data itself. SHA-256 is a typical example.
AnalogyIt is like taking a fingerprint of a document. The same document always leaves the same print, but the print cannot tell you what the document says.
How to rememberThe English word hash means to chop finely, as in hash browns. Once chopped, nothing goes back to its original shape.
Exam points
ExamThe same hash function (ハッシュ関数) always gives the same output for the same input. A different function may give a different value for that input, and there is no way to trace back from the value to the input.
ExamA hash value (ハッシュ値) depends on a file's contents, so searching for files with the same hash value finds identical files even if they have been renamed.
ExamComparing hash values reveals that data has been altered, but it cannot prevent the alteration. The tamper detection in a digital signature (デジタル署名), a mark the sender attaches and the receiver checks, relies on the same property.
Detecting tampering and confirming that data is identical
Key points
Encryption (暗号化) turns plaintext into ciphertext to keep the content secret, and decryption (復号) is the reverse step that restores it with the matching key.
When public-key cryptography is used to send content confidentially, it is the receiver's key pair that is used.
The keys third parties must never learn are the shared key in symmetric-key cryptography and the private key in public-key cryptography.
Hybrid cryptography (ハイブリッド暗号方式) uses public-key calculations only to encrypt and decrypt the short shared key.
A hash function (ハッシュ関数) value cannot be reversed, yet identical data always gives the same value, so comparing values exposes tampering and finds files with the same content.