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
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)