yuuwwang/aicrypto huggingface dataset:
Topic: classic
Question: Using a columnar transposition cipher, the plaintext 'the tomato is a plant in the nightshade family' is encrypted using the keyword 'TOMATO'. What is the resulting ciphertext, grouped by columns?
Options:
"TINESAX / EOAHTFX / HTLTHEY / MAILAIX / TAPNGDL / OSTNHMX"
"TINESAX / EOAHTEX / MAILAIX / HTLTHEY / TAPNGDL / OSTNHMX"
"TINESAX / EOAHTFX / HTLTHEY / MAILAIX / OSTNHMX / TAPNGDL"
"EOAHTFX / TINESAX / HTLTHEY / MAILAIX / TAPNGDL / OSTNHMX"
"TINESAX / EOAHTFX / HTLTHEY / MAIIAIX / TAPNGDL / OSTNHMX"
Answer (0-based option index): 4
Topic: asymmetric
Question: Which of the following security properties is not inherently guaranteed by a digital signature mechanism?
Options:
Authentication
Non-repudiation
Confidentiality
Integrity
None of the above
Answer (0-based option index): 2
Topic: asymmetric
Question: In a public-key cryptographic scheme, if user A wants to send a secure message to user B, which key should A use to encrypt the message?
Options:
A's private key
B's private key
B's public key
A's public key
None of the above
Answer (0-based option index): 2
Topic: symmetric
Question: When comparing AES with DES, which operation in DES lacks a corresponding component in AES?
Options:
Function f
Permutation P
Swapping of left and right halves
XOR between subkey and function output
None of the above
Answer (0-based option index): 2
Topic: asymmetric
Question: In elliptic curve cryptography (ECC), the problem of "given P, a point on the curve, and the scalar multiplication Q = kP (where k is an integer), find k" primarily corresponds to which mathematical problem
Options:
Integer factorization problem
Discrete logarithm problem
Elliptic curve discrete logarithm problem
Subset sum problem
Answer (0-based option index): 2
Topic: misc
Question: Imagine you are designing a secure voting system where votes need to be encrypted to ensure privacy. Which encryption scheme is most suitable for tallying votes without decrypting them all (assuming only two candidates: A and B, with encrypted votes represented as 0 or 1)?
Options:
AES-GCM
RSA
Fully Homomorphic Encryption
ElGamal
None of the above
Answer (0-based option index): 2
Topic: asymmetric
Question: Suppose you have encrypted a message using RSA, where the public key is $(n, e)$ and the private key is $d$. If an attacker successfully factors the modulus n into two distinct prime numbers $p$ and $q$, what can the attacker now do?
Options:
Decrypt any message encrypted with the public key without calculating $d$.
Compute the private key $d$, and thus decrypt any message encrypted with the public key.
Forge messages signed with the private key but cannot decrypt ciphertext.
Perform no meaningful attack since the encryption process remains secure.
None of the above
Answer (0-based option index): 1
Topic: symmetric
Question: What is a primary vulnerability of the Electronic Code Book (ECB) mode of encryption?
Options:
It needs a larger block size to be secure
It uses excessive padding for all input sizes
It is susceptible to cryptanalysis due to the one-to-one mapping between plaintext and ciphertext blocks
None of the above
Answer (0-based option index): 2
Topic: asymmetric
Question: In a digital signature system, which key should the sender (e.g., Alice) use to sign a message so that the recipient (e.g., Bob) can verify the origin and authenticity of the message?
Options:
Bob's private key
Alice's private key
Bob's public key
Alice's username and password
None of the above
Answer (0-based option index): 1
Topic: misc
Question: Based on the information available to an attacker, cryptanalysis attacks can generally be classified into four types: ciphertext-only attacks, known-plaintext attacks, chosen-plaintext attacks, and chosen-ciphertext attacks. Which type of attack is considered the most difficult for the attacker to attack successfully?
Options:
Ciphertext-only attack
Known-plaintext attack
Chosen-plaintext attack
Chosen-ciphertext attack
None of the above
Answer (0-based option index): 0
Topic: asymmetric
Question: In the RSA blind signature scheme, how does the requester blind the original message before sending it to the signer?
Options:
Encrypting the message with a private key
Encrypting a random blinding factor with the public key of RSA, and multiplying it with the message
Encrypting the message with a public key
Reordering blocks of the message
None of the above
Answer (0-based option index): 1
Topic: symmetric
Question: Which transformation step in the AES encryption algorithm is primarily responsible for achieving diffusion?
Options:
ShiftRows
SubBytes
AddRoundKey
MixColumns
None of the above
Answer (0-based option index): 3
Topic: symmetric
Question: Which of the following statements about confusion in cryptography is incorrect?
Options:
Confusion aims to make the ciphertext-key relationship more complex
S-boxes play a key role in achieving confusion
Confusion can be effectively achieved using a basic XOR operation
The purpose of confusion is to prevent attackers from deducing the key
None of the above
Answer (0-based option index): 2
Topic: symmetric
Question: If a cryptographic algorithm employs confusion but lacks diffusion, which type of attack is it most vulnerable to?
Options:
Differential cryptanalysis
Linear cryptanalysis
Brute force attack
None of the above
Answer (0-based option index): 0
Topic: symmetric
Question: What is the main objective of diffusion in the design of a secure encryption system?
Options:
Making small changes in the plaintext significantly affect the ciphertext
Reducing the number of encryption rounds
Enhancing the non-linearity between ciphertext and key
Improving encryption speed
None of the above
Answer (0-based option index): 0
Topic: asymmetric
Question: Let $(Gen, E, D)$ be a chosen ciphertext secure public-key encryption system with message space $\{0,1\}^{128}$. Which of the following is also chosen ciphertext secure?
Options:
$(Gen, E', D')$ where $E'(pk, m) = (E(pk, m), E(pk, 0^{128}))$ and $D'(sk, (c_1, c_2)) = D(sk, c_1)$.
$(Gen, E', D')$ where $E'(pk, m) = (E(pk, m), E(pk, m))$ and \\
$D'(sk, (c_1, c_2)) = \begin{cases} D(sk, c_1) & \text{if } D(sk, c_1) = D(sk, c_2) \\ \perp & \text{otherwise} \end{cases}$.
$(Gen, E', D')$ where $E'(pk, m) = E(pk, m \oplus 1^{128})$ and $D'(sk, c) = D(sk, c) \oplus 1^{128}$.
None of the above
Answer (0-based option index): 2
Topic: classic
Question: The letter frequency analysis method is most effective against which type of classical cipher algorithm?
Options:
Transposition cipher
Monoalphabetic substitution cipher
Polyalphabetic substitution cipher
Stream cipher
None of the above
Answer (0-based option index): 1
Topic: classic
Question: Which of the following cipher algorithms offers the strongest resistance to frequency analysis but the weakest resistance to known-plaintext attacks?
Options:
Affine cipher
Vigenère cipher
Rotational cipher
Hill cipher
None of the above
Answer (0-based option index): 3
Topic: classic
Question: The index of coincidence method is particularly effective for breaking which type of cipher?
Options:
Transposition cipher
Polyalphabetic substitution cipher
Stream cipher
None of the above
Answer (0-based option index): 1
Topic: classic
Question: The Vigenère cipher, a representative example of classical cipher systems, employs which type of encryption approach?
Options:
Transposition cipher
Monoalphabetic substitution cipher
Polyalphabetic substitution cipher
Stream cipher
None of the above
Answer (0-based option index): 2
Topic: symmetric
Question: In the DES algorithm, if all the subkeys generated from a given initial key k are identical, such a key is called a weak key. How many weak keys exist in DES?
Options:
2
4
8
16
None of the above
Answer (0-based option index): 1
Topic: asymmetric
Question: The Index Calculus method is used to analyze which type of cryptographic algorithm?
Options:
Knapsack cryptosystem
RSA
ElGamal
ECC
None of the above
Answer (0-based option index): 2
Topic: symmetric
Question: Suppose an affine cipher uses the encryption rule \( c \equiv 17m + 2 \pmod{26} \). Which of the following represents the correct decryption function?
Options:
\( m \equiv 3c + 6 \pmod{26} \)
\( m \equiv 3c - 2 \pmod{26} \)
\( m \equiv 23c + 6 \pmod{26} \)
\( m \equiv 23c - 2 \pmod{26} \)
None of the above
Answer (0-based option index): 2
Topic: symmetric
Question: Consider a maximum-length sequence (m-sequence) generated by an n-stage linear feedback shift register (LFSR). In one full period of this sequence, how many runs of consecutive 1s with length exactly n-1 occur?
Options:
0
1
2
n
None of the above
Answer (0-based option index): 2
Topic: misc
Question: The (t, n)-threshold scheme proposed by Shamir is based on which of the following?
Options:
Lagrange interpolation polynomial
Discrete logarithm problem
Knapsack problem
Large integer factorization problem
None of the above
Answer (0-based option index): 0
Topic: asymmetric
Question: Which of the following statements about digital signatures is correct?
Options:
A digital signature appends a piece of irrelevant digital information to the transmitted data
A digital signature solves the problem of secure data transmission by encryption
A digital signature typically uses symmetric encryption mechanisms
A digital signature can solve security issues such as tampering and forgery
None of the above
Answer (0-based option index): 3
Topic: math
Question: What additional property transforms a commutative ring into a mathematical field?
Options:
Existence of reciprocals for all non-null elements
Presence of opposites for all elements
Availability of reciprocals for all elements
Partial availability of reciprocals
None of the above
Answer (0-based option index): 0
Topic: symmetric
Question: In the AES algorithm, which component introduces non-linearity?
Options:
Byte substitution
Row shifting
Column mixing
Round key addition
None of the above
Answer (0-based option index): 0
Topic: symmetric
Question: For the affine cipher $y \equiv (a\cdot x + b) \mod 26$, what constraint applies to the coefficient 'a'?
Options:
Any integer value is acceptable
Must be divisible by 2
Must be relatively prime to 26
Must be divisible by 13
None of the above
Answer (0-based option index): 2
Topic: asymmetric
Question: What correctly describes key management in public-key systems?
Options:
All cryptographic keys are public
Encryption keys are public while decryption keys are private
Private keys are exchanged between parties
Both encryption and decryption keys remain secret
None of the above
Answer (0-based option index): 1
Topic: math
Question: Given two distinct primes \( p \) and \( q \), let \( n = p \cdot q \). What is the value of Euler's totient function \( \varphi(n) \)?
Options:
\( p + q - 1 \)
\( p \cdot q \)
\( (p - 1)(q - 1) \)
\( (p + 1)(q + 1) \)
None of the above
Answer (0-based option index): 2
Topic: math
Question: What algebraic structure do residue classes modulo a prime p form?
Options:
A non-field ring
An additive group only
A finite field
An infinite field
None of the above
Answer (0-based option index): 2
Topic: asymmetric
Question: In public key cryptography, what is the correct sequence for signing-then-encrypting a message?
Options:
Sign with X's private key → Encrypt with Y's public key
Sign with Y's public key → Encrypt with X's private key
Encrypt with X's public key → Sign with Y's private key
Encrypt with Y's private key → Sign with X's public key
None of the above
Answer (0-based option index): 0
Topic: math
Question: The Euclidean Algorithm produces a sequence $X_1 > X_2 > \ldots > X_k = 0$ of positive integers where each $X_t$ for $2 < t \leq k$ is the remainder obtained by dividing $X_{t-2}$ by $X_{t-1}$. If $X_{k-1} = 45$, then the set of all positive common divisors of $X_1$ and $X_2$ is
Options:
{1, 3, 5, 9, 15, 45}
{1, 3, 5, 15}
{1, 3, 5}
{1, 9, 15, 45}
{1, 3, 5, 9, 15}
None of the above
Answer (0-based option index): 0
Topic: math
Question: Let $L$ be the least common multiple of 175 and 105. Among all common divisors $x > 1$ of 175 and 105, let $D$ be the smallest. Which of the following is correct?
Options:
$D = 5$ and $L = 1050$
$D = 7$ and $L = 1050$
$D = 5$ and $L = 525$
$D = 7$ and $L = 525$
$D = 5$ and $L = 35$
None of the above
Answer (0-based option index): 2
Topic: math
Question: The Euclidean Algorithm is used to produce a sequence \( X_1 > X_2 > X_3 > X_4 > X_5 = 0 \) of positive integers where \( X_t = q_{t+1}X_{t+1} + X_{t+2} \), for \( t = 1, 2, 3 \). The quotients are \( q_2 = 3 \), \( q_3 = 2 \), and \( q_4 = 2 \). Which of the following is correct?
Options:
gcd(\( X_1, X_2 \)) = \( -2X_1 + 6X_2 \)
gcd(\( X_1, X_2 \)) = \( -2X_1 - 6X_2 \)
gcd(\( X_1, X_2 \)) = \( -2X_1 - 7X_2 \)
gcd(\( X_1, X_2 \)) = \( 2X_1 + 7X_2 \)
gcd(\( X_1, X_2 \)) = \( -2X_1 + 7X_2 \)
None of the above
Answer (0-based option index): 4
Topic: symmetric
Question: Which cipher mode should always be used when available to ensure both confidentiality and integrity?
Options:
ECB
CBC
GCM or CCM
CTR
None of the above
Answer (0-based option index): 2
Topic: asymmetric
Question: In RSA encryption, what must be enabled to protect against Known Plaintext Attacks?
Options:
Random Padding (OAEP)
Initialization Vector (IV)
Key Derivation Function (KDF)
None of the above
Answer (0-based option index): 0
Topic: math
Question: How many distinct solutions exist for the congruence equation \( x^2 \equiv 1 \mod 30 \)?
Options:
1
2
4
8
None of the above
Answer (0-based option index): 2
Topic: math
Question: Which of the following quotient rings does NOT define a field isomorphic to \( \text{GF}(2^5) \)?
Options:
$GF(2)[x] / \langle x^5 + x^4 + x^3 + x + 1 \rangle$
$ GF(2)[x] / \langle x^5 + x^3 + 1 \rangle$
$GF(2)[x] / \langle x^5 + x^4 + x^3 + x^2 + 1 \rangle$
$GF(2)[x] / \langle x^5 + x^4 + 1 \rangle$
None of the above
Answer (0-based option index): 3
Topic: math
Question: Which of the following irreducible polynomials over \( \text{GF}(3) \) is also primitive?
Options:
\( x^3 + 2x + 1 \)
\( x^3 + 2x + 2 \)
\( x^3 + x^2 + 2 \)
\( x^3 + x^2 + x + 2 \)
None of the above
Answer (0-based option index): 0
Topic: symmetric
Question: In a Feistel network cipher, each round consists of \( L_i = R_{i-1} \), and which of the following describes \( R_i \)?
Options:
\( R_i = L_{i-1} \oplus f(L_{i-1}, k_i) \)
\( R_i = L_{i-1} \oplus f(R_{i-1}, k_i) \)
\( R_i = R_{i-1} \oplus f(R_{i-1}, k_i) \)
\( R_i = R_{i-1} \oplus f(L_{i-1}, k_i) \)
None of the above
Answer (0-based option index): 1
Topic: symmetric
Question: The block cipher IDEA uses a combination of algebraic operations from three distinct groups. Which of the following is \textbf{NOT} one of them?
Options:
\( (\{0,1\}^{16}, \oplus) \)
\( \mathbb{Z}_{65536}, + \mod 65536 \)
\( S_{16}, \circ \text{ (composition)} \)
\( \mathbb{Z}_{65537}^*, \times \mod 65537 \)
None of the above
Answer (0-based option index): 2
Topic: symmetric
Question: Let \( m_i \) and \( c_i \) denote plaintext and ciphertext blocks in CBC mode. For \( i > 1 \), what is the correct decryption operation?
Options:
\( m_i = d_k(c_i) \oplus m_{i-1} \)
\( m_i = d_k(c_i \oplus m_{i-1}) \)
\( m_i = d_k(c_i) \oplus c_{i-1} \)
\( m_i = d_k(c_i \oplus c_{i-1}) \)
None of the above
Answer (0-based option index): 2
Topic: symmetric
Question: The block cipher SAFER uses an 8-bit substitution defined as \( S(x) = 45^x \mod 257 \), with 256 represented by 0. Which function below is NOT a bijective mapping on 8-bit values?
Options:
\( S(x) = 45^{5x} \mod 257 \)
\( S(x) = 45^{6x} \mod 257 \)
\( S(x) = 45^{9x} \mod 257 \)
\( S(x) = 45^{15x} \mod 257 \)
None of the above
Answer (0-based option index): 1
Topic: misc
Question: In a hybrid cryptosystem, what is the role of the symmetric key?
Options:
It is used to encrypt the public key
It is used to encrypt the session data after it is established
It is used to encrypt the private key
It is used for the authentication of the message sender
None of the above
Answer (0-based option index): 1
Topic: asymmetric
Question: For which prime numbers $p$ and $q$ can a cyclic multiplicative subgroup of order $q$ be constructed within $(\mathbb{Z}_p^*, \times)$? Cryptographic schemes based on the discrete logarithm problem typically operate on such groups.
Options:
$p = 859$, $q = 103$
$p = 853$, $q = 101$
$p = 857$, $q = 107$
$p = 863$, $q = 109$
None of the above
Answer (0-based option index): 2
Topic: asymmetric
Question: Consider a key management scheme devised by an administrator. The administrator generates an RSA modulus $N$ and a master secret $s \in \mathbb{Z}_N^*$. For each user $i$, a secret key $s_i = s^{r_i} \pmod{N}$ is assigned, where $r_i$ is the $i$-th prime number (e.g., $r_1=2, r_2=3, \ldots$). 
 
