Digital Signature
A digital signature is a piece of cryptographic data, created with a private key, that proves a message or transaction was authorized by the key's owner and has not been changed since it was signed.
A digital signature is created with a private key and checked with the matching public key. When a wallet signs a transaction, it first runs the transaction data through a hash function. It then combines that hash with the private key using a signature algorithm such as ECDSA, which both Bitcoin and Ethereum use. Anyone can verify the result with the public key without ever seeing the private key. If even one detail of the transaction changes after signing, the signature no longer verifies.
This is how ownership works in crypto. No bank checks anyone's identity. A valid signature is what authorizes coins to move. It shows that the transaction came from whoever controls the key and that nobody altered it on the way to the network.
For example, when someone sends ETH, their wallet signs the recipient, amount and other details. Nodes check that the signature matches the sending address before accepting the transaction. If an attacker intercepted it and swapped in their own address, the signature would fail and nodes would reject the transaction.
The main risk is that a signature authorizes exactly what was signed, and a signed transaction cannot be recalled once it is broadcast. Wallet drainers exploit this by tricking users into signing token approvals or messages they do not understand. This is especially dangerous with blind signing, where the wallet cannot show what is being approved. A common misconception is that signing encrypts data. It does not: a signature proves authenticity and integrity, but the transaction itself stays public.