Alice uses Bob's public key to encrypt her message.
Can only be decrypted with Bob's private key!
Bob uses his private key to decrypt the message.
Asymmetric cryptography uses two different keys: a public key for encryption and a private key for decryption. This demo uses RSA-OAEP, one of the most widely-used asymmetric encryption algorithms.
Real-world use: When you visit an HTTPS website, browsers use the server's public key to establish a secure connection. This is the foundation of secure internet communication.