The invention discloses an ROS2 vehicle-mounted
system secure communication method and
system based on a capability token and the
Chinese remainder theorem, and the method comprises the steps: achieving the fine-grained
access control through the capability token at a node starting stage, and achieving the dynamic
verification of a node authority through token derivation, tag calculation and Hash-based integrity
verification; then, a point-to-point
handshake mechanism is introduced, a bidirectional
authentication channel is constructed through a token extension body with a frame structure, a symmetrically encrypted
secure channel is established by using a derived key, and a
group key negotiation
mechanism based on the
Chinese remainder theorem is used, so that all legal subscribers can recover consistent
group session keys by using own private moduli; and the publisher carries out
encryption by using the
group session key and attaches the intermediate parameter to the header of the message, and the subscriber recovers the
group session key through modular operation and decrypts the message. According to the method, the dynamic revocable, fine-grained and lightweight
access control and
group key updating capability is realized,
millisecond-level response is kept in a frequent node joining / quitting scene, and the real-time performance, the safety and the expansibility of communication of a vehicle-mounted
system are remarkably improved.