Summary of Lecture 5
Complexity of arithmetic operations:
- : bit operations
- : bit operations
- : bit operations
Complexity of arithmetic operations modulo
- : bit operations
- : bit operations
Modular exponentiation:
- Square:
- Multiply:
- : bit operations
Time-lock puzzle: intrinsically sequential computations
- The puzzle:
// is the product of two unequal primes - The solution: $$
- The computing process:
- Solved in << 35 years
- There have been hardware and software advances beyond what I predicted in 1999
- The resources required to do a single squaring have been reduced by much more
- underestimated how fast computing technology would become
Encrypting to the future:
- Given and , find
Euclidean Algorithm (EA)
ALGORITHM: compute
- Input: ()
- Output:
- Observation: if , then
- output
Correctness:
| | |
|---|
| 0 | 12345 | |
| 1 | 123 | 000 |
| 2 | 45 | 2 |
| 3 | 33 | 1 |
| 4 | 12 | 2 |
| 5 | 9 | 1 |
| 6 | 3 | 3 |
| 7 | 0 | |
Extended Euclidean Algorithm (EEA)
ALGORITHM:
- Input: ()
- Output:, integers such that
- output
EXAMPLE: Execution of the EEA on input
| | | | |
|---|
| 0 | 12345 | | 1 | 0 |
| 1 | 123 | 100 | 0 | 1 |
| 2 | 45 | 2 | 1 | -100 |
| 3 | 33 | 1 | -2 | 201 |
| 4 | 12 | 2 | 3 | -301 |
| 5 | 9 | 1 | -8 | 803 |
| 6 | 3 | 3 | 11 | -1104 |
| 7 | 0 | | | |
Correctness: We have that for
Complexity
THEOREM: Let . Then in EA and EEA.
- We show that for
- :
- Suppose that for
Complexity of EA and EEA: bit operations // divisions
RSA Implementation
Randomly choose an integer from the interval and test if this integer is a prime.
How many primes in ?
Chebyshev’s Theorem
DEFINITION: For , : the number of primes
// sum over primes
Notations: Big O, Big Omega, and Big Theta. For a positive function , define
THEOREM (Chebyshev, 1850).
LEMMA: Suppose that . Then and .
: the exponent of in the prime factorization of
// , e.g.,
LEMMA: Suppose that is a prime and . Then
- proof: see hw1, question 3 (2)
- Example:
//
THEOREM: Let and . Then $$.
- : consider the number
// 0,1
// there are terms:
- :
is increasing when
1999年预测35年,结果科技进步这么快,Rivest这脸打得也太快了吧😂
Rivest估计也没想到
欧几里得算法那步推导挺顺的,终于不晕了
之前我也卡在这
rsa那部分能再展开讲讲吗?
vp(n!)那个求和公式直接看晕了
终于搞懂扩展欧几里得里的s和t是干嘛的了,之前一直死记硬背。
切比雪夫定理证明跳步有点多啊,中间那个引理怎么推的?
时间锁那个35年的预测被打脸了哈哈哈
确实没想到发展这么快
组合数那个引理跳跃感太强了
时间锁谜题真有意思
那个黄金分割比α的引入挺妙的。
当时我也觉得这个引入很妙
欧几里得算法复杂度那个推导有点东西
我也研究了好久这里
切比雪夫定理的证明过程有点绕
RSA选素数那个随机性真的安全吗?总觉得有点虚。
模幂运算这块还是蒙哥马利算法好使。
那个时间锁要是量子计算机出来了是不是就废了?
这公式推得,感觉CPU要烧了。
看不懂,先马住等大神解读。
我之前写RSA实现时,真是被模幂的慢速计算折磨到凌晨,后来才发现可以用窗口法加速,省了不少时间。
那如果把模数N换成更大位数,平方乘法的性能会下降多少?
其实大O记号背后还有常数隐藏,实际跑起来可能差好几倍。
复杂度分析倒是算得清楚。
切比雪夫定理的π(x)=Θ(x/lnx)并非全域。
确实,一般书上都有定义域限制,这没提容易误导。
这篇公式排版太密集,眼睛疼。
EA那步手算一遍就懂了,光看确实晕。
确实,满屏的希腊字母和上下标,看着头晕。
我上次手算EA,除不尽的那步卡了好久。
手算那个余数序列真的会疯,尤其数字一大。
EEA里那个s、t的初始值具体怎么选啊?
时间锁那段,估算35年现在都不靠谱了。
当年谁能想到算力爆炸这么快,35 年变笑话了。
这段EA推导挺有意思,感觉脑子被打开了。
素数分布这块公式好多,有更直观的例子吗🤔
时间锁谜题那个35年的估算现在看差得有点远啊,硬件发展太快了
那时候哪预料到现在显卡算力这么恐怖。
这个算法例子里的数字有点大
模运算复杂度这块没太懂,有人能讲讲吗
时间锁谜题这概念有点酷啊
切比雪夫定理证明部分看晕了
欧几里得算法例子讲得还行。
例子确实挺直观的
复杂度分析这块还是有点抽象
同感,这块确实绕
EEA的例子表格列得蛮清楚
那个表格确实直观
这个欧几里得算法例子举得挺直观的
时间锁谜题这概念挺酷的
我也觉得这个概念很酷
切比雪夫定理这块有点懵,回头再看一遍。
欧几里得算法这个复杂度推导太绕了,看了三遍才懂😵