To encrypt a file intended for a group of users, say users $i, j,$ and $t$, the administrator uses the key $k = s^{r_i r_j r_t} \pmod{N}$. Each authorized user can compute $k$. For instance, user $i$ computes $k = (s_i)^{r_j r_t} = (s^{r_i})^{r_j r_t} = s^{r_i r_j r_t} \pmod{N}$. The scheme aims to ensure that only the designated users can compute $k$ and access the file. 
 
However, this system is insecure. Any two colluding users can combine their secret keys to recover the master secret $s$. Consider users 1 and 2, with secret keys $s_1 = s^{r_1} \pmod{N}$ and $s_2 = s^{r_2} \pmod{N}$ respectively. Since $r_1$ and $r_2$ are distinct primes, by the Extended Euclidean Algorithm (Bezout's identity), there exist integers $a$ and $b$ such that $a \cdot r_1 + b \cdot r_2 = 1$. 
 
How can users 1 and 2 compute the master secret $s$ using their keys $s_1, s_2$ and the integers $a, b$? {}
Options:
$s = s_1^b \cdot s_2^a \pmod{N}$
$s = s_1^a + s_2^b \pmod{N}$
$s = s_1^b + s_2^a \pmod{N}$
$s = s_1^a \cdot s_2^b \pmod{N}$
None of the above
Answer (0-based option index): 3
Topic: misc
Question: Which of the following is \textbf{not} a property provided by Message Authentication Codes (MACs)?
Options:
Integrity — detecting any modification of a message during transmission
Authentication — verifying the message origin for the receiver
Non-repudiation — preventing the sender from denying message origin
Fixed output length — generating authentication tags of a consistent size
None of the above
Answer (0-based option index): 2
Topic: asymmetric
Question: Which of the following statements about the Digital Signature Algorithm (DSA) is \textbf{false}?
Options:
Proposed by NIST as a US federal digital signature standard
Signature verification is faster than RSA at equivalent security levels
Based on the ElGamal signature scheme
Vulnerable if the same ephemeral key is reused across signatures
None of the above
Answer (0-based option index): 1
Topic: misc
Question: Which of the following statements about key establishment using a Key Distribution Center (KDC) is \textbf{false}?
Options:
Each user shares a Key Encryption Key (KEK) with both the KDC and every other user
Only $n$ long-term keys are needed in a network with $n$ users
When a new user joins, only one secure key is required between the user and the KDC
The KDC distributes session keys encrypted under users' KEKs
None of the above
Answer (0-based option index): 0
Topic: math
Question: Which of the following quotient rings is isomorphic to the finite field $\mathbb{GF}(81)$?
Options:
$\mathbb{GF}_3[x] / \langle x^4 + x + 2 \rangle$
$\mathbb{GF}_3[x] / \langle x^4 + 2x + 1 \rangle$
$\mathbb{GF}_3[x] / \langle x^4 + 1 \rangle$
$\mathbb{GF}_3[x] / \langle x^4 + 2 \rangle$
None of the above
Answer (0-based option index): 0
Topic: math
Question: A cryptographic system needs to compute polynomial operations over a quotient ring $\mathbb{Z}_{17}[x]/\phi(x)$. Without regard to security, which is the best choice of $\phi(x)$ for efficiency?
Options:
$\phi(x) = x^8+1$
$\phi(x) = x^8+2$
$\phi(x) = x^8+3$
$\phi(x) = x^8+4$
Answer (0-based option index): 0
Topic: asymmetric
Question: Let $n = pq$ be an RSA modulus, where $p$ and $q$ are large primes. Let $e$ and $d$ be the public and private exponents such that $ed \equiv 1 \pmod{k}$. Originally, $k = \phi(n)$. Which alternative choice of $k$ still guarantees correct decryption while potentially allowing for a smaller $d$?
Options:
$\mathrm{lcm}(p - 1, q - 1)$
$\gcd(p - 1, q - 1)$
$\mathrm{lcm}(p + 1, q + 1)$
$\gcd(p + 1, q + 1)$
None of the above
Answer (0-based option index): 0
Topic: misc
Question: Which of the following statements about the Key Encryption Key (KEK) is \textbf{FALSE}?
Options:
KDC (Key Distribution Center) shares a unique KEK with each user individually.
KDC sends session keys encrypted under KEKs to the users.
If KEKs are compromised, an attacker still cannot decrypt previously transmitted messages.
Adding a new user only affects the KEK related to that user without impacting others.
None of the above
Answer (0-based option index): 2
Topic: symmetric
Question: For arbitrary inputs $A$ and $B$, which relation does the diffusion operation $D$ in the AES diffusion layer always satisfy?
Options:
$D(A \oplus B) \neq A \oplus B$
$D(A \oplus B) = A \oplus B$
$D(A \oplus B) = D(A) \oplus D(B)$
$D(A \oplus B) \neq D(A) \oplus D(B)$
None of the above
Answer (0-based option index): 2
Topic: symmetric
Question: Which attack reduces the effective key length of 3-key Triple DES from 168 bits to approximately 112 bits?
Options:
Meet-in-the-Middle attack
Man-in-the-Middle attack
Differential attack
Linear attack
None of the above
Answer (0-based option index): 0
Topic: asymmetric
Question: Given an elliptic curve over a prime field $\mathbb{F}_p$, let the number of points on the curve be denoted as $\#E$. Suppose the binary expansions of $p$ and $|p - \#E|$ have $m$ and $n$ bits respectively. Which is the best approximation of the relation between $m$ and $n$?
Options:
$m = 4n$
$m = 2n$
$2m = n$
$4m = n$
None of the above
Answer (0-based option index): 1
Topic: asymmetric
Question: For an RSA implementation, suppose signing using the Chinese Remainder Theorem (CRT) takes time $s$, while signing without CRT takes time $t$. What best approximates the relation between $s$ and $t$? (Consider the complexity of modular multiplication over $\mathbb{Z}_p$ is $\log(p)^2$.)
Options:
$s = 4t$
$s = 2t$
$2s = t$
$4s = t$
None of the above
Answer (0-based option index): 3
Topic: math
Question: Which of the following systems of congruences does \textbf{NOT} have a solution?
Options:
$x \equiv 1 \pmod{7}, \quad x \equiv 3 \pmod{9}, \quad x \equiv 5 \pmod{11}$
$x \equiv 1 \pmod{8}, \quad x \equiv 3 \pmod{9}, \quad x \equiv 5 \pmod{11}$
$x \equiv 1 \pmod{7}, \quad x \equiv 3 \pmod{9}, \quad x \equiv 5 \pmod{12}$
$x \equiv 1 \pmod{7}, \quad x \equiv 3 \pmod{10}, \quad x \equiv 5 \pmod{12}$
None of the above
Answer (0-based option index): 2
Topic: misc
Question: Which of the following statements about the Man-in-the-Middle (MITM) attack is \textbf{FALSE}?
Options:
An attacker can replace the public key of one party with their own key.
MITM attacks are applicable to Diffie-Hellman Key Exchange (DHKE) but not to RSA encryption.
MITM attacks are possible only if the public keys are not authenticated.
Public Key Infrastructure (PKI) is a solution to prevent MITM attacks.
None of the above
Answer (0-based option index): 1
Topic: misc
Question: How many generators exist in the cyclic multiplicative group \( \mathbb{Z}_{243}^* \)?
Options:
81
110
121
162
None of the above
Answer (0-based option index): 1