1. Home
  2. Explore
  3. Computer Science
  4. Secret-Key Encryption

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Secret-Key Encryption

  • 20Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Encryption Basics

What is encryption, and what purpose does it serve?

20 questions

  1. 1

    What is encryption, and what purpose does it serve?

    Model answer

    Encryption encodes information to protect it from unauthorized access.

    Explanation

    It transforms information into a coded form so that unauthorized people cannot readily understand it.

  2. 2

    What are plaintext and ciphertext, and how are they related?

    Model answer

    Plaintext is the original information; ciphertext is the encoded form produced from it by encryption.

    Explanation

    Encryption transforms plaintext into ciphertext.

  3. 3

    What does decryption do?

    Model answer

    Decryption reverses encryption by recovering the original plaintext from ciphertext.

    Explanation

    The process converts the encoded information back into its original form.

  4. 4

    What role does a key play in encryption and decryption?

    Model answer

    A key is used to encode plaintext during encryption and to recover plaintext from ciphertext during decryption.

    Explanation

    The encryption and decryption processes use keys to perform their transformations.

  5. 5

    How does secret-key encryption differ from public-key encryption in the keys used?

    Model answer

    Secret-key encryption uses the same key for encryption and decryption, while public-key encryption uses different keys for the two operations.

    Explanation

    The distinction is whether the encryption key and decryption key are identical.

  6. 6

    Why is secret-key encryption also called symmetric-key cryptography?

    Model answer

    It is called symmetric-key cryptography because the same key is used for encryption and decryption.

    Explanation

    The shared key makes the two operations symmetric with respect to the key they use.

  7. 7

    Why is public-key encryption also called asymmetric-key cryptography?

    Model answer

    It is called asymmetric-key cryptography because its encryption and decryption keys are different.

    Explanation

    Unlike secret-key encryption, it does not use one identical key for both operations.

  8. 8

    In the example, which key does the receiver use to decrypt the ciphertext?

    Model answer

    The receiver uses the same key used to encrypt the plaintext: 73 hexadecimal.

    Explanation

    The example demonstrates secret-key encryption, so the same key is used for both operations.

  9. 9

    What does the XOR operation output when its two input bits are the same, and when they differ?

    Model answer

    XOR outputs 0 when the bits are the same and 1 when they differ.

    Explanation

    Thus, the outputs for inputs 00, 01, 10, and 11 are 0, 1, 1, and 0, respectively.

  10. 10

    What is the binary representation of the example key 73 hexadecimal?

    Model answer

    The key 73 hexadecimal is 01110011 in binary.

    Explanation

    The example represents the key as one byte and uses its bits in the XOR operation.

  11. 11

    In the example’s stated character encoding, what hexadecimal byte values are assigned to A, T, C, and K?

    Model answer

    A is 41, T is 54, C is 43, and K is 4B hexadecimal.

    Explanation

    These are the character byte values stated for the example word.

  12. 12

    How is the key applied to the plaintext bytes in the XOR example?

    Model answer

    The one-byte key is repeated, and each plaintext byte is XORed bit by bit with the corresponding key byte.

    Explanation

    Applying the same key byte to each plaintext byte produces the ciphertext bytes.

  13. 13

    What ciphertext bytes result from XORing the example’s ATTACK bytes with the key 73 hexadecimal?

    Model answer

    The ciphertext bytes are 32 27 27 32 30 38 hexadecimal.

    Explanation

    The example XORs each stated plaintext byte with the repeated key byte 73.

  14. 14

    How does XOR with the same key recover the plaintext from the example ciphertext?

    Model answer

    XORing each ciphertext byte with the same key byte reverses the earlier operation and restores the original plaintext bytes.

    Explanation

    The example uses XOR for both encryption and decryption with the same key.

  15. 15

    How could someone recover the key byte in the example if they knew a matching plaintext byte and ciphertext byte?

    Model answer

    They could XOR the plaintext byte with its corresponding ciphertext byte to recover the key byte.

    Explanation

    For the example’s first byte, XORing plaintext 41 with ciphertext 32 gives the key 73 hexadecimal.

  16. 16

    Why is the XOR demonstration described as weak encryption?

    Model answer

    A matching plaintext and ciphertext byte can reveal the key byte; in this example, one such pair reveals the one-byte key.

    Explanation

    The example’s short key makes it easy to recover the key from a known plaintext-and-ciphertext pair.

  17. 17

    What is a stream cipher, as described in the example?

    Model answer

    A stream cipher encrypts information byte by byte, as the example does.

    Explanation

    The example applies the operation to each byte of the plaintext individually.

  18. 18

    What is a block cipher?

    Model answer

    A block cipher encrypts blocks of text rather than processing the information byte by byte.

    Explanation

    The content contrasts block-based encryption with the example’s byte-by-byte stream approach.

  19. 19

    How do practical encryption algorithms differ from the simple XOR demonstration?

    Model answer

    Practical algorithms are more complex and use much longer keys than the simple demonstration.

    Explanation

    The example is presented only to illustrate secret-key encryption, not as a strong practical technique.

  20. 20

    What does the example illustrate about the relationship between key choice and encryption strength?

    Model answer

    A simple operation with a short key can be weak, whereas practical encryption uses more complex methods and longer keys.

    Explanation

    The demonstration’s one-byte key can be recovered from a known plaintext-and-ciphertext pair.

1 of 20
Question 1 of 20

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent