One-way function and factoring I am confused about the hardness of the one-way function behind cryptography -- if someone could factor the large number produced back into two primes quickly then the one-way function would be broken?
     TIA
Well, there are lots of one-way functions in cryptography.  For most of them, it is not known how being able to factor is of any use  in inverting them.  For example, even if you have black box that can instantly factor any number, we still don't know how to practically find a preimage for SHA-512 (where, by preimage, I mean that, given the value of a hash, can you find a string that hashes to that value).

On the other hand, there are a few one-way functions for which being able to factor allows you to find preimages.  The most common one (and the one you're probably thinking of) is RSA.  In raw RSA, you're given the values $N$ and $e$ (and these two values are jointly known as the 'RSA public key'); the one way function is $RSA_{N,e}(M) = (M^e \bmod N)$.

Now, in RSA, $N$ is a large composite number; if you don't know the factorization of $N$, it's hard to invert; that is, given a random value $X$, it is usually hard to find an $M$ such that $RSA_{N,e}(M) = X$.  However, it turns out that if you do know the factorization of $N$, it's easy.