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

  • 25Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Encryption Basics
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is encryption?

Tap to flipClick to flipspace

The process of encoding information to protect it from unauthorized access.

Or swipe the card

25 cards

  1. What is encryption?

    The process of encoding information to protect it from unauthorized access.

  2. What are plaintext and ciphertext?

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

  3. What does decryption do?

    Decryption reverses encryption, transforming ciphertext back into the original plaintext.

  4. What role does a key play in encryption and decryption?

    A key is used with an algorithm to transform plaintext into ciphertext and to recover plaintext from ciphertext.

  5. How do secret-key and public-key encryption differ in their use of keys?

    Secret-key encryption uses the same key for encryption and decryption. Public-key encryption uses different keys for the two operations.

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

    Because the same key is used for both encryption and decryption.

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

    Because its encryption and decryption keys are different.

  8. What is the result of XOR when its two input bits are the same?

    The result is 000.

  9. What is the result of XOR when its two input bits are different?

    The result is 111.

  10. What is the XOR truth table?

    0⊕0=00 \oplus 0 = 00⊕0=0, 0⊕1=10 \oplus 1 = 10⊕1=1, 1⊕0=11 \oplus 0 = 11⊕0=1, and 1⊕1=01 \oplus 1 = 01⊕1=0.

  11. How is XOR used in the simple secret-key encryption example?

    The plaintext bits are XORed with the key bits, bit by bit, to produce ciphertext.

  12. Why can XOR decrypt ciphertext when the same key is used again?

    XORing a value with the same key twice restores the original value: (P⊕K)⊕K=P(P \oplus K) \oplus K = P(P⊕K)⊕K=P.

  13. What ASCII hexadecimal bytes represent the word “attack” in the example?

    The bytes are 414141, 545454, 545454, 414141, 434343, and 4B4B4B in hexadecimal.

  14. What is the example encryption key, and what is its binary representation?

    The key is 737373 in hexadecimal, or 011100110111001101110011 in binary.

  15. What ciphertext byte results from XORing the first plaintext byte, 414141, with key byte 737373?

    41⊕73=3241 \oplus 73 = 3241⊕73=32 in hexadecimal.

  16. What ciphertext byte results from XORing plaintext byte 545454 with key byte 737373?

    54⊕73=2754 \oplus 73 = 2754⊕73=27 in hexadecimal.

  17. What ciphertext byte results from XORing plaintext byte 434343 with key byte 737373?

    43⊕73=3043 \oplus 73 = 3043⊕73=30 in hexadecimal.

  18. What ciphertext byte results from XORing plaintext byte 4B4B4B with key byte 737373?

    4B⊕73=384B \oplus 73 = 384B⊕73=38 in hexadecimal.

  19. What is the full ciphertext for “attack” when each byte is XORed with key 737373?

    The ciphertext bytes are 323232, 272727, 272727, 323232, 303030, and 383838 in hexadecimal.

  20. How does the receiver recover “attack” from the example ciphertext?

    The receiver XORs each ciphertext byte with the same key, 737373 in hexadecimal, recovering the original bytes 414141, 545454, 545454, 414141, 434343, and 4B4B4B.

  21. How can a known plaintext byte and its matching ciphertext byte reveal an XOR key byte?

    XOR the plaintext byte with its corresponding ciphertext byte: P⊕C=KP \oplus C = KP⊕C=K.

  22. Why is the simple XOR example considered weak encryption?

    If an attacker obtains a matching plaintext and ciphertext byte, they can XOR the pair to recover the corresponding key byte.

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

    A cipher that encrypts information a small unit at a time, such as byte by byte.

  24. What is a block cipher?

    A cipher that encrypts data in blocks rather than processing it one byte at a time.

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

    They use more complex operations and longer keys; the XOR example is only a simplified illustration, not a strong encryption technique.

Card 1 of 25
Card 1 of 25

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent