TD1: Cryptography QCM: Generality
TD1: Cryptography QCM: Generality
Generality
- A) Data compression
- B) Data encryption
- C) Data transmission
- D) Data storage
- A) Secret codes
- C) Manual encryption
- D) Paper-based encryption
- A) DES
- B) AES
- C) RSA
- D) Blowfish
1
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
- A) Encrypting data
- C) Storing passwords
- D) Decrypting data
- C) To authenticate users
2
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
Ciphers
- A) RSA
- B) AES
- C) DSA
- D) ECC
- A) Substitution cipher
- B) Transposition cipher
- C) Hash function
- D) Block cipher
- A) It is very slow
- D) Both B and C
3
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
14. Which cipher uses two keys, one for encryption and another for decryption?
- A) Symmetric cipher
- B) Asymmetric cipher
- C) Transposition cipher
- D) Stream cipher
4
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
17. Which cryptographic technique is used to ensure that a message has not been altered?
- A) Encryption
- B) Decryption
- C) Hashing
- D) Compression
One-Time Pad
5
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
- A) Perfect secrecy
- B) Fast encryption
22. Which of the following is true about the key in a one-time pad?
- B) AES
- C) RSA
- D) DES
6
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
25. What is the main difference between a MAC and a digital signature?
- B) A MAC requires a shared secret, while a digital signature uses a private key
- A) High-speed MAC
- C) Hybrid MAC
- A) Collision resistance
- C) Resistance to forgery
- D) A random key
- A) To encrypt emails
7
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
30. Which property of a MAC ensures that an attacker cannot alter the message without detection?
- A) Non-repudiation
- B) Integrity
- C) Confidentiality
- D) Availability
- A) Symmetric key
- B) Asymmetric key
- C) Public key
- D) No key required
8
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
- C) A form of encryption
37. What is a common method for securely exchanging keys over an insecure channel?
- C) Hash functions
- D) Plaintext transmission
9
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
- C) To encrypt messages
39. Which Python module is used to generate random numbers for OTPs?
- A) hashlib
- B) random
- C) hmac
- D) time
41. In the OTP implementation, how long is the OTP considered valid?
- A) 60 seconds
- B) 90 seconds
- C) 120 seconds
- D) 30 seconds
42. Which function can be used to measure time elapsed for OTP expiration in Python?
- A) random()
- B) time.sleep()
10
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
- C) time.time()
- D) datetime.now()
- A) `random.sample()`
- B) `random.randint()`
- C) `random.shuffle()`
- D) `random.choice()`
- A) An integer
- B) A hexadecimal string
- C) A list
- D) An ASCII code
46. What is the main advantage of using SHA-256 for OTP hashing?
11
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
47. To verify the OTP entered by the user against the hashed OTP, we need to:
- C) To provide confidentiality
- A) hashlib
- B) hmac
- C) random
- D) pyotp
50. What two elements are combined in a MAC for message verification?
12
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
53. When verifying both OTP and MAC, which one should be checked first for best security?
- A) MAC
- B) OTP
- C) Both simultaneously
54. To verify the MAC generated with a hashed OTP, we need to:
55. In the TP, the MAC is generated using which of the following?
13
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
- C) Text-Based OTP
- A) hmac
- B) hashlib
- C) pyotp
- D) random
- A) Every 15 seconds
- B) Every 30 seconds
- C) Every 60 seconds
- D) Every 5 minutes
14
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
60. What is the primary advantage of using TOTP over static OTPs?
61. In a secure OTP and MAC system, which of the following helps prevent replay attacks?
62. Which component ensures the integrity of the message in a secure system?
- A) OTP
- B) MAC
- C) Random number
- A) Hashing algorithms
- D) User-provided OTP
15
Enseignante : Marwa Ben Jabra
Module : Applied Cryptography
65. To make sure OTPs are generated securely, they should be:
16