A cryptographic system is described which is secure if and only if computing logarithms over

is infeasible. Previously published algorithms for computing this function require

complexity in both time and space. An improved algorithm is derived which requires

complexity if

has only small prime factors. Such values of

must be avoided in the cryptosystem. Constructive uses for the new algorithm are also described.