Unit 6: Cryptographic Protocols - Practice Quiz

MTH381 — Number Theory And Cryptography 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the primary output of a cryptographic hash function?

hash functions and data integrity Easy
A. A random session token
B. An encrypted message
C. A variable-size key
D. A fixed-size digest

2 Hash functions are commonly used to verify which property of data?

hash functions and data integrity Easy
A. Compression ratio
B. Confidentiality
C. Availability
D. Integrity

3 Which of the following is a well-known cryptographic hash function?

hash functions and data integrity Easy
A. AES-128
B. DES-56
C. RSA-2048
D. SHA-256

4 A small change in the input of a good hash function should cause what change in the output?

hash functions and data integrity Easy
A. A predictable shift
B. A single-bit change
C. No change at all
D. A large, unpredictable change

5 Which property means it is hard to find two different inputs that produce the same hash?

security of hash functions Easy
A. Preimage resistance
B. Confidentiality
C. Non-repudiation
D. Collision resistance

6 Given a hash value , the difficulty of finding any input such that is called what?

security of hash functions Easy
A. Second preimage resistance
B. Collision resistance
C. Preimage resistance
D. Key resistance

7 Second preimage resistance means that given an input , it is hard to find:

security of hash functions Easy
A. The original input
B. The secret key used
C. Two inputs with different hashes
D. A different input with

8 Which attack exploits the mathematics behind finding hash collisions more efficiently?

security of hash functions Easy
A. Birthday attack
B. Man-in-the-middle attack
C. Replay attack
D. Brute-force key search

9 Which older hash function is now considered insecure due to practical collision attacks?

security of hash functions Easy
A. SHA-3
B. SHA-256
C. BLAKE2
D. MD5

10 What does a Message Authentication Code (MAC) primarily provide?

message authentication codes Easy
A. Compression only
B. Integrity and authenticity
C. Non-repudiation to third parties
D. Confidentiality only

11 What input, besides the message, does a MAC algorithm require?

message authentication codes Easy
A. A random nonce only
B. A public key
C. A digital certificate
D. A secret key

12 Which of the following is a MAC constructed from a hash function?

message authentication codes Easy
A. RSA
B. ECDSA
C. HMAC
D. Diffie-Hellman

13 Why can a MAC not provide non-repudiation on its own?

message authentication codes Easy
A. It uses a public key
B. It only hashes the message
C. Both parties share the same secret key
D. It has no key

14 A MAC is also commonly referred to as a:

message authentication codes Easy
A. Block cipher
B. Session cookie
C. Public certificate
D. Keyed hash

15 In a digital signature scheme, which key is used to create the signature?

digital signatures Easy
A. The receiver's private key
B. A shared secret key
C. The signer's public key
D. The signer's private key

16 Which key is used to verify a digital signature?

digital signatures Easy
A. A shared symmetric key
B. The signer's private key
C. The verifier's private key
D. The signer's public key

17 Which of the following is a widely used digital signature algorithm?

digital signatures Easy
A. SHA-1
B. AES
C. RSA
D. HMAC

18 Before signing, a message is usually first processed by which function for efficiency?

digital signatures Easy
A. An encryption cipher
B. A hash function
C. A key exchange protocol
D. A compression codec only

19 Which property ensures a signer cannot later deny having signed a message?

security requirements for signature schemes Easy
A. Availability
B. Anonymity
C. Non-repudiation
D. Confidentiality

20 A secure signature scheme should resist which of the following?

security requirements for signature schemes Easy
A. Forgery of signatures
B. Data hashing
C. Message compression
D. Key exchange

21 A file-sharing service publishes a cryptographic hash alongside each downloadable file so users can verify integrity. If an attacker modifies the file but cannot alter the published hash, which property ensures the tampering is detected?

hash functions and data integrity Medium
A. The avalanche effect, where a small input change drastically changes the output
B. The one-way property preventing input recovery
C. The compression property reducing input size
D. The fixed-length property of the hash output

22 A hash function maps inputs of arbitrary length to outputs of bits. What is the size of the output space?

hash functions and data integrity Medium
A.
B.
C.
D.

23 Which of the following is NOT a required property of a cryptographic hash function used for data integrity?

hash functions and data integrity Medium
A. Second-preimage resistance
B. Reversibility, allowing the original message to be recovered from the hash
C. Preimage resistance
D. Collision resistance

24 Due to the birthday paradox, roughly how many hash evaluations are needed to find a collision in a hash function with an -bit output?

security of hash functions Medium
A. About
B. About
C. About
D. About

25 An attacker is given a hash value and must find any message such that . Which security property directly resists this attack?

security of hash functions Medium
A. Avalanche resistance
B. Collision resistance
C. Preimage resistance
D. Second-preimage resistance

26 Suppose a specific message is fixed and an attacker tries to find a different with . Which property is being attacked?

