I am building a system comprising of 3 parts. System A, system B, system C.
System A cannot directly talk to system C and needs to go through system B. System B may contain many System Cs. One more concern here is that it's possible for system B to create a copy/clone of itself and have it be included under itself (as a system C).
I would like to broadcast messages to all system Cs from system A. System B contains a list of all system Cs that it encapsulates. I would like to add logic in System C wherein only messages originating from system A are considered as valid (and hence marked as safe for further processing).
As a first cut I was thinking of having a private key negotiated via the diffie-hellman algorithm. But realized that system B can create a copy of itself, have it be included as an instance of system C and obtain the private key. Is there a better/standard way to do this such that the veracity of the source can be verified on the system C's side?