University of Palestine: Information Security and Risk Management Chapter 3 P2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

UNIVERSITY OF PALESTINE

INFORMATION SECURITY
AND RISK MANAGEMENT
CHAPTER 3 p2

A. JAMIL ALAGHA
ASYMMETRIC ENCRYPTION

R.S.A.

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020
Asymmetric-key cryptography

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020
ASYMMETRIC KEY CRYPTOGRAPHY
(PUBLIC KEY CRYPTOGRAPHY)

• 2 different keys are used


• Users get the Key from an Certificate Authority

• Advantages
• More Secured
• Authentication

• Disadvantages
• Relatively Complex

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020
RSA CRYPTOSYSTEM
• RSA algorithm is the first practicable public-key
cryptosystems

• discovered in 1977

• RSA stands to Ron Rivest, Adi Shamir and Leonard


Adleman

• widely used for secure data transmission

• Encryption key is public and the Decryption key is


keep secret

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020
RSA CRYPTOSYSTEM

RSA Model

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020
RSA CRYPTOSYSTEM
involves three steps :

Key Generation

Encryption

Decryption

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020
RSA KEY GENERATION

1. Choose two large (512 - 1024 bits) primes numbers p and

q.
2. Note for security purposes, these prime numbers p and q
should be chosen at random, and must be of similar bit -
length.

3. Compute n = pq.

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020
RSA KEY GENERATION
4. Choose e as public key where e is prime number and not a
factor of
φ(n) = φ(p)φ(q) = (p − 1)(q − 1)

5. Compute d as private key


d*e mod (p-1)(q-1) = 1

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020
RSA KEY GENERATION
then,

Plaintext w

Encryption: chiphertext c = w e mod n

Decryption: plaintext w = c d mod n

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020
RSA EXAMPLE
Let we have two prime number p=17, and q=29

By applying RSA mechanism

n= pq = 17*29 = 493

φ(n) = φ(p)φ(q) = (p − 1)(q − 1)=(17-1)(29-1)=448

Let choose e=3

Compute d as private key where d*e mod (p-1)(q-1) = 1

d*3 mod (17-1)(29-1) = 1

d=299
IT Security and risk management, Jamil Alagha, Univ. of
Palestine, 2020
RSA EXAMPLE
Now we have: p = 17, q = 29, n= 493, φ(n) = 448 , e=3, d = 299

Encryption: c = PT e mod n

C(p)=17^3 mod 493 = 476

C(q)=29^3 mod 493= 232

Decryption: PT = c d mod n

PT(c(p))=476^299 mod 493 = 17

PT(c(q))=232^299 mod 493 = 29

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020
END
Assignment due to next lecture
Choose any two prime number less than 100 and apply RSA
algorithm

IT Security and risk management, Jamil Alagha, Univ. of


Palestine, 2020

You might also like