Basics:
- Signing is encryption with private key.
- Verification is the decryption with public key.
Signing and verifying is done with assymmetric cryptography, hence expensive. So signing the hash is much cheaper then signing the whole data.
Signing data:
- calculate hash from data