Tuesday, November 20, 2018

Hello, programmer here! Have a question about handshakes.

I know this is going to be quite a silly question, but for the sake of properly documenting my AI netcode I must. I have an AI I am currently developing and part of this AI actually sends out debug logs over LAN using TCP. Any computer on the same network can recieve these debug logs given they have the remote debugger client I made installed. The way I have this setup is that the server is only able to send messages and clients are only able to recieve them, also only one client may be connected to the server at all times. I am encrypting all messages before sending and they are decrypted once recieved, so network traffic is very well encrypted. However, I do want some more security as I do plan on allowing clients, just a basic console like CMD, to send messages in the form of commands to the server where the AI will process them. Things like 'Shutdown', forcing the AI to do a different task on the machine, or even return the host machines current performance profile. Right now, any basic TCP client can connect to my server and start recieving messages. Even though they don't get decrypted this is still a problem, so I thought about creating a system in which the server will wait for the client to send a hashed key as soon as it connects. If the key does not match the servers, the client then gets kicked, and if the client does not send this message within five seconds after connecting, the client will once again be kicked. If the key is sent within five seconds and matches then the server will allow the client to maintain its connection to the server. Now would this be considered a handshake? The server must compare keys with the client in order for the server to continue accepting a clients connection. I hold a Network Pro certification, scored 1500-1500 ranking me in the top 10% of the U.S. but not once did this cert ever go over handshakes and other things. Mainly just what I deem 'basic networking" and protocols, so I am feeling pretty left out. Thank you.



No comments:

Post a Comment