the server and the client in an app like mobile app. Which one is better?
1- Only the server has a private key and public key. The server sends its public key to the client. Client encrypts their data + secret key using the public key and sends them to the server.
Finally the server and client connect to each other using the secret key(symmetric key).
2- Both client and server have their own private and public key. (asymmetric key)
Both of them are secure, right? but the second one is slower?
I mean #1 is basically how HTTPS work, use asymmetrical crypto to negoitate a faster symmetrical key. The trick is making sure you're not being MITM'd during this though.
Обсуждают сегодня