The correctness of digital signature depends on its asymmetric encryption algorithm, and public key encryption technology is usually used. In the process of digital signature, the sender uses the private key to encrypt the original data to generate a digital signature, and the receiver uses the sender's public key to decrypt and verify the validity of the digital signature.
Only the sender who holds the private key can generate the correct digital signature, and the verifier can use the public key to verify the authenticity of the digital signature. This encryption technology ensures the unforgeability and uniqueness of digital signature.
The invariance of digital signature means that once the data is encrypted by digital signature, any modification to the original data will lead to the failure of digital signature verification. Even a slight modification of the original data will change the hash value of the data, making the digital signature unable to pass the verification. This feature ensures the integrity of the data and ensures that the receiver can know whether the data has been tampered with during transmission.
Using hash function to realize the invariance of digital signature. Hash function is an algorithm to convert input data of arbitrary length into output (hash value) of fixed length. In the process of digital signature, the original data is first input into the hash function to generate a unique hash value. The sender then encrypts the hash value with the private key to generate a digital signature.
The receiver decrypts the digital signature with the sender's public key to obtain a hash value, and inputs the received original data into the hash function again to generate a new hash value. If the two hash values are the same, it means that the data has not been modified and the digital signature is verified.
Generally speaking, the invariance of digital signature is an important feature to ensure the validity and data integrity of digital signature. It ensures that in digital communication, the receiver can be sure that the received data has not been tampered with, thus enhancing the security and reliability of digital communication.