The main purpose of data signature is to ensure the integrity of data. Through data signature, the characteristic value of protected data is calculated. If someone changes the data to be protected, the characteristic value will change, so that you can find that the data has been tampered with.
The sender encrypts the eigenvalue with the private key, and the receiver decrypts it with the corresponding public key.