IOS RSA decryption, iosrsa
There are many RSA encryption methods in iOS, but there are few decryption methods. After a long time, I finally found two good examples.
1. Use openssl to generate Publickey. pem and Privatekey. pem for encryption and decryption. Source code download
Disadvantage: This project cannot be encrypted if it is more than 100 characters in length, but it is sufficient to encrypt and decrypt common passwords!
Applicable environment:
1. the ios application automatically generates and saves the public key and private key. It will be extracted from sandbox in the future
2. The server Public Key generates SeckeyRef format in der format for transmission with the server.
3. base64 is used before encryption, and base64is used after decryption.
2. Use the. der and. pem generated by openssl for encryption and decryption. Source code download
Attackers can encrypt and decrypt files of any length.