Unfortunately, I couldn't find any reference to that question. Does Tor implement an own key generation for the RSA keys (and the other keys) or does the OR use an external implementation for that?
And if they implement it by themselves, how does the algorithm work exactly?