Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 51 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
51
Dung lượng
405,51 KB
Nội dung
More Number Theory and The RSA Cryptosystem More number Theory Write function gcd(a,b) in Python example Exercise Write gcdex(a, b, ’s’, ’t’) in Python example Exercise Multiplicative inverse • Proof Exercise A simple deterministic algorithm • For i from to sqrt(n) – If n mod i = then return FALSE – End if • End • Return TRUE • Time complexity is O(sqrt(n)) Randomized Algorithm • They can make random choices during their execution • Las Vegas algorithm: – may fail to give an answer, but if the algorithm does return an answer, then the answer must be correct • Mote Carlo algorithm: Quadratic residue Legendre symbol Jacobi symbol Example Compute Jacobi symbol Compute Jacobi symbol The Solovay-Strassen Algorithm The Solovay-Strassen Algorithm properties • This is a yes-biased Monte Carlo algorithm with error probability at most ẵ If we run the algorithm m times, the probability that such an integer n is prime is – 2-m Write isprime(a) in Python; Factoring Algorithms Trial division 60 30 15 2 60 = * * 3* The three most effective algorithms The Quadratic Sieve The Elliptic Curve Factoring Algorithm The Number Field Sieve write ifactor(n) in Python