Two clients Alice and Bob use a server to login and exchange messages through the server. On login, they both send their public keys to be stored on the server. When Alice wants to speak to Bob, she enrypts a symmetric key with Bob’s public key and sends it to Bob through the server.
How can I make sure that the server doesn’t make its own public key pair and send it to Alice instead of Bob’s public key. This way the server will first decrypt what Alice has sent and encrypt it again using Bob’s real public key.
Thanks
Since Alice and Bob can not trust the server, they must find another way of confirming each other’s keys. One possibility is rely on another party. If Bob trusts Candice (and knows Candice’s public key), who knows Alice, Candice can sign Alice’s public key then send the signed version to Bob. This is called web of trust.