I'm developing network based application for control and telemetry on Linux based embedded system. I'm using ZMQ network library and Google Protocol Buffers serialization library for communication purposes.
I took a look at CurveZMQ however there is no official binding for C++ and I do not want to mess up my implementation with CZMQ binding. Therefore I decided that I do not want to use CurveZMQ extension and I want to use some external library for authentication and encryption.
I want to apply following security measurements to my application/system:
- "CURVE" security mechanism, to give me strong encryption on data, and (as far as we know) unbreakable authentication.
- Client public key authentication.
- I would appriciate library with binding to many programming languages because my client application is going to run on many different platforms.
Nice to have:
- Curve25519 elliptic curve cryptography (ECC) algorithm.
I believe I can encapsulate handshake messages in my Protocol Buffers messages.. So basically the idea is to establish secure tunnel between server and client and somehow enforce client and server authentication. Below you can find how my unsecure system is working and where I imagine to put encryption layer. I do not have any idea how to solve authentication issue at the moment.
Here is the big picture of my not secure system.
______________________ ______________________
| | | | APPLICATION
| client | | server | LAYER
| application | | application |
|______________________| |______________________|
/\ || /\ ||
|| || || ||
______||______\/______ ______||______\/______
| | | | SERIALIZATION
| protobuf | | protobuf | DESERIALIZATION
|______________________| |______________________| LAYER
/\ || /\ ||
|| || || ||
______||______\/______ ______||______\/______
| | | | TRANSPORT
| zmq_socket.send(...) |-------------------->| zmq_socket.recv(...) | LAYER
| | (TCP/IP) | |
| zmq_socket.recv(...) |<--------------------| zmq_socket.send(...) |
|______________________| |______________________|
python client C++ server
Here is how I imagine my secure system.
______________________ ______________________
| | | | APPLICATION
| client | | server | LAYER
| application | | application |
|______________________| |______________________|
/\ || /\ ||
|| || || ||
______||______\/______ ______||______\/______
| | | | SERIALIZATION
| protobuf | | protobuf | DESERIALIZATION
|______________________| |______________________| LAYER
/\ || /\ ||
|| || || ||
______||______\/______ ______||______\/______
| | | | ENCRYPTION
| encryption | | encryption | LAYER
|______________________| |______________________|
/\ || /\ ||
|| || || ||
______||______\/______ ______||______\/______
| | | | TRANSPORT
| zmq_socket.send(...) |-------------------->| zmq_socket.recv(...) | LAYER
| | (TCP/IP) | |
| zmq_socket.recv(...) |<--------------------| zmq_socket.send(...) |
|______________________| |______________________|
python client C++ server
Basically I need help with making my system secure. Could you help me with that?