-verify takes the public key, while -signature identifies the signature file to check against the message.
Incorrect! Try again.
25A software publisher wants customers to detect both file modification and malicious replacement of the published digest. Which mechanism is most appropriate?
Cryptographic primitives
Medium
A.Publish an unkeyed hash beside the software
B.Sign the software digest with a private key
C.Encode the software using a checksum
D.Encrypt the software using a public key
Correct Answer: Sign the software digest with a private key
Explanation:
A digital signature authenticates the publisher and protects the digest from undetected replacement, assuming users trust the public key.
Incorrect! Try again.
26Why is an HMAC generally more suitable than an unkeyed hash for authenticating messages exchanged by two parties sharing a secret?
Cryptographic primitives
Medium
A.It requires the secret to produce a valid tag
B.It encrypts the message using the shared secret
C.It generates a new public key for every message
D.It prevents the receiver from reading the message
Correct Answer: It requires the secret to produce a valid tag
Explanation:
An HMAC combines a cryptographic hash with a secret key, so an attacker without the key cannot easily forge a valid authentication tag.
Incorrect! Try again.
27Two plaintexts are encrypted using a stream cipher with the same key and nonce. What relationship can an attacker obtain from the ciphertexts?
Cryptographic primitives
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Reusing the keystream causes it to cancel when the ciphertexts are XORed, revealing the XOR of the two plaintexts.
Incorrect! Try again.
28For an ideal hash function with a 256-bit output, approximately how many random inputs are needed to obtain a collision with significant probability?
Cryptographic primitives
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
The birthday bound gives a collision complexity of approximately for an ideal -bit hash.
Incorrect! Try again.
29A system uses AES-192. Which combination correctly describes its block size and key size?
Advanced Encryption Standard (AES)
Medium
A.128-bit blocks and 192-bit keys
B.128-bit blocks and 256-bit keys
C.256-bit blocks and 192-bit keys
D.192-bit blocks and 192-bit keys
Correct Answer: 128-bit blocks and 192-bit keys
Explanation:
AES always uses a 128-bit block size, while AES-192 specifically uses a 192-bit key.
Incorrect! Try again.
30When AES-CBC encrypts multiple messages under the same key, which requirement should the initialization vector satisfy?
Advanced Encryption Standard (AES)
Medium
A.It should be unpredictable and fresh for each message
B.It should remain constant for compatible ciphertexts
C.It should be derived only from the key length
D.It should equal the final block of the plaintext
Correct Answer: It should be unpredictable and fresh for each message
Explanation:
A fresh, unpredictable IV prevents equal plaintext prefixes from producing related first ciphertext blocks under the same key.
Incorrect! Try again.
31An application decrypting an AES-GCM message finds that its authentication tag is invalid. What should the application do?
Advanced Encryption Standard (AES)
Medium
A.Ignore the tag if padding is valid
B.Retry decryption using a zero nonce
C.Reject the message without using the plaintext
D.Return the plaintext with a warning
Correct Answer: Reject the message without using the plaintext
Explanation:
A failed GCM tag means the ciphertext, nonce, or associated data may have been altered, so the plaintext must not be trusted.
Incorrect! Try again.
32An encrypted bitmap still reveals repeated visual patterns because identical plaintext blocks produce identical ciphertext blocks. Which AES mode was most likely used?
Advanced Encryption Standard (AES)
Medium
A.CTR
B.GCM
C.CBC
D.ECB
Correct Answer: ECB
Explanation:
ECB encrypts each block independently without an IV or chaining, so repeated plaintext blocks produce repeated ciphertext blocks.
Incorrect! Try again.
33A client must securely send a 50 MB file to a server that has an RSA public key. Which design is most practical?
Asymmetric cryptography
Medium
A.Encrypt the file with AES and wrap its key with RSA
B.Sign the file and treat the signature as encryption
C.Hash the file and use the digest as ciphertext
D.Encrypt every file block directly with RSA
Correct Answer: Encrypt the file with AES and wrap its key with RSA
Explanation:
Hybrid encryption uses efficient symmetric encryption for bulk data and asymmetric encryption to protect the small session key.
Incorrect! Try again.
34Alice signs a document with her private key. What should Bob use to verify that signature?
Asymmetric cryptography
Medium
A.Bob's private key
B.Alice's public key
C.Alice's private key
D.Bob's public key
Correct Answer: Alice's public key
Explanation:
A signature produced with Alice's private key is verified using the corresponding trusted public key.
Incorrect! Try again.
35Why should RSA-OAEP be used instead of applying raw RSA directly to a plaintext?
Asymmetric cryptography
Medium
A.OAEP removes the need to validate public keys
B.OAEP makes RSA signatures deterministic and shorter
C.OAEP converts RSA into a symmetric block cipher
D.OAEP adds randomized encoding and security structure
Correct Answer: OAEP adds randomized encoding and security structure
Explanation:
OAEP randomizes and structures the plaintext before RSA encryption, avoiding the deterministic and insecure behavior of raw RSA.
Incorrect! Try again.
36Two parties perform unauthenticated ephemeral Diffie-Hellman over a hostile network. Which improvement directly addresses a man-in-the-middle attack?
Asymmetric cryptography
Medium
A.Increase the size of the plaintext messages
B.Hash each private key before transmission
C.Sign the exchanged ephemeral public keys
D.Reuse the same ephemeral keys each session
Correct Answer: Sign the exchanged ephemeral public keys
Explanation:
Signatures bind the ephemeral keys to authenticated identities, preventing an attacker from silently substituting separate keys.
Incorrect! Try again.
37A blockchain defines each transaction ID as the SHA-256 hash of its serialized transaction. What is the expected effect of changing one byte in the transaction?
Cryptographic constructs and blockchain technology
Medium
A.The transaction ID changes unpredictably across many bits
B.The transaction ID becomes one byte longer
C.Only one byte of the transaction ID changes
D.The transaction ID remains unchanged after validation
Correct Answer: The transaction ID changes unpredictably across many bits
Explanation:
A secure hash exhibits the avalanche effect, so a small input change produces a substantially different digest.
Incorrect! Try again.
38A balanced Merkle tree contains 1024 transaction leaves. Approximately how many sibling hashes are needed to prove membership of one transaction?
Cryptographic constructs and blockchain technology
Medium
A.512
B.8
C.10
D.1024
Correct Answer: 10
Explanation:
A Merkle proof needs one sibling hash per tree level. Since , the proof requires approximately hashes.
Incorrect! Try again.
39What do digital signatures on blockchain transactions primarily provide?
Cryptographic constructs and blockchain technology
Medium
A.Confidentiality and compression, but not integrity
B.Anonymity and encryption, but not authorization
C.Availability and storage, but not authentication
D.Authorization and integrity, but not confidentiality
Correct Answer: Authorization and integrity, but not confidentiality
Explanation:
A valid signature shows that the holder of the private key authorized the transaction and that the signed data was not modified.
Incorrect! Try again.
40An attacker modifies a transaction inside an old block of a hash-linked blockchain. What is the immediate structural consequence?
Cryptographic constructs and blockchain technology
Medium
A.Only the transaction signature changes
B.The block hash and later references no longer match
C.The current block keeps its original hash
D.All earlier block hashes become invalid
Correct Answer: The block hash and later references no longer match
Explanation:
Changing the transaction changes the block's Merkle root and hash, breaking the hash references in subsequent blocks unless they are recomputed and accepted by consensus.
Incorrect! Try again.
41A developer attempts to encrypt a file with openssl enc -aes-256-gcm but OpenSSL reports that the AEAD cipher is unsupported by enc. What is the most accurate explanation?
Working with the OpenSSL command line
Hard
A.enc supports AES-GCM only when the input file is smaller than one AES block
B.enc requires the GCM authentication tag to be supplied as an RSA signature
C.enc intentionally avoids AEAD modes because it cannot safely stream and validate authentication tags
D.enc supports AES-GCM only after generating a certificate containing an AES extension and loading that certificate through the default provider
Correct Answer: enc intentionally avoids AEAD modes because it cannot safely stream and validate authentication tags
Explanation:
The OpenSSL enc interface does not support AEAD modes such as GCM or CCM because its streaming design cannot reliably withhold unauthenticated plaintext until tag verification. An EVP-based program or another AEAD-capable tool should be used.
Incorrect! Try again.
42Which OpenSSL command explicitly encrypts m.bin with an RSA public key using OAEP, SHA-256 for OAEP hashing, and SHA-256 for MGF1?
pkeyutl performs public-key encryption, while the three pkeyopt values explicitly select OAEP and SHA-256 for both the OAEP digest and MGF1.
Incorrect! Try again.
43A file is encrypted using openssl enc -aes-256-cbc -salt -pbkdf2 -iter 200000. Which security statement is correct?
Working with the OpenSSL command line
Hard
A.The salt authenticates the ciphertext but does not affect password guessing
B.PBKDF2 prevents offline guessing even when the password has low entropy
C.CBC provides authentication as long as every encryption uses a fresh salt
D.The command strengthens password derivation but does not authenticate the ciphertext
Correct Answer: The command strengthens password derivation but does not authenticate the ciphertext
Explanation:
PBKDF2 and a salt increase the cost of password guessing and prevent identical passwords from deriving identical keys. AES-CBC remains malleable and provides no integrity or authenticity.
Incorrect! Try again.
44Which algorithm-independent pipeline computes a SHA-256 fingerprint of the DER-encoded SubjectPublicKeyInfo derived from private.pem?
openssl pkey supports multiple key algorithms and emits the public key as DER when -pubout -outform DER is used. Hashing that binary output produces a stable fingerprint of the encoded public-key structure.
Incorrect! Try again.
45For an ideal 256-bit hash, an adversary computes independently distributed hashes. Using the birthday approximation, what is the collision probability?
Cryptographic primitives
Hard
A.Approximately
B.Approximately
C.Approximately
D.Approximately
Correct Answer: Approximately
Explanation:
For small collision probability, . With , this gives .
Incorrect! Try again.
46A Merkle–Damgård hash exposes as a MAC, where is a secret prefix. Why is replacing it with HMAC a relevant defense?
Cryptographic primitives
Hard
A.HMAC makes collisions impossible even if the underlying hash is broken
B.HMAC's nested keyed construction prevents direct length-extension forgeries
C.HMAC hides the message length by padding every input to a fixed size
D.HMAC encrypts the message before applying the compression function
Correct Answer: HMAC's nested keyed construction prevents direct length-extension forgeries
Explanation:
A secret-prefix Merkle–Damgård MAC can permit extension of a known digest. HMAC uses separate inner and outer keyed applications, so the exposed value is not a usable intermediate state for that attack.
Incorrect! Try again.
47HKDF-Extract is applied to a human-memorable password using a public random salt. Which conclusion is correct?
Cryptographic primitives
Hard
A.The public salt prevents attackers from testing password guesses offline
B.HKDF cannot replace a password-hardening KDF when the input has low guesswork entropy, even though extraction can normalize sufficiently strong input material
C.HKDF converts the password into a uniformly unpredictable key regardless of its entropy
D.HKDF is appropriate only if the password is first encrypted with the salt
Correct Answer: HKDF cannot replace a password-hardening KDF when the input has low guesswork entropy, even though extraction can normalize sufficiently strong input material
Explanation:
HKDF does not add entropy or impose substantial guessing cost. Passwords should first pass through a password-hardening KDF such as Argon2, scrypt, or PBKDF2.
Incorrect! Try again.
48A system must combine an IND-CPA secure cipher with a secure MAC using independent keys. Which construction most directly provides authenticated encryption under standard composition results?
Cryptographic primitives
Hard
A.Double encryption, with the MAC key used for the outer cipher
B.Encrypt-and-MAC, with the MAC calculated over the plaintext
C.Encrypt-then-MAC, with the MAC verified before decryption
D.MAC-then-encrypt, with parsing performed before MAC verification
Correct Answer: Encrypt-then-MAC, with the MAC verified before decryption
Explanation:
Encrypt-then-MAC authenticates the ciphertext and allows rejection before decryption. With suitable primitives and independent keys, it provides strong confidentiality and integrity guarantees.
Incorrect! Try again.
49Two different plaintexts are encrypted under AES-GCM with the same key and nonce. What is the most serious consequence?
Advanced Encryption Standard (AES)
Hard
A.The ciphertext XOR reveals the plaintext XOR, and authentication may also become forgeable
B.Only the plaintext lengths leak because GCM derives a fresh keystream per message
C.Confidentiality remains intact, but both authentication tags become uniformly random
D.The AES key is immediately recovered from one pair of ciphertext blocks
Correct Answer: The ciphertext XOR reveals the plaintext XOR, and authentication may also become forgeable
Explanation:
Nonce reuse repeats GCM's counter-mode keystream, so . Reuse also creates algebraic relations involving GHASH that can enable tag forgery.
Incorrect! Try again.
50An attacker flips selected bits in CBC ciphertext block for an internal block index . What happens after decryption?
Advanced Encryption Standard (AES)
Hard
A.Every plaintext block from onward is unpredictably corrupted
B.Only changes, because CBC chaining proceeds forward during encryption
C.The corresponding bits of flip predictably, while is unpredictably corrupted
D.The corresponding bits of both and flip predictably
Correct Answer: The corresponding bits of flip predictably, while is unpredictably corrupted
Explanation:
CBC decryption uses , making changes to predictable in . The same modified ciphertext block is input to for , causing unpredictable corruption there.
Incorrect! Try again.
51Which parameter set correctly describes AES-256?
Advanced Encryption Standard (AES)
Hard
A.A 128-bit block, a 256-bit key, 12 rounds, and 52 expanded 32-bit words
B.A 128-bit block, a 256-bit key, 14 rounds, and 60 expanded 32-bit words
C.A 256-bit block, a 128-bit key, 10 rounds, and 44 expanded 32-bit words
D.A 256-bit block, a 256-bit key, 14 rounds, and 60 expanded 32-bit words
Correct Answer: A 128-bit block, a 256-bit key, 14 rounds, and 60 expanded 32-bit words
Explanation:
AES always has a 128-bit block size. AES-256 uses a 256-bit key, 14 rounds, and a key schedule containing words.
Incorrect! Try again.
52A protocol allocates exactly 32 bits of each AES-CTR input block to a per-message counter and never changes the remaining nonce field during that message. What is the maximum data length before counter wrap must be avoided?
Advanced Encryption Standard (AES)
Hard
A. bytes
B. bytes
C. bytes
D. bytes
Correct Answer: bytes
Explanation:
A 32-bit counter supplies at most distinct counter blocks. Each AES block contains 16 bytes, so the limit is bytes, or 64 GiB.
Incorrect! Try again.
53Two ECDSA signatures and on distinct message hashes and reuse the same nonce . Assuming inverses exist modulo the group order , which recovery formula is correct?
Asymmetric cryptography
Hard
A., then
B., then
C., then
D., then
Correct Answer: , then
Explanation:
ECDSA satisfies . Subtracting the two reused-nonce equations recovers , after which either signature equation reveals the private key .
Incorrect! Try again.
54What is the maximum message length that RSAES-OAEP can encode using a 2048-bit RSA modulus and SHA-256, assuming standard OAEP encoding?
Asymmetric cryptography
Hard
A.222 bytes
B.190 bytes
C.214 bytes
D.192 bytes
Correct Answer: 190 bytes
Explanation:
OAEP allows . Here, bytes and bytes, giving bytes.
Incorrect! Try again.
55A protocol accepts an untrusted elliptic-curve public point for an ECDH operation. Which validation most directly prevents invalid-curve and small-subgroup attacks?
Asymmetric cryptography
Hard
A.Hash the encoded point with SHA-256 before using it as the ECDH input
B.Check that the point is on the intended curve, is not infinity, and lies in the required subgroup
C.Check that the point has the same byte length as the local private key
D.Check that both encoded coordinates are nonzero before scalar multiplication
Correct Answer: Check that the point is on the intended curve, is not infinity, and lies in the required subgroup
Explanation:
An attacker-controlled point must satisfy the intended curve equation and subgroup requirements. Otherwise, scalar multiplication may leak information about the private scalar through small-order or invalid-curve behavior.
Incorrect! Try again.
56For textbook RSA, . An attacker chooses invertible and sends to a decryption oracle. What plaintext does the oracle return?
Asymmetric cryptography
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
RSA is multiplicatively homomorphic: . The attacker can multiply the result by to recover , illustrating why secure padding is essential.
Incorrect! Try again.
57A balanced binary Merkle tree contains exactly transaction leaves. Excluding the leaf and root, how large is a standard membership proof if each sibling hash is 32 bytes and the leaf index is supplied separately?
Cryptographic constructs and blockchain technology
Hard
A.672 bytes
B.640 bytes
C.1280 bytes
D.608 bytes
Correct Answer: 640 bytes
Explanation:
The path has levels. One 32-byte sibling hash per level requires bytes.
Incorrect! Try again.
58An attacker modifies a transaction in an old proof-of-work block and recomputes that block's Merkle root. Which statement best characterizes the remaining obstacle?
Cryptographic constructs and blockchain technology
Hard
A.The original transaction signature automatically restores the old Merkle root
B.Collision resistance makes recomputing the modified block's hash mathematically impossible
C.The attacker must rebuild the successor hash chain and surpass the canonical chain under consensus
D.Only the modified block's nonce must be recomputed because later block hashes exclude prior hashes
Correct Answer: The attacker must rebuild the successor hash chain and surpass the canonical chain under consensus
Explanation:
Changing a transaction changes the Merkle root and block hash, invalidating every successor's previous-block reference. Hashing does not prevent recomputation; consensus and cumulative work make replacement costly.
Incorrect! Try again.
59The same signing key is used by two blockchain protocols whose transaction byte strings may overlap semantically. Which design most directly prevents a valid signature from one protocol being replayed as authorization in the other?
Cryptographic constructs and blockchain technology
Hard
A.Hash only the transaction amount because shorter signed messages have fewer ambiguous fields
B.Publish the public key in both protocols and rely on consensus nodes to infer which interpretation the signer most likely intended from surrounding network traffic
C.Include a protocol-specific domain separator and chain identifier in the signed structured message
D.Encrypt every signature using the recipient's public key before transaction broadcast
Correct Answer: Include a protocol-specific domain separator and chain identifier in the signed structured message
Explanation:
Domain separation binds a signature to its protocol and context. Structured encoding and a chain identifier further prevent cross-chain replay and ambiguous serialization attacks.
Incorrect! Try again.
60In a naive public-key aggregation scheme, an attacker chooses a public key as a function of honest users' public keys so that the aggregate corresponds to a key controlled by the attacker. Which mitigation targets this rogue-key attack?
Cryptographic constructs and blockchain technology
Hard
A.Require proofs of possession or use aggregation coefficients derived from all participant keys
B.Replace the aggregate public key with the hash of the longest participant key
C.Reuse one deterministic signing nonce across all participants in the aggregation session
D.Increase the block confirmation count before accepting the aggregate signature
Correct Answer: Require proofs of possession or use aggregation coefficients derived from all participant keys
Explanation:
Proofs of possession show that participants know their claimed private keys. Secure multisignature schemes can also bind each key using coefficients derived from the complete participant set, preventing malicious cancellation.
Incorrect! Try again.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill.
The rest comes out of a student's own pocket: the domain, the storage,
and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it.
What it pays for →