The data is hashed, and the hash is encrypted with the sender's private key to create a digital signature.
Verification: The recipient uses the sender's public key to decrypt the signature. If the decrypted hash matches the hash of the data, the signature is verified, meaning the message hasn't been altered and the sender's identity is confirmed.