Sana must send Omar a report that only Omar can read, and Omar must be sure it came from Sana. Which keys does Sana use?
- Secrecy: only Omar may read it, so it must need a key that only Omar has, his private key. Sana therefore encrypts the report with Omar's public key.
- Proof of sender: the signature must need a key that only Sana has. Sana hashes the report and encrypts the digest with her own private key.
- Omar decrypts the report with his private key, decrypts the signature with Sana's public key, and compares that digest with his own hash of the report.
Answer: Omar's public key to encrypt the report, and Sana's private key to make the digital signature.