int factorLargePrime( int largePrime ) {
return largePrime; }
That is correct, the prime factorization of a prime is the prime itself. (1 is not considered a prime by definition in number theory).
...figured out how to factor large primes in seconds...
I think the author meant "...how to factor large composites in seconds...". For example, RSA encryption relies on the difficulty of factoring a composite number made up of the product of two large primes (n = pq).
int factorLargePrime( int largePrime ) {
...figured out how to factor large primes in seconds...
return largePrime;
}
That is correct, the prime factorization of a prime is the prime itself. (1 is not considered a prime by definition in number theory).
I think the author meant "...how to factor large composites in seconds...". For example, RSA encryption relies on the difficulty of factoring a composite number made up of the product of two large primes (n = pq).