how-does-public-and-private-key-encryption-work