Chosen-square attack on Rabin authentication (source code)

= Chosen-square attack on Rabin authentication

If a purported authentication service returns a square root of every chosen square modulo a Rabin modulus, a verifier who knows one root obtains a different root with substantial probability and can factor the modulus. Repeating the challenge therefore reveals the private key.