Docsity

Advanced Cryptography and Mathematical Foundations Exercises, Exams of Cryptography and System Security

Toggle sidebar
bg1
Advanced Cryptography and Mathematical
Foundations
This covers RSA, Diffie-Hellman, modular arithmetic, hash functions,
symmetric vs. asymmetric crypto, and some theoretical questions to
test depth.
Part A: Multiple Choice
What is the main mathematical problem that secures RSA encryption?
A) Discrete logarithm problem
B) Integer factorization problem ✓
C) Prime generation problem
D) Modular inversion problem
1. If p=17p=17p=17 and q=23q=23q=23, compute n=p×qn = p \times
qn=p×q.
A) 391 ✓
B) 40
C) 40
D) 153
2. Compute ϕ(n)\phi(n)ϕ(n) where n=391n = 391n=391,
p=17p=17p=17, q=23q=23q=23.
A) 391
B) 352 ✓
C) 39
D) 17
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Advanced Cryptography and Mathematical Foundations Exercises and more Exams Cryptography and System Security in PDF only on Docsity!

Advanced Cryptography and Mathematical

Foundations

This covers RSA, Diffie-Hellman, modular arithmetic, hash functions, symmetric vs. asymmetric crypto, and some theoretical questions to test depth. Part A: Multiple Choice What is the main mathematical problem that secures RSA encryption? A) Discrete logarithm problem B) Integer factorization problem ✓ C) Prime generation problem D) Modular inversion problem

  1. If p=17p=17p=17 and q=23q=23q=23, compute n=p×qn = p \times qn=p×q. A) 391 ✓ B) 40 C) 40 D) 153
  2. Compute ϕ(n)\phi(n)ϕ(n) where n=391n = 391n=391, p=17p=17p=17, q=23q=23q=23. A) 391 B) 352 ✓ C) 39 D) 17
  1. For RSA, the public key exponent eee must be: A) Divisible by ϕ(n)\phi(n)ϕ(n) B) Coprime to ϕ(n)\phi(n)ϕ(n) ✓ C) A factor of nnn D) Equal to ϕ(n)\phi(n)ϕ(n)
  2. Given e=7e=7e=7 and ϕ(n)=352\phi(n)=352ϕ(n)=352, find ddd such that e×d≡1mod 352e \times d \equiv 1 \mod 352e×d≡1mod352. A) 51 B) 303 ✓ C) 75 D) 257
  3. Compute 127mod 39112^7 \mod 391127mod391. A) 94 B) 339 ✓ C) 213 D) 278
  4. Diffie-Hellman key exchange is primarily vulnerable to which type of attack? A) Man-in-the-middle ✓ B) Replay C) Brute force D) Side-channel
  5. Which cryptographic hash property ensures that it is computationally infeasible to find two inputs that produce the same hash? A) One-wayness B) Collision resistance ✓
  1. What does the RSA private key consist of? A) d,nd, nd,n ✓ B) e,ne, ne,n C) p,qp, qp,q D) e,de, de,d
  2. The Extended Euclidean Algorithm is used for: A) Finding modular inverses ✓ B) Finding prime numbers C) Hashing data D) Encrypting messages
  3. Calculate the modular inverse of 7 modulo 26. A) 15 B) 11 C) 15 ✓ D) 3
  4. What does “preimage resistance” in hashing mean? A) Impossible to find input from output ✓ B) Impossible to find two inputs with same hash C) Output length is fixed D) Output is unique
  5. Calculate 210mod 232^{10} \mod 23210mod23. A) 4 B) 18 ✓ C) 10 D) 1
  6. Which of these is NOT a symmetric encryption algorithm? A) AES B) DES

C) RSA ✓

D) Blowfish

  1. Find the GCD of 120 and 23. A) 1 ✓ B) 23 C) 3 D) 120
  2. Which one is a property of a cryptographic hash function? A) Reversible B) Collision resistance ✓ C) Easily predictable D) Produces variable output size
  3. Calculate 106mod 1710^6 \mod 17106mod17. A) 2 ✓ B) 10 C) 4 D) 7
  4. In RSA, which step must be performed last? A) Choose primes p,qp, qp,q B) Calculate nnn C) Calculate private key ddd D) Encrypt message ✓
  5. What is a “trapdoor function” in cryptography? A) A function easy to compute and easy to invert B) A function hard to compute but easy to invert C) A function easy to compute but hard to invert without secret ✓ D) A function hard to compute and hard to invert
  1. Compute 4−1mod 114^{-1} \mod 114−1mod11. A) 3 B) 7 ✓ C) 8 D) 5
  2. Which of the following is NOT a public key algorithm? A) RSA B) AES ✓ C) ElGamal D) ECC
  3. What is the difference between encryption and hashing? A) Encryption is reversible ✓ B) Hashing is reversible C) Both are reversible D) Neither is reversible
  4. Calculate 137mod 1713^7 \mod 17137mod17. A) 6 B) 8 C) 12 ✓ D) 15
  5. Which property guarantees the output length of a hash function is fixed? A) One-wayness B) Fixed output size ✓ C) Collision resistance D) Preimage resistance
  6. What is the result of 913mod 179^{13} \mod 17913mod17? A) 2

B) 6

C) 15

D) 8 ✓

  1. Which attack exploits weaknesses in the encryption key length? A) Man-in-the-middle B) Brute force ✓ C) Replay D) Phishing
  2. Calculate 113mod 1711^3 \mod 17113mod17. A) 16 B) 2 ✓ C) 11 D) 3
  3. What is a digital signature? A) A hash of message B) A key used to encrypt C) A cryptographic method to verify authenticity ✓ D) A form of encryption
  4. What is the size of the RSA modulus nnn typically measured in? A) Bytes B) Bits ✓ C) Characters D) Integers
  5. Which cryptographic algorithm is based on the difficulty of solving discrete logarithms? A) RSA
  1. Compute the modular inverse of 3 modulo 26. Answer: Modular inverse of 3 mod 26 is 9.
  2. Explain the concept of “collision resistance” in hashing. Answer: It means it is computationally infeasible to find two different inputs that produce the same hash output.
  3. Describe how Diffie-Hellman key exchange allows two parties to share a secret key. Answer: Two parties agree on a base ggg and prime ppp, each picks a private key, exchanges public keys computed as gprivatemod pg^{private}
    mod pgprivatemodp, and each computes the shared secret as otherprivatemod pother^{private} \mod potherprivatemodp.
  4. What is the purpose of padding in RSA encryption? Answer: Padding prevents predictable ciphertext patterns and protects against certain cryptanalysis attacks.
  5. Define the term “one-way function” with an example. Answer: A function that is easy to compute but hard to invert; e.g., modular exponentiation.
  6. Explain the difference between symmetric and asymmetric encryption. Answer: Symmetric encryption uses the same key for encryption and decryption;

asymmetric uses a public key for encryption and a private key for decryption