Unit 2: Symmetric and Public Key Cryptography - Practice Quiz

CSE436 — Blockchain 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 Which command displays the installed OpenSSL version?

Working with the OpenSSL command line Easy
A. openssl version
B. openssl help
C. openssl config
D. openssl status

2 What does the command openssl rand -hex 16 generate?

Working with the OpenSSL command line Easy
A. A 16-character password hash
B. A complete public-private key pair stored automatically in separate certificate files
C. A 16-bit AES encryption key
D. A 16-byte random value in hexadecimal

3 Which OpenSSL subcommand is commonly used to calculate a SHA-256 digest of a file?

Working with the OpenSSL command line Easy
A. openssl rand -sha256
B. openssl genpkey -sha256
C. openssl dgst -sha256
D. openssl enc -sha256

4 Which option is added to an openssl enc command to perform decryption?

Working with the OpenSSL command line Easy
A. -h
B. -d
C. -v
D. -e

5 What is the main output of a cryptographic hash function?

Cryptographic primitives Easy
A. A public key
B. A fixed-size digest
C. A decrypted message
D. A random password

6 Which security property is primarily provided by encryption?

Cryptographic primitives Easy
A. Redundancy
B. Compression
C. Availability
D. Confidentiality

7 What is the purpose of a cryptographically secure pseudorandom number generator?

Cryptographic primitives Easy
A. To compress large files
B. To arrange records alphabetically
C. To generate unpredictable values
D. To convert every input into a reversible and human-readable sequence of characters

8 What is a hash collision?

Cryptographic primitives Easy
A. Two inputs producing the same hash
B. Two networks using the same protocol
C. Two keys encrypting the same block
D. Two users sharing a password

9 What type of cryptographic algorithm is AES?

Advanced Encryption Standard (AES) Easy
A. A cryptographic hash function
B. A symmetric block cipher
C. A public-key exchange protocol
D. An asymmetric signature scheme

10 What is the block size used by AES?

Advanced Encryption Standard (AES) Easy
A. bits
B. bits
C. bits
D. bits

11 Which set lists the standard AES key sizes?

Advanced Encryption Standard (AES) Easy
A. , , and bits
B. , , and bits for compatibility with common public-key algorithms
C. , , and bits
D. , , and bits

12 In AES, which key is normally used to decrypt data encrypted with a secret key?

Advanced Encryption Standard (AES) Easy
A. A digital certificate
B. The message hash
C. The same secret key
D. A separate public key

13 How many related keys are used in asymmetric cryptography?

Asymmetric cryptography Easy
A. Two related keys
B. One shared key
C. Three session keys
D. Four rotating keys

14 Which key may normally be shared openly in asymmetric cryptography?

Asymmetric cryptography Easy
A. The public key
B. The private key
C. The session secret
D. The master password

15 Which key is normally used to create a digital signature?

Asymmetric cryptography Easy
A. The receiver's private key
B. The sender's private key
C. The receiver's public key
D. The sender's public key

16 Which pair contains examples of asymmetric cryptographic algorithms?

Asymmetric cryptography Easy
A. AES-CBC and AES-GCM with keys securely exchanged through a protected communication channel
B. SHA-256 and SHA-3
C. RSA and ECC
D. AES and DES

17 What commonly links one blockchain block to the previous block?

Cryptographic constructs and blockchain technology Easy
A. The network's IP address
B. The miner's public name
C. The transaction's password
D. The previous block's hash

18 What is a Merkle tree used for in blockchain systems?

Cryptographic constructs and blockchain technology Easy
A. Encrypting every block
B. Summarizing transactions efficiently
C. Generating private keys
D. Replacing all network nodes with one central database that stores complete transaction histories

19 What do digital signatures help prove for blockchain transactions?

Cryptographic constructs and blockchain technology Easy
A. Authorization by the key owner
B. Storage by every miner
C. Compression by the network
D. Anonymity of every participant

20 What happens to a block's cryptographic hash if the block data is changed?

Cryptographic constructs and blockchain technology Easy
A. The hash remains identical
B. The hash decrypts the block
C. The hash becomes a private key
D. The hash normally changes

