Integer factoring and modular square roots