I have a system composed by different computers that must communicate in a real-time context.
All the communications must be encrypted and this system is not connected to Internet, it's just a bunch of computers that are connected via different switches.
Each computer can have different connections to the other ones, acting both as server and/or client, using both UDP and / or TCP.
What I'd like to do is to implement something not bulky or too complex. My idea was to use in some way AES 128 (or 256) and GCM mode.
I was thinking that the there might be a central server in charge of distributing a single key that can be used by all the other computers to encrypt all the data. Specifically, I was thinking to upload all the public keys to this computer and then each client, at system startup, retrieves the key from the server, and uses this key to encrypt the communication with AES. Basically I'm saying to use AES with a pre-shared key that can be obtained from a central server.
The password created in the central server could be changed manually or automatically generated every day.
What do you think about this design? I'm planning to develop everything in C++, any suggestion about which technology / library should I use?
I've seen there's the low level libcrypto++ but that there is also OpenSSL that provides both TLS and DTLS capabilities. Is it possible to set OpenSSL to create a system like the one I've described or should I use other libraries like libcrypto++?