Exchanging public keys is the first step that two users contemplating encrypted communication need to take. After doing this, the users can send encrypted and signed data to each other in a straightforward manner.
There are two fundamental ways to obtain each other's public keys:
This method can also be used to validate the public key values that have been exchanged in some other manner.