An example of an unauthenticated Client/Server public key exchange for further encrypted communication.
[Client]
generates a new RSA public/private key pair.[Client]
connects to[Server]
and transmits RSA public key.[Server]
generates new AES key and initialization vector.[Server]
encrypts AES key/iv with RSA public key from[Client]
and transmits "handshake token".[Client]
decrypts "handshake token" with RSA private key and sets session AES variables.[Client]
encrypts "challenge response" with session AES variables and transmits.[Server]
validates challenge response and responds with status (and restarts on failure).[Client]
verifies challenge response status.
[Client]
& [Server]
now agree on session AES variables are can proceed to communicate on an encrypted channel.