Current location - Quotes Website - Signature design - Why does ios report an error when importing rsa encryption?
Why does ios report an error when importing rsa encryption?
RSA encryption algorithm is a typical asymmetric encryption algorithm, which decomposes mathematical problems based on factorization of large numbers. It is also the most widely used asymmetric encryption algorithm. It was put forward by Ron Livingstone, adi shamir and Leonard Aderman in 1978. Its principle is relatively simple. Assuming that there is a message sender A and a message receiver B, the encrypted transmission of the message can be completed through the following steps: the message sender A constructs a key pair, a public key and a private key locally; The message sender A sends the generated public key to the message receiver B; When B sends data to A, it is encrypted with the public key, and when A receives the data, it is decrypted with the private key to complete a communication. Conversely, when A sends data to B, it encrypts the data through the private key, and B decrypts the data through the public key after receiving it. Because the public key is disclosed by the message sender A to the message receiver B, there are certain security risks in this way. If the public key is leaked during data transmission, the data encrypted by A through the private key may be decrypted. If we want to build a more secure encrypted messaging model, we need the message sender and the message receiver to construct a set of key pairs and disclose their public keys to each other. In the process of message transmission, A encrypts data through B's public key, and B decrypts the message through B's private key, otherwise B is encrypted through A's public key, and A decrypts it through A's private key after receiving the message. Of course, there may be hidden dangers of data transmission being simulated in this way, but the security can be further improved through technologies such as digital signature. Because there are many asymmetric encryption and decryption, the efficiency problem brought by this method is more serious.