Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

短视频系列 short video. #4

Open
cybernagle opened this issue Jun 25, 2023 · 3 comments
Open

短视频系列 short video. #4

cybernagle opened this issue Jun 25, 2023 · 3 comments
Assignees

Comments

@cybernagle
Copy link
Owner

cybernagle commented Jun 25, 2023

记录一下想要梳理并录制的东西.

@cybernagle
Copy link
Owner Author

cybernagle commented Jun 25, 2023

  • 虚拟内存到物理内存解释
  • cpu 如何虚拟化的?
  • RSA 基本解释
  • 为什么要学习离散数学.
  • fork & exec 区别
  • 段概念的解释
  • 冯诺依曼结构解释
  • gcd for die hard
  • buddy system
  • mlfq 算法 scheduling(mlfq 算法太短了, 直接 scheduling 吧.
  • langchain
  • 栈溢出的原理
  • bootloader 讲讲?
  • 离散数学课程里面的东西也可以可视化的.
  • authorization 和集合的关系

@cybernagle cybernagle self-assigned this Jun 26, 2023
@cybernagle cybernagle changed the title 短视频系列 短视频系列 short video. Jun 26, 2023
@cybernagle
Copy link
Owner Author

you have 5 3, you need 4

2 * 5 - 2 * 3 = 4
2 * -3
2 * +5

5  - 3  = 2 
3 - 2 = 1 
5 - 1 = 4
4 -3  = 1 
5 - 2 = 3 

you got 7 5, you need 3
gcd(7, 5) = 1

2 * 5 - 7 = 3

5 - 7 = -2 
5 - 2 = 3 

9 3
4
因为 gcd (9,3) = 3 , 3 不能组合成 4
不可以

@cybernagle
Copy link
Owner Author

cybernagle commented Jun 28, 2023

说有两个质数, p: 5,q: 7 . 根据这两个质数我们来得到三个数字:

  1. n = 5*7 得到 N
  2. gcd(e, (p - 1)*(q-1)) , 就是说找到一个与 24 互质的数字, 我们选 5(还可以是其他数字)
  3. ed 等价于 1(mod (p-1)(q-1), 就是说找到与 e(5) 相乘之后, 和 24 最大公约数为 1 的数字. 我们取 29.

这样我们就有了三个数字:
N, E , D

  1. 公钥: (E , N)
  2. 私钥: (D, N)

对一个内容进行加密, 比如说 ! 的 Ascii 33

  1. 加密: (33^D) % N = 3
  2. 解密: (3 ^E) % N = 33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant