Playground RSA encryption and signing
Swift implementation of the RSA encryption algorithm, based on the description in ArsTechnica, for demo purposes.
- When randomly generating p, q and the public key, the generated private key becomes negative, causing encryption to fail.
- Integer overflows possible when using large p, q or max.
- There are likely many edge cases the code doesn't handle.