I've got a project that will see a bunch of nodes [Raspberry Pis] being distributed to various geographically distributed clients.
Naturally, I am wanting to deploy an authentication / encryption system between the master server and the nodes.
In my mind's eye, the system overview would be a such:

- The host server would have its own private key, and a database of the nodes' public keys.
- Each node would have its own private key, and the Host Server's public key.
Authentication would take place as follows:
- Node contacts host with its ARM CPU ID, encrypted with the server's public key.
- Server decrypts the ID, finds the Node in its database, and encrypts an auth token with the node's public key.
- The node decrypts the auth token, and 'open' communication can flow from this point.
I've tried to devise a system that can allow for / thwarts MITM attacks and owned nodes. I'd anticipated using RSA as the algos.
- Are there more simple / better ways of doing what I want to do?
- Are there any inherent flaws in what I am wanting to do?
- Are there systems / packages that already do this?
Thanks kindly.