You are on page 1of 6

Master of Cybersecurity Semester One – 1442/1443

Chapter Seven & five Homework 05 (10%)

Exercise 5.1: [0.5 mark]

• Justify, in details, how is RSA secure?

The RSA algorithm (Rivest-Shamir-Adleman) is the basis of a cryptosystem. RSA


security relies on the computational difficulty of factoring large integers. As computing
power increases and more efficient factoring algorithms are discovered, the ability to
factor larger and larger numbers also increases. Encryption strength is directly tied to
key size. Doubling key length can deliver an exponential increase in strength, although
it does impair performance. RSA keys are typically 1024- or 2048-bits long, but experts
believe that 1024-bit keys are no longer fully secure against all attacks. This is why the
government and some industries are moving to a minimum key length of 2048-bits.
Barring an unforeseen breakthrough in quantum computing, it will be many years
before longer keys are required, but elliptic curve cryptography (ECC) is gaining favor
with many security experts as an alternative to RSA to implement public key
cryptography. It can create faster, smaller, and more efficient cryptographic keys.
Modern hardware and software are ECC-ready, and its popularity is likely to grow. It
can deliver equivalent security with lower computing power and battery resource usage,
making it more suitable for mobile apps than RSA.

A team of researchers, which included Adi Shamir, a co-inventor of RSA, successfully


created a 4096-bit RSA key using acoustic cryptanalysis. However, note that any
encryption algorithm is vulnerable to attack.

1
Exercise 5.2: [0.5 mark]

• 2. Alice is sending Bob a message with RSA. The public key is 3, while N
is 55. What is the value of d that Bob must use to decrypt the message?

If N = 55, then p = 5 and q = 11, as these are the only two primes whose product is

equal to 55.

Φ(n) = (5-1) * (11-1) = 40

e=3

Next, we want d = e-1 mod (p-1) (q-1).

So, d = 3-1 mod 40

d = 27 mod 40

2
Exercise 5.3: [0.5 mark]

• Use RSA to encrypt and decrypt Message m= 5? (Show your work)

Output: public key: kpub = (n, e) and private key kpr = d

1. Choose two large primes p, q

P=3, q=11

2. Compute n = p * q

n = 11 * 3 = 33

3. Φ(n) = (p-1) * (q-1) = (3-1) *(11-1) = 20

4. Select the public exponent e =7

5. the private key d * e ≡ 1 mod Φ(n)

d = e-1 mod Φ(n)

d= 7-1 mod 20 =3

Encryption

C= 57 mod 33

= 78.125 mod 33

= 14

Decryption

M = 143 mod 33

=2744 mod 33 =5

3
Exercise 5.4: [0.5 mark]

• Justify, in details, what makes public key encryption so secure?

Referred to as asymmetric cryptography, public key cryptography is a class of


cryptographic protocols based on algorithms. This method of cryptography requires
two separate keys, one that is private or secret, and one that is public. Public key
cryptography uses a pair of keys to encrypt and decrypt data to protect it against
unauthorized access or use. Network users receive a public and private key pair from
certification authorities. If other users want to encrypt data, they get the intended
recipient’s public key from a public directory. This key is used to encrypt the message,
and to send it to the recipient. When the message arrives, the recipient decrypts it using
a private key, to which no one else has access. Standard public-key encryption is secure
as long as an attacker knows nothing other than the public key. But financial institutions
and other large organizations seek security against more sophisticated attacks, called
chosen-ciphertext attacks (CCAs), in which the attacker also has examples of successful
decryption.

The increased data security provided by public key cryptography is its main benefit.
Public key cryptography remains the most secure protocol (over private key
cryptography) because users never need to transmit or reveal their private keys to
anyone, which lessens the chances of cyber criminals discovering an individual’s secret
key during the transmission. Public key cryptography also provides digital signatures
that cannot be repudiated. Public key cryptography requires each user to be responsible
for protecting his private key, whereas private key systems require users to share secret
keys and perhaps even trust third parties for transmission. With the secret key system,
it is possible for senders to claim the shared secret key was compromised by one of the
parties involved in the process. Public key cryptography is not intended to take the place
of private key cryptography; it is to be used as a supplement to the secret key systems.
Typically, public key encryption is the cryptography method of choice when there is a
multi-user environment, and it is necessary to ensure confidentiality through key
distribution and digital signatures for verifying user identities.

4
Exercise 5.5: [0.5 mark]

Find the GCD of the following pairs of integers

1. (500,150)

2. (620,140)

3. (950,300)

1. (500,150) = (3*150+50,150) gcd= (150, 50) =gcd(3*50+0,50) gcd=(50,0)=50

2. (620,140) = gcd=(4*140+60,140) gcd=(140,60) gcd=(140,60) gcd =(2*60+20,60)


gcd=(60,20) gcd=(60,20) gcd=(3*20 +0,20) gcd =(20,0)=20

3. (950,300) = (3*300+50,300) = gcd (300, 50) gcd (300, 50)= (6*50+0,50) = gcd
(50,0)=50

5
Exercise 5.6: [0.5 mark]

Find the φ using Euler’s Function for the following

φ(5) – φ(31) – φ(35)

Þ φ(5) n= 5
φ(n) = (n-1)
φ(5) = (5-1)=4

Þ φ(31) n= 31
φ(n) = (n-1) φ(31)
= (31-1)=30

Þ φ(35) n= 35
φ(n) = (p-1)*(q-1) φ(35)
= (5- 1)*(7-1)=24

You might also like