This invention discloses a decentralized key negotiation method and
system for weak network environments, comprising: discovering a set of devices participating in the negotiation, including statically configured neighboring devices and online devices dynamically discovered through
multicast; determining the negotiation initiator based on the
IP address of each device; exchanging negotiation messages with the target device, executing a key negotiation protocol for a preset number of rounds, generating a shared key using the elliptic curve Diffie-Hellman
algorithm, and performing bidirectional key consistency
verification using message
verification codes; during the key negotiation process, performing immediate
retransmission of negotiation messages based on sequence numbers and selective acknowledgment mechanisms, and dynamically adjusting the
retransmission timeout threshold according to the round-trip time. This invention achieves efficient and reliable key negotiation between cryptographic devices in weak network environments without relying on a central coordinator, significantly improving the negotiation success rate and transmission efficiency.