Number theory meets cryptography: why RSA works and what makes it secure