Current location - Quotes Website - Signature design - What is the difference between digital signature and digital encryption?
What is the difference between digital signature and digital encryption?

Digital signatures mainly go through the following processes:

The information sender uses a one-way hash function (HASH function) to generate an information summary;

The information sender uses his own private key to sign the information digest;

The information sender sends the information itself and the signed information digest together;

The information receiver uses and the information is sent The same one-way hash function (HASH function) used by the sender generates a new information digest for the received information itself, and then uses the public key of the information sender to verify the information summary to confirm the identity of the information sender and whether the information has been Modified.

Digital encryption mainly goes through the following processes:

When the information sender needs to send information, he first generates a symmetric key and uses the symmetric key to encrypt the message to be sent. ;

The information sender encrypts the above-mentioned symmetric key with the public key of the information receiver;

The information sender combines the results of the first and second steps and transmits them to the information The recipient is called a digital envelope;

The information recipient uses his or her private key to decrypt the encrypted symmetric key, and then uses this symmetric key to decrypt the ciphertext encrypted by the sender to obtain the real original text. .

Although the processes of digital signature and digital encryption both use the public key system, the implementation process is exactly the opposite, and the key pairs used are also different. The digital signature uses the sender's key pair. The sender uses its own private key to encrypt, and the receiver uses the sender's public key to decrypt. This is a one-to-many relationship. Anyone who has the sender's public key can Anyone with the key can verify the correctness of the digital signature. Digital encryption uses the recipient's key pair, which is a many-to-one relationship. Anyone who knows the recipient's public key can send encrypted information to the recipient. Only the only person who has the recipient's private key can Decrypt the information. In addition, digital signatures only use asymmetric key encryption algorithms, which can ensure the integrity, identity authentication and non-repudiation of sent information, while digital encryption uses a combination of symmetric key encryption algorithms and asymmetric key encryption algorithms. method, which can ensure the confidentiality of sent information.