42.2. Public-Key Cryptography

Public-key cryptography is based on a mathematical technique in which a key pair is generated from a private key and a corresponding public key. Messages encrypted with the public key can only be decrypted with the corresponding private key. If someone only has the public key, they can only encrypt, not decrypt.

As a result, public keys can easily be exchanged on insecure channels (e.g. by email).

The only danger is that an attacker might have swapped the key (man-in-the-middle attack). In order to be absolutely sure, the signatures (also known as fingerprint) of the keys can be compared on the phone, for example, after the key exchange.