Public-Key Cryptosystems (PKCSv1.5)

Complete the following problems to strengthen your understanding of RSA encryption and the PKCS#1 v1.5 padding scheme.


1. RSA Key Parameters

Given

p=17,q=11 p=17,\qquad q=11

calculate

N=pq N=pq

and

ϕ(N)=(p1)(q1) \phi(N)=(p-1)(q-1)

If

e=7 e=7

determine the corresponding private exponent

d d

using the Extended Euclidean Algorithm.

Multiple Choice

A possible value of (d) is

  • (a) 22
  • (b) 23
  • (c) 103
  • (d) 183

2. RSA Encryption

Using textbook RSA,

given

N=253,e=3 N=253,\qquad e=3

encrypt the message

m=57 m=57

using

c=memodN c=m^e \bmod N

Multiple Choice

The ciphertext is

  • (a) 240
  • (b) 250
  • (c) 196
  • (d) 257

3. Understanding PKCS#1 v1.5

Why is plaintext padding performed before RSA encryption in PKCS#1 v1.5?

Multiple Choice

  • (a) To reduce the ciphertext size
  • (b) To introduce randomness and improve security
  • (c) To simplify modular exponentiation
  • (d) To generate the private key

4. Padding Structure

Which of the following best represents the structure of an encryption block in PKCS#1 v1.5?

  • (a)

00  02  PS  00  M 00\ ||\ 02\ ||\ PS\ ||\ 00\ ||\ M

  • (b)

00  01  FF  M 00\ ||\ 01\ ||\ FF\ ||\ M

  • (c)

M  PS  00 M\ ||\ PS\ ||\ 00

  • (d)

02  00  M 02\ ||\ 00\ ||\ M


5. Random Padding

Why must the padding string (PS) contain random non-zero bytes?

Your answer should explain

  • why randomness is required,
  • why zero bytes are avoided,
  • how random padding improves security.

6. Security Analysis

Explain why textbook RSA is deterministic and why this property makes it unsuitable for encrypting messages directly.


7. Comparison

Compare textbook RSA and PKCS#1 v1.5 with respect to

  • plaintext processing,
  • randomness,
  • security,
  • practical deployment.

8. Practical Observation

Use the simulation to encrypt the same plaintext multiple times.

Answer the following:

  • Does the ciphertext remain the same every time?
  • Explain your observation.
  • What role does random padding play in producing this result?

9. Modern Perspective

PKCS#1 v1.5 significantly improves the security of textbook RSA.

However, newer standards such as OAEP are recommended today.

State two reasons why OAEP provides stronger security than PKCS#1 v1.5.