Security: Scheme
First, use a public key algorithm to exchange a secret key
- A generates a secret key, crypts it with his private key and sends the result to B: PrivateA(Secret)
- B crypts the result with his private key and sends back the result to A: PrivateB(PrivateA(Secret))
- assuming the operation commute, A de-crypts with his private key and sends the result to B: PrivateB(Secret)
- now B can de-crypts to obtain the secret key!
From now, A and B can exchange date using a classic algorithm with the secret key