Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
-verify takes the public key, while -signature identifies the signature file to check against the message.
Question 25 of 60 · Cryptographic primitives · Medium
A software publisher wants customers to detect both file modification and malicious replacement of the published digest. Which mechanism is most appropriate?
Not quite. Try another option.
Answer: Sign the software digest with a private key
A digital signature authenticates the publisher and protects the digest from undetected replacement, assuming users trust the public key.
Question 26 of 60 · Cryptographic primitives · Medium
Why is an HMAC generally more suitable than an unkeyed hash for authenticating messages exchanged by two parties sharing a secret?
Not quite. Try another option.
Answer: It requires the secret to produce a valid tag
An HMAC combines a cryptographic hash with a secret key, so an attacker without the key cannot easily forge a valid authentication tag.
Question 27 of 60 · Cryptographic primitives · Medium
Two plaintexts are encrypted using a stream cipher with the same key and nonce. What relationship can an attacker obtain from the ciphertexts?
Not quite. Try another option.
Answer:
Reusing the keystream causes it to cancel when the ciphertexts are XORed, revealing the XOR of the two plaintexts.
Question 28 of 60 · Cryptographic primitives · Medium
For an ideal hash function with a 256-bit output, approximately how many random inputs are needed to obtain a collision with significant probability?
Not quite. Try another option.
Answer:
The birthday bound gives a collision complexity of approximately for an ideal -bit hash.
Question 29 of 60 · Advanced Encryption Standard (AES) · Medium
A system uses AES-192. Which combination correctly describes its block size and key size?
Not quite. Try another option.
Answer: 128-bit blocks and 192-bit keys
AES always uses a 128-bit block size, while AES-192 specifically uses a 192-bit key.
Question 30 of 60 · Advanced Encryption Standard (AES) · Medium
When AES-CBC encrypts multiple messages under the same key, which requirement should the initialization vector satisfy?
Not quite. Try another option.
Answer: It should be unpredictable and fresh for each message
A fresh, unpredictable IV prevents equal plaintext prefixes from producing related first ciphertext blocks under the same key.
Question 31 of 60 · Advanced Encryption Standard (AES) · Medium
An application decrypting an AES-GCM message finds that its authentication tag is invalid. What should the application do?
Not quite. Try another option.
Answer: Reject the message without using the plaintext
A failed GCM tag means the ciphertext, nonce, or associated data may have been altered, so the plaintext must not be trusted.
Question 32 of 60 · Advanced Encryption Standard (AES) · Medium
An encrypted bitmap still reveals repeated visual patterns because identical plaintext blocks produce identical ciphertext blocks. Which AES mode was most likely used?
Not quite. Try another option.
Answer: ECB
ECB encrypts each block independently without an IV or chaining, so repeated plaintext blocks produce repeated ciphertext blocks.
Question 33 of 60 · Asymmetric cryptography · Medium
A client must securely send a 50 MB file to a server that has an RSA public key. Which design is most practical?
Not quite. Try another option.
Answer: Encrypt the file with AES and wrap its key with RSA
Hybrid encryption uses efficient symmetric encryption for bulk data and asymmetric encryption to protect the small session key.
Question 34 of 60 · Asymmetric cryptography · Medium
Alice signs a document with her private key. What should Bob use to verify that signature?
Not quite. Try another option.
Answer: Alice's public key
A signature produced with Alice's private key is verified using the corresponding trusted public key.
Question 35 of 60 · Asymmetric cryptography · Medium
Why should RSA-OAEP be used instead of applying raw RSA directly to a plaintext?
Not quite. Try another option.
Answer: OAEP adds randomized encoding and security structure
OAEP randomizes and structures the plaintext before RSA encryption, avoiding the deterministic and insecure behavior of raw RSA.
Question 36 of 60 · Asymmetric cryptography · Medium
Two parties perform unauthenticated ephemeral Diffie-Hellman over a hostile network. Which improvement directly addresses a man-in-the-middle attack?
Not quite. Try another option.
Answer: Sign the exchanged ephemeral public keys
Signatures bind the ephemeral keys to authenticated identities, preventing an attacker from silently substituting separate keys.
Question 37 of 60 · Cryptographic constructs and blockchain technology · Medium
A 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?
Not quite. Try another option.
Answer: The transaction ID changes unpredictably across many bits
A secure hash exhibits the avalanche effect, so a small input change produces a substantially different digest.
Question 38 of 60 · Cryptographic constructs and blockchain technology · Medium
A balanced Merkle tree contains 1024 transaction leaves. Approximately how many sibling hashes are needed to prove membership of one transaction?
Not quite. Try another option.
Answer: 10
A Merkle proof needs one sibling hash per tree level. Since , the proof requires approximately hashes.
Question 39 of 60 · Cryptographic constructs and blockchain technology · Medium
What do digital signatures on blockchain transactions primarily provide?
Not quite. Try another option.
Answer: Authorization and integrity, but not confidentiality
A valid signature shows that the holder of the private key authorized the transaction and that the signed data was not modified.
Question 40 of 60 · Cryptographic constructs and blockchain technology · Medium
An attacker modifies a transaction inside an old block of a hash-linked blockchain. What is the immediate structural consequence?
Not quite. Try another option.
Answer: The block hash and later references no longer match
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.
Question 41 of 60 · Working with the OpenSSL command line · Hard
A 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?
Not quite. Try another option.
Answer: enc intentionally avoids AEAD modes because it cannot safely stream and validate authentication tags
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.
Question 42 of 60 · Working with the OpenSSL command line · Hard
Which 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.
Question 43 of 60 · Working with the OpenSSL command line · Hard
A file is encrypted using openssl enc -aes-256-cbc -salt -pbkdf2 -iter 200000. Which security statement is correct?
Not quite. Try another option.
Answer: The command strengthens password derivation but does not authenticate the ciphertext
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.
Question 44 of 60 · Working with the OpenSSL command line · Hard
Which 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.
Question 45 of 60 · Cryptographic primitives · Hard
For an ideal 256-bit hash, an adversary computes independently distributed hashes. Using the birthday approximation, what is the collision probability?
Not quite. Try another option.
Answer: Approximately
For small collision probability, . With , this gives .
Question 46 of 60 · Cryptographic primitives · Hard
A Merkle–Damgård hash exposes as a MAC, where is a secret prefix. Why is replacing it with HMAC a relevant defense?
Not quite. Try another option.
Answer: HMAC's nested keyed construction prevents direct length-extension forgeries
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.
Question 47 of 60 · Cryptographic primitives · Hard
HKDF-Extract is applied to a human-memorable password using a public random salt. Which conclusion is correct?
Not quite. Try another option.
Answer: HKDF cannot replace a password-hardening KDF when the input has low guesswork entropy, even though extraction can normalize sufficiently strong input material
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.
Question 48 of 60 · Cryptographic primitives · Hard
A 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?
Not quite. Try another option.
Answer: Encrypt-then-MAC, with the MAC verified before decryption
Encrypt-then-MAC authenticates the ciphertext and allows rejection before decryption. With suitable primitives and independent keys, it provides strong confidentiality and integrity guarantees.
Question 49 of 60 · Advanced Encryption Standard (AES) · Hard
Two different plaintexts are encrypted under AES-GCM with the same key and nonce. What is the most serious consequence?
Not quite. Try another option.
Answer: The ciphertext XOR reveals the plaintext XOR, and authentication may also become forgeable
Nonce reuse repeats GCM's counter-mode keystream, so . Reuse also creates algebraic relations involving GHASH that can enable tag forgery.
Question 50 of 60 · Advanced Encryption Standard (AES) · Hard
An attacker flips selected bits in CBC ciphertext block for an internal block index . What happens after decryption?
Not quite. Try another option.
Answer: The corresponding bits of flip predictably, while is unpredictably corrupted
CBC decryption uses , making changes to predictable in . The same modified ciphertext block is input to for , causing unpredictable corruption there.
Question 51 of 60 · Advanced Encryption Standard (AES) · Hard
Which parameter set correctly describes AES-256?
Not quite. Try another option.
Answer: A 128-bit block, a 256-bit key, 14 rounds, and 60 expanded 32-bit words
AES always has a 128-bit block size. AES-256 uses a 256-bit key, 14 rounds, and a key schedule containing words.
Question 52 of 60 · Advanced Encryption Standard (AES) · Hard
A 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?
Not quite. Try another option.
Answer: bytes
A 32-bit counter supplies at most distinct counter blocks. Each AES block contains 16 bytes, so the limit is bytes, or 64 GiB.
Question 53 of 60 · Asymmetric cryptography · Hard
Two ECDSA signatures and on distinct message hashes and reuse the same nonce . Assuming inverses exist modulo the group order , which recovery formula is correct?
Not quite. Try another option.
Answer: , then
ECDSA satisfies . Subtracting the two reused-nonce equations recovers , after which either signature equation reveals the private key .
Question 54 of 60 · Asymmetric cryptography · Hard
What is the maximum message length that RSAES-OAEP can encode using a 2048-bit RSA modulus and SHA-256, assuming standard OAEP encoding?
Not quite. Try another option.
Answer: 190 bytes
OAEP allows . Here, bytes and bytes, giving bytes.
Question 55 of 60 · Asymmetric cryptography · Hard
A protocol accepts an untrusted elliptic-curve public point for an ECDH operation. Which validation most directly prevents invalid-curve and small-subgroup attacks?
Not quite. Try another option.
Answer: Check that the point is on the intended curve, is not infinity, and lies in the required subgroup
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.
Question 56 of 60 · Asymmetric cryptography · Hard
For textbook RSA, . An attacker chooses invertible and sends to a decryption oracle. What plaintext does the oracle return?
Not quite. Try another option.
Answer:
RSA is multiplicatively homomorphic: . The attacker can multiply the result by to recover , illustrating why secure padding is essential.
Question 57 of 60 · Cryptographic constructs and blockchain technology · Hard
A 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?
Not quite. Try another option.
Answer: 640 bytes
The path has levels. One 32-byte sibling hash per level requires bytes.
Question 58 of 60 · Cryptographic constructs and blockchain technology · Hard
An 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?
Not quite. Try another option.
Answer: The attacker must rebuild the successor hash chain and surpass the canonical chain under consensus
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.
Question 59 of 60 · Cryptographic constructs and blockchain technology · Hard
The 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?
Not quite. Try another option.
Answer: Include a protocol-specific domain separator and chain identifier in the signed structured message
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.
Question 60 of 60 · Cryptographic constructs and blockchain technology · Hard
In 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?
Not quite. Try another option.
Answer: Require proofs of possession or use aggregation coefficients derived from all participant keys
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.
That's unit 2
Answer a few questions and your score shows up here.
Nearly through. Did unit 2 of CSE436 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 2 of CSE436 save you a night before the exam?
Then you can help keep it free for the next batch. 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.