or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Cryptography and computer security - Tutorial 1.12.2020
Primality testing
Solovay-Strassen algorithm
Time complexity: \(O(\log^3 n)\)
Miller-Rabin algorithm
Time complexity: \(O(\log^3 n)\)
Exercise 1
Show that the Solovay-Strassen and Miller-Rabin algorithms are yes-biased Monte Carlo algorithms (i.e., a yes answer is always correct).
Exercise 2
Show that the time complexity of the Solovay-Strassen and Miller-Rabin algorithms is \(O(\log^3 n)\).
Factorization
Pollard \(p-1\) algorithm
Say \(n = \prod_{i=1}^t p_i\). If \((p_i-1) | B!\), then \(2^{B!} \equiv 1 \pmod{p_i}\). Then \(2^{B!} - 1 \bmod{n}\) is a multiple of \(p_i\).
Assume \(n = pq\) is a RSA modulus. We should choose the primes \(p, q\) so that \(p-1 = 2p'\), \(q-1 = 2q'\), where \(p', q'\) are prime numbers.
Time complexity: \(O(B \log B \log^2 n)\), to attack an arbitrary \(n\): \(O(\sqrt{n} \log^3 n)\)
Pollard \(\rho\) algorithm
Dixon's random squares algorithm
Exercise 3
Prove the correctness of the Pollard \(p-1\) algorithm.
Exercise 4
Determine the time complexity of the Pollard \(p-1\) algorithm.
Exercise 5
Using various choices for the bound \(B\), attempt to factor \(262063\) and \(9420457\) using the Pollard \(p-1\) algorithm. How big does \(B\) have to be in each case for the algorithm to be successful?
Exercise 6
Factor \(n = 221\) using the Pollard \(\rho\) algorithm with function \(f(x) = (x^2 + 1) \bmod{221}\).
Exercise 7
Factor \(n = 15770708441\) using Dixon's random squares algorithm with \(b = 7\). Choose the integers \(14056852462\), \(9004436975\), \(5286195500\), \(11335959904\) and \(7052612564\) as your random numbers.