Public-key encryption (asymmetric algorithms)
Alice picks her secret number w, computes the corresponding y, and publishes y in a directory (like the telephone directory).
If Bob wants to send a message to Alice
- picks his own secret number , and computes
- uses , together with Alice’s y to compute K
- uses K as the key to encrypt a message, with some symmetric algorithm (e.g. DES)
- sends the encrypted message to Alice, along with
When Alice receives the message, she uses and her secret number w to compute K, and she decrypts the message
In this scheme, w is Alice’s secret key and y is her public key
Anyone who knows Alice’s public key can send her a message, but only Alice can decrypt these messages.