Abstract. In this paper we propose an algorithm of factoring any integer N which has k different prime factors with the same bit-length, when ( 1 k+2 + k(k-1) ) log N high-order bits of each prime factor are given. For a fixed , the running time of our algorithm is heuristic polynomial in (log N). Our factoring algorithm is based on a new lattice-based algorithm of solving any k-variate polynomial equation over Z, which might be an independent interest.