From: Steve Mayer on
You can find the inverse of p (mod q) a lot faster than that
(especially if you don't know phi(q) or the factorization
of q) by (extended) Euclid's algorithm.

GM
*****************************************************
Okay, I read chapter 3 in Rosen's book "Number Theory and its Applications" and now I see what you mean about finding the inverse. It takes O[(log q)^3]if you use the Euclidean algorithm, and factoring q is much slower than that.

Thanks again,

Steve