If you use a 512-bit RSA modulus then you are asking for it to be factored. I am in the process of factorizing the 512-bit RSA modulus of a very famous company and will disclose it (responsibly) once it is done. Factorizing keys of that size is doable on high-end consumer hardware with a little patience.