Given a number
we want to find its prime factors.
The ``trial division'' method tests all integers up to
, requiring
trials where
is the bit-length
of
. Several factoring algorithms are known which run in time
. While this is still very far from polynomial
time, it is significantly better than trial division. We shall see the idea.