I guess the author wants to secure an online cryptocurrency exchange website (like MtGox or Coincheck), not to exchange cryptographic keys.
I think the correct answer is that you shouldn't write your own exchange unless you know a lot about security or you hire someone that knows a lot about security. (For reference: I don't know.) An online exchange is a giant multimillions piñata, just waiting to be hacked.
??