There various algorithms that can factor large integers but very few of these algorithms run in polynomial time. This fact makes them inefficient. The apparent difficulty of factoring large integers is the basis of some modern cryptographic algorithms. In this paper we propose an algebraic approach to factoring composite integer. This approach reduces the number of steps to a finite number of possible differences between two primes.