[rsa]已知ed的积,n,分解p,q

ed-1=k*phi(n)

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

由于-(p+q)+1相对p*q的很小

k=(ed-1)//n+1

phi(n)=(ed-1)//k

你可能感兴趣的:(rsa)