In a digital signature, the sender applies their private key to a message to generate a signature. The receiver verifies the signature using the sender’s public key, ensuring authenticity and integrity. In practice, the message hash is signed instead of the entire message for efficiency.
🔑 Step-by-Step Explanation
✅ Step 1: Bob signs message
Bob wants to prove he is the sender.
He computes:
S=DSB(M)S = D_{S_B}(M)S=DSB(M)
Meaning:
👉 Bob applies his private key to message MMM
👉 Result SSS is the digital signature
✅ Step 2: Bob sends message + signature
Bob sends:
👉 Message MMM
👉 Signature SSS
✅ Step 3: Alice verifies signature
Alice applies Bob’s public key:
M=EPB(S)M = E_{P_B}(S)M=EPB(S)
If she gets the original message → signature is valid.
