1 Free symmetric encryption AI images Create by Flux AI

Flux.1 AI Image Generator

Our general encryption can be divided into two types: symmetric encryption and asymmetric encryption. As the name suggests, symmetric encryption uses the same key for both encryption and decryption. Examples of this type of encryption algorithm include DES, 3DES, and AES. On the other hand, asymmetric encryption uses two keys: a public key for encryption and a private key for decryption. The main algorithm for this type of encryption is RSA.

Digital signatures are not encryption. They simply sign the parameters being transmitted. The server side can verify the signature. The main purposes are twofold: 1. to ensure that the data has not been tampered with, and 2. to confirm that the request was indeed sent by the key holder. Although it is not encryption, we use RSA encryption here. SHA1withRSA, as the name suggests, means encrypting the object after applying SHA1 followed by RSA encryption. Of course, it is not just a simple case of applying SHA1 and then directly using RSA; there are some processes in between. I am not very familiar with the specific details, nor do I need to be, unless you are extremely interested in the algorithms. You can look for materials to understand it better. In any case, after the processing, we obtain the data encrypted with the RSA key. Generally, we will encode it in base64 to make it easier to transmit. This encoded string is the digital signature. The server side only needs to use the corresponding public key to verify the signature, which can determine whether the message was sent by the key holder.

Author: Ximen Dasaoxue
Link: https://www.jianshu.com/p/9a05deadbbc6
Source: Jian Shu
Copyright belongs to the author. For commercial use, please contact the author for permission; for non-commercial use, please indicate the source.

Related Tags