Skip to content
KALANBLON
Show contents

Chapter 3 of 6 · 10 min

Quiz: encrypting and authenticating

Keystreams, nonces, ECB mode, malleability and HMAC: check that you can encrypt and authenticate correctly. You need 70% correct answers to pass this quiz.

Quiz

7 questions · pass mark: 70%

  1. 1.What is the role of the nonce in a stream cipher?

    One answer

  2. 2.Must the nonce remain secret?

    One answer

  3. 3.Why should ECB mode be avoided?

    One answer

  4. 4.Two messages were encrypted with the same key and the same nonce. A spy knows the first message. What can they do?

    One answer

  5. 5.What does an HMAC provide that a plain SHA-256 fingerprint does not?

    One answer

  6. 6.Complete the constant-time check of a received signature.

    Complete the code

    import hmac
    if hmac.____(expected, received):
        accept()
  7. 7.Which choices are correct for encrypting data today?

    Several answers possible

Your progress is saved on this device. Create a free account to keep your progress on all your devices.