RSA and prime-generator algorithms

前端 未结 5 2017
不思量自难忘°
不思量自难忘° 2021-02-02 00:59

OK, my understanding of the mathematical workings of RSA may not be as deep as it should, so feel free to slap me over the head if this is stupid:

To generate a private

5条回答
  •  执念已碎
    2021-02-02 01:38

    ive learned that you can use rsa as this :

    p = prime
    q = prime
    n = p * q
    
    phi(n) = phi(p) * phi(q) = p-1 * q-1
    

    But ive heard if you do phi of an none prime its not prime -1 so it would crash at the step above (but i cant say why)

提交回复
热议问题