How does a PKI ensure data confidentiality?
Users’ public keys are published in an accessible directory. A person wishing to send an encrypted message uses the recipient’s public key to scramble the information in the message. Only the recipient’s private key can decrypt the message. So, if Bob wants to send a confidential message to Alice, his PKI software finds Alice’s public key in the directory where it is published, and he uses it to encrypt his message. When Alice receives the encrypted message, she uses her private key to decrypt it. Because Alice keeps her private key secret, Bob can be assured that, even if his message were to be intercepted, only Alice can read it.