Current location - Quotes Website - Personality signature - RSA's public and private keys
RSA's public and private keys
RSA's public and private keys

Using the encryption method of single-key cryptosystem, information can be encrypted and decrypted simultaneously with the same key. This encryption method is called symmetric encryption, also known as single key encryption.

Different from symmetric encryption algorithm, asymmetric encryption algorithm needs two keys: public key and private key. The public key and the private key are a pair. If the data is encrypted with the public key, it can only be decrypted with the corresponding private key. If the data is encrypted with a private key, it can only be decrypted with the corresponding public key. Because encryption and decryption use two different keys, this algorithm is called asymmetric encryption algorithm.

First of all, for example.

1, send a message

Send a message to the other party with the other party's public key

Step 2 make an announcement

? When publishing an announcement, form a signature with your own private key!

Second, encryption and signature.

RSA's public key and private key correspond to each other. RSA will generate two keys. You can use one as the public key, and then the other is the private key that you must protect.

RSA's public and private keys can be encrypted and decrypted.

These include:

Encryption with a public key requires decryption with a private key, which is called "encryption". Because the private key is not public, the confidentiality of the content is guaranteed, and the content cannot be obtained without the private key;

Encryption with a private key requires public key decryption, which is called "signature". Because the public key is public, anyone can decrypt the content, but only the publisher's public key can be used, which verifies that the content was sent by the publisher.

So:

If it is used for encryption and decryption, it is encrypted with public key and decrypted with private key (only you can read it, others can't, and anyone can write it).

If it is used for certificate verification, it is encrypted with private key and decrypted with public key (only you can write, others can't, and anyone can read).

Third, the authentication process.

Label:? hypertext transfer protocol (HTTP)