security of hash functions Medium
A. Collision resistance
B. Second-preimage resistance
C. Preimage resistance
D. Key resistance

27 Why are hash functions such as MD5 and SHA-1 considered insecure for modern applications?

security of hash functions Medium
A. Practical collision attacks against them have been demonstrated
B. Their outputs are too long to store efficiently
C. They require a secret key that is easily leaked
D. They cannot process messages longer than MB

28 If collision resistance holds for a hash function, which of the following is guaranteed?

security of hash functions Medium
A. Preimage resistance is impossible
B. The function is reversible
C. Second-preimage resistance also holds
D. The output length must be variable

29 What is the primary security goal provided by a Message Authentication Code (MAC) that a plain hash function alone does not provide?

message authentication codes Medium
A. Compression of the message to a fixed size
B. Authentication of the message origin using a shared secret key
C. Encryption of the message content
D. Non-repudiation to a third party

30 In the HMAC construction , why is the hash function applied twice?

message authentication codes Medium
A. To double the length of the final output
B. To avoid the need for a secret key
C. To allow encryption of the message
D. To defend against length-extension attacks on the underlying hash

31 Why is the naive MAC construction using a Merkle–Damgård hash considered insecure?

message authentication codes Medium
A. It cannot handle binary messages
B. It requires two keys instead of one
C. It produces variable-length tags
D. It is vulnerable to a length-extension attack

32 Two parties share a secret key and exchange MACs to authenticate messages. Which security guarantee is NOT provided by a MAC?

message authentication codes Medium
A. Origin authentication between the two parties
B. Non-repudiation to a third party
C. Message integrity
D. Detection of message tampering

33 A MAC scheme is said to be secure if an adversary cannot achieve which of the following?

message authentication codes Medium
A. Recovery of the message from its tag
B. Generation of random keys
C. Existential forgery of a valid tag for a new message
D. Compression of the message length

34 In a standard digital signature scheme, which key is used to create a signature and which is used to verify it?

digital signatures Medium
A. Sign and verify both with a shared secret key
B. Sign with the public key, verify with the private key
C. Sign and verify both with the private key
D. Sign with the private key, verify with the public key

35 In RSA signatures, a message hash is signed as . How does a verifier check the signature?

digital signatures Medium
A. Compute and compare it to
B. Decrypt with the signer's private key
C. Compute and compare it to
D. Compute and compare it to

36 Why is a message typically hashed before being signed rather than signing the full message directly?

digital signatures Medium
A. To share the signing key more easily
B. To encrypt the message before transmission
C. To make the signature reversible
D. To sign a fixed-size digest, improving efficiency and enabling arbitrary message lengths

37 Which property do digital signatures provide that symmetric MACs do not?

digital signatures Medium
A. Non-repudiation
B. Message integrity
C. Fixed-length output
D. Fast verification

38 The standard security definition for signature schemes requires resistance to which type of attack?

security requirements for signature schemes Medium
A. Brute-force key recovery only
B. Replay attacks on the network layer
C. Timing side-channel attacks only
D. Existential forgery under adaptive chosen-message attack

39 Textbook RSA signatures without hashing are vulnerable to a forgery based on which mathematical property?

security requirements for signature schemes Medium
A. Commutativity of XOR
B. Multiplicativity:
C. Associativity of hashing
D. Additivity of the modulus

40 In a signature scheme, what does an "existential forgery" specifically mean?

security requirements for signature schemes Medium
A. The adversary recovers the signer's private key
B. The adversary decrypts an encrypted message
C. The adversary forges signatures for every possible message
D. The adversary produces a valid signature for at least one new message of their choosing

41 A hash function produces -bit outputs. Due to the birthday paradox, the expected number of random inputs needed to find a collision with probability is closest to which value?

security of hash functions Hard
A.
B.
C.
D.

42 Which relationship between hash-function security properties is correct?

security of hash functions Hard
A. Second-preimage resistance implies preimage resistance
B. Preimage resistance implies collision resistance
C. Collision resistance implies second-preimage resistance
D. Collision resistance implies preimage resistance for all functions

43 Why is the naive construction using a Merkle–Damgård hash insecure?

message authentication codes Hard
A. It produces outputs that are trivially invertible
B. It cannot process messages longer than the block size
C. It is vulnerable to a length-extension attack allowing forgery on
D. It leaks the key directly in the output

44 HMAC is defined as . What is the primary security benefit of the nested (two-pass) structure?

message authentication codes Hard
A. It allows the key to be recovered for auditing
B. It removes the need for the underlying hash to be collision resistant at all
C. It makes the MAC output shorter than the hash output
D. It defeats length-extension attacks and reduces security to properties of the compression function

45 In textbook RSA signatures, . Given valid signatures on messages , an attacker can forge a signature on which message without the private key?

