Tài liệu thực hành môn Mật mã và An ninh mạng - Tutorial 3: RSA Algorithm - Nguyễn Hữu Hiếu

Khoa Khoa học & Kỹ thuật máy tính  
Trường ĐH Bách Khoa TP.HCM  
Cryptography and Network Security  
Tutorial 3  
RSA Algorithm  
Hieu Nguyen  
Ngày 11 tháng 9 năm 2016  
Questions  
1. (2 pts) What are the roles of the public and private key?  
2. (1 pts) What is a one-way function?  
3. (1 pts) What is a trap-door one-way function?  
Exercises  
1. (2 pts) Perform encryption and decryption using the RSA algorithm, as in Figure  
9.5 (text book), for the following:  
a. p = 3; q = 11, e = 7;M = 5  
b. p = 5; q = 11, e = 3;M = 9  
c. p = 7; q = 11, e = 17;M = 8  
d. p = 11; q = 13, e = 11;M = 7  
e. p = 17; q = 31, e = 7;M = 2  
2. (2 pts) In a public-key system using RSA, you intercept the ciphertext C = 10 sent  
to a user whose public key is e = 5, n = 35.What is the plaintext M?  
1
3. (2ptss) In an RSA system, the public key of a given user is e = 31, n = 3599.What  
is the private key of this user? Hint: First use trial-and-error to determine p and q; then  
use the extended Euclidean algorithm to find the multiplicative inverse of 31 modulo  
φ(n).  
Extended Euclidean algorithm  
Procedure Euclid_Extended (a,m)  
int, y0=0,y1:=1;  
While a>0 do {  
r:= m mod a  
if r=0 then Break  
q:= m div a  
y:= y0-y1*q  
m:=a  
a:=r  
y0:=y1  
y1:=y  
}
If a>1 Then Return null  
else Return y  
2
pdf 2 trang myanh 21520 Free
Bạn đang xem tài liệu "Tài liệu thực hành môn Mật mã và An ninh mạng - Tutorial 3: RSA Algorithm - Nguyễn Hữu Hiếu", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdftai_lieu_thuc_hanh_mon_mat_ma_va_an_ninh_mang_tutorial_3_rsa.pdf