21 Which OpenSSL command computes the SHA-256 digest of package.bin without modifying the file?

Working with the OpenSSL command line Medium
A. openssl rand -sha256 package.bin
B. openssl dgst -sha256 package.bin
C. openssl enc -sha256 package.bin
D. openssl pkey -sha256 package.bin

22 A file was encrypted using openssl enc -aes-256-cbc -salt -pbkdf2 -in plain.txt -out cipher.bin. Which command correctly decrypts it?

Working with the OpenSSL command line Medium
A. openssl enc -e -aes-256-cbc -pbkdf2 -in cipher.bin -out plain.txt
B. openssl dgst -sha256 -pbkdf2 -in cipher.bin -out plain.txt
C. openssl enc -d -aes-256-cbc -pbkdf2 -in cipher.bin -out plain.txt
D. openssl enc -d -aes-128-cbc -pbkdf2 -in cipher.bin -out plain.txt

23 After generating an RSA private key in private.pem, which command extracts its public key into public.pem?

Working with the OpenSSL command line Medium
A. openssl dgst -in private.pem -pubout -out public.pem
B. openssl genpkey -in private.pem -out public.pem
C. openssl rsa -pubin -in private.pem -out public.pem
D. openssl pkey -in private.pem -pubout -out public.pem

24 A SHA-256 signature is stored in sig.bin. Which command verifies it for message.txt using public.pem?

Working with the OpenSSL command line Medium
A. openssl dgst -sha256 -sign public.pem -signature sig.bin message.txt
B. openssl dgst -sha256 -verify public.pem -signature sig.bin message.txt
C. openssl dgst -sha256 -verify sig.bin -signature public.pem message.txt
D. openssl pkey -sha256 -verify public.pem -signature sig.bin message.txt

25 A 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

26 Why 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

27 Two 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.

28 For 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.

29 A 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

30 When 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

31 An 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

32 An 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

33 A 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

34 Alice 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

35 Why 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

36 Two 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

37 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?

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

38 A 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

39 What 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

40 An 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

41 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?

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

42 Which OpenSSL command explicitly encrypts m.bin with an RSA public key using OAEP, SHA-256 for OAEP hashing, and SHA-256 for MGF1?

Working with the OpenSSL command line Hard
A. openssl rsautl -sign -pubin -inkey recipient-pub.pem -in m.bin -out c.bin -oaep -sha256
B. openssl dgst -sha256 -encrypt recipient-pub.pem -oaep -in m.bin -out c.bin -mgf1 sha256
C. openssl pkeyutl -encrypt -pubin -inkey recipient-pub.pem -in m.bin -out c.bin -pkeyopt rsa_padding_mode:pkcs1 -pkeyopt digest:sha256
D. openssl pkeyutl -encrypt -pubin -inkey recipient-pub.pem -in m.bin -out c.bin -pkeyopt rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha256 -pkeyopt rsa_mgf1_md:sha256

43 A 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

44 Which algorithm-independent pipeline computes a SHA-256 fingerprint of the DER-encoded SubjectPublicKeyInfo derived from private.pem?

Working with the OpenSSL command line Hard
A. openssl x509 -in private.pem -pubkey | openssl dgst -sha256
B. openssl rsa -in private.pem -modulus | openssl pkeyutl -sha256
C. openssl pkey -in private.pem -pubout -outform DER | openssl dgst -sha256
D. openssl pkey -in private.pem -text | openssl dgst -sha256 -binary

45 For 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

46 A 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

47 HKDF-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

48 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?

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

49 Two 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

50 An 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

51 Which 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

52 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?

Advanced Encryption Standard (AES) Hard
A. bytes
B. bytes
C. bytes
D. bytes

53 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?

Asymmetric cryptography Hard
A. , then
B. , then
C. , then
D. , then

54 What 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

55 A 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

56 For 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.

57 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?

Cryptographic constructs and blockchain technology Hard
A. 672 bytes
B. 640 bytes
C. 1280 bytes
D. 608 bytes

58 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?

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

59 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?

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

60 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?

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