digital signatures Hard
A. , with signature
B. , with signature
C. No forgery is ever possible against textbook RSA
D. , with signature

46 A signature scheme is EUF-CMA secure. Which statement precisely describes what the adversary must achieve to break it?

security requirements for signature schemes Hard
A. Recover the signer's private key from public parameters
B. Produce two different messages with the same signature
C. Distinguish a real signature from a random string
D. Produce a valid signature on a message never queried to the signing oracle

47 In ECDSA/DSA, reusing the same per-signature nonce for two different messages allows an attacker to recover which secret?

digital signatures Hard
A. The signer's long-term private key
B. The modulus
C. The hash function's initialization vector
D. The public key only

48 A file's integrity is protected by publishing over an insecure channel where an attacker can modify both and the stored digest. What property is actually required for meaningful protection here?

hash functions and data integrity Hard
A. The hash must be preimage resistant only
B. The digest channel must be authenticated; the hash alone provides no integrity if the attacker controls both
C. The hash must be a keyed function using the file contents as the key
D. The hash output length must exceed the message length

49 The 'random oracle model' is often used in security proofs. Which is the most accurate critique of relying on it?

security of hash functions Hard
A. It requires the hash output to be shorter than the input
B. No real hash function is a true random oracle, so ROM proofs are heuristic and can be uninstantiable
C. It only applies to symmetric encryption, not hashing
D. It makes proofs impossible to construct

50 Consider verifying a MAC by comparing bytes with an early-exit comparison (returns as soon as a mismatch is found). What vulnerability does this introduce?

message authentication codes Hard
A. A key-recovery attack via collisions
B. A replay attack across sessions
C. A length-extension attack on the tag
D. A timing side channel that lets an attacker forge tags byte-by-byte

51 In the 'hash-then-sign' paradigm, why must the hash function be collision resistant for the overall signature to be secure?

digital signatures Hard
A. A collision turns a legitimate signature on into a valid signature on
B. Collisions let the attacker recover the private exponent
C. Collision resistance is needed to keep the signature short
D. Collisions allow decryption of the message

52 Which attack model is the STRONGEST (hardest to resist), such that security under it implies security under the others?

security requirements for signature schemes Hard
A. No-message attack aiming at universal forgery
B. Key-only attack aiming at selective forgery
C. Adaptive chosen-message attack aiming at existential forgery
D. Known-message attack aiming at total break

53 A Merkle tree is used to verify integrity of a large dataset split into leaves. What is the size of the authentication path (proof) that a verifier needs to check a single leaf?

hash functions and data integrity Hard
A. hash values
B. hash values regardless of
C. hash values
D. hash values

54 A MAC provides authentication but a plain digital signature additionally provides which property that a symmetric MAC cannot?

message authentication codes Hard
A. Faster verification than any MAC
B. Non-repudiation, since only the signer holds the private key
C. Resistance to replay attacks by default
D. Confidentiality of the message

55 An attacker performs a precomputation of hash values stored in a table to invert a -bit hash. Why does this classic time–memory tradeoff fail against modern password hashing?

security of hash functions Hard
A. The hash output becomes shorter than the table
B. Salts increase the collision probability to
C. Per-user salts make precomputed tables useless because each password uses a distinct hash instance
D. The table cannot store 128-bit values

56 RSA-PSS is preferred over deterministic PKCS#1 v1.5 signatures primarily because:

digital signatures Hard
A. It avoids using a hash function entirely
B. It has a tight security reduction to the RSA problem in the random oracle model via randomized padding
C. It produces shorter signatures
D. It allows signature verification without the public key

57 Consider a signature scheme that is EUF-CMA secure but malleable: given a valid an attacker can produce with also valid. Is this a violation of EUF-CMA?

security requirements for signature schemes Hard
A. Yes, because any new valid signature counts as a forgery
B. No, because the forged signature is on an already-queried message
C. No, because malleability is impossible under EUF-CMA
D. Yes, because differs from

58 CBC-MAC is secure for fixed-length messages but insecure for variable-length messages. What is the core reason?

message authentication codes Hard
A. The IV is leaked in the tag
B. An attacker can concatenate messages to forge tags because the tag of one message can seed another
C. The block cipher becomes invertible
D. The key length shrinks with message length

59 For a hash with -bit output, which set of expected work factors correctly matches (preimage, second-preimage, collision) resistance under generic attacks?

hash functions and data integrity Hard
A.
B.
C.
D.

60 In the Digital Signature Algorithm (DSA), the verification recomputes and accepts if . What role does the secret nonce play in security?

digital signatures Hard
A. It equals the private key raised to the message hash
B. It only affects verification speed, not security
C. It is published as part of the signature for verification
D. It must be unique and unpredictable per signature; leakage or reuse exposes the private key