Skip to content

Fundamentals of Encryption and Cipher Methods

頻出~39 min6 terms21 past questions

Goals of this unit

  • 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.
Terms at a glance (6)
TermIn one lineKey usedCan the original data be recovered?
暗号化Turning plaintext into ciphertext that third parties cannot read, using a keyAn encryption key (depends on the scheme)Yes, by decrypting with the correct key
復号Turning ciphertext back into the original plaintext, using a keyThe key that matches the encryption keyIt is the recovery step itself
共通鍵暗号方式A scheme that uses the same key to encrypt and decryptOne key shared by sender and receiverYes
公開鍵暗号方式A scheme that gives a matched public key and private key different rolesA public/private key pairYes
ハイブリッド暗号方式A scheme that encrypts the message with a shared key and that shared key with a public keyA shared key plus the receiver's public and private keysYes
ハッシュ関数A function that derives a fixed-length value from any data and cannot be reversedNone (no key is used)No

Terms

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.

3 past questions on this term 暗号化

Decryption (復号) uses a key to turn ciphertext back into the original plaintext, the reverse of encryption.

  1. Plaintext
  2. Encrypt with a key
  3. Ciphertext
  4. Decrypt with a key
  5. 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.

3 past questions on this term 復号

共通鍵暗号方式Symmetric-key cryptography

Open in glossary 共通鍵暗号方式

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 otherKeys needed (1 per pair of people)How to calculate
2 people12 × 1 ÷ 2
3 people33 × 2 ÷ 2
5 people105 × 4 ÷ 2
n peoplen(n−1)/2Number 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.

3 past questions on this term 共通鍵暗号方式

公開鍵暗号方式Public-key cryptography

Open in glossary 公開鍵暗号方式

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.

  1. Receiver creates a public/private key pair
  2. Only the public key is handed out
  3. Sender encrypts with the receiver's public key
  4. 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.

3 past questions on this term 公開鍵暗号方式

Symmetric-key cryptography vs. Public-key cryptography

AspectSymmetric-key cryptographyPublic-key cryptography
Key differenceKeys for encryption and decryptionThe same keyA matched pair of different keys (public and private)
Handing over keysHard to deliver to the other party safelyEasy, because the public key may be handed out
Key differenceProcessing speedFastSlow
Keys needed for n people (one key pair per person for public-key cryptography)n(n−1)/22n (n of them private keys)
Typical exampleAESRSA

ハイブリッド暗号方式Hybrid cryptography

Open in glossary ハイブリッド暗号方式

Hybrid cryptography (ハイブリッド暗号方式) encrypts the message with symmetric-key cryptography (共通鍵暗号方式), encrypts that shared key with the receiver's public key, and sends the two together.

  1. Prepare a shared key
  2. Encrypt the message with the shared key
  3. Encrypt the shared key with the receiver's public key
  4. 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.

1 past questions on this term ハイブリッド暗号方式

ハッシュ関数Hash function

Open in glossary ハッシュ関数

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 dataResulting hash value
A short phrase of a few charactersFixed-length value P
A document of several hundred pagesValue Q, the same length as P
Exactly the same document as aboveQ every time
The same document with one character changedValue 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.

3 past questions on this term ハッシュ関数

Encryption vs. Hash function

AspectEncryptionHash function
KeyUsedNot used
Key differenceCan the original data be recovered?Yes, by decrypting with the correct keyNo (one-way)
Output lengthVaries with the input lengthFixed, regardless of the input
Main purposeKeeping content secret (confidentiality)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.

Check questions

5 past questions from this unit

Start the check questions

All past questions in this topic