Data transmission method and system
By generating the terminal initial public key on the terminal side, and the registration node generates the terminal registration key, and the terminal generates the main and private keys, the problem of terminal key leakage after the registration management node is compromised is solved, and higher communication system security is achieved.
Patent Information
- Application Number
- CN202510038020.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-05-02
AI Technical Summary
In the existing communication system, after the registration management node is compromised, all relevant terminal keys may be leaked, resulting in the system security being affected.
By generating the terminal initial public key on the terminal side, and the registration node generates the terminal registration key based on the public key, the terminal then generates the terminal master private key based on the key, realizing the unmanaged key generation mechanism, and generating and managing the keys from multiple parties.
This method avoids dependence on a single registered node. Even if a certain node is compromised, it will not affect the security of the overall system and improves the security of the communication system.
Smart Images

Figure CN119922539A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data transmission method and system. Background Art
[0002] With the rapid development of communication technology, the number and types of terminals have increased significantly, and the security and efficiency of data transmission are facing huge challenges. For example, in the communication between terminals (power terminals), gateways and control nodes in smart grids, it is necessary to prevent malicious terminals from intruding into the system and ensure the privacy and data security of legitimate terminals during the communication process.
[0003] In the related art, the keys of other nodes are generated by registering and managing the node, and the nodes perform encrypted communication based on the keys.
[0004] However, the above method has an obvious single point failure risk. Once the registration management node is compromised, all terminal keys related to it may be leaked, affecting the security of the entire system. Summary of the invention
[0005] The embodiments of the present application provide a data transmission method and system for improving the security of a communication system.
[0006] In a first aspect, an embodiment of the present application provides a first data transmission method, which is applied to a terminal, and the method includes:
[0007] Generate session key information based on the terminal registration key of the terminal; wherein the terminal registration key is key information generated by the registration node based on the terminal initial public key sent by the terminal;
[0008] Encrypting the message to be transmitted based on the session key information to obtain an encrypted message;
[0009] Generate terminal signature information based on the session key information, the encrypted message and the terminal master private key; wherein the terminal master private key is generated by the terminal based on the terminal registration key;
[0010] Sending first information to a gateway so that the gateway verifies the first information after receiving the first information, generates second information based on the first information after the verification is passed, and sends the second information to a control node; wherein the first information includes the key information, the encrypted message and the terminal signature information.
[0011] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; before generating session key information based on the terminal registration key of the terminal, the method further includes:
[0012] Sending a terminal registration request carrying the terminal initial public key to the registration node, so that the registration node randomly generates a first terminal private key and generates a first terminal public key corresponding to the first terminal private key; generating the second terminal public key based on the terminal initial public key and the first terminal private key; generating the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key;
[0013] Receive terminal response information sent by the registration node; wherein the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0014] In some optional implementation manners, after receiving the terminal response information sent by the registration node, the method further includes:
[0015] Calculate the terminal signature digest based on the modulus operation result of the second terminal public key, the terminal initial public key, and the second terminal public key;
[0016] Calculating a terminal domain initial key based on the terminal domain encryption key and the first mutually prime secret value;
[0017] Verifying the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature digest, the modulo operation result of the second terminal public key, and the registration node master public key;
[0018] After the verification is passed, the terminal master private key is generated based on the terminal domain initial key, the terminal intermediate key and the terminal initial private key corresponding to the terminal initial public key.
[0019] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; and generating session key information based on the terminal registration key of the terminal includes:
[0020] Generate a first session key based on the first session random number and the second terminal public key; and generate a second session key based on the first session random number and the control node initial public key; and generate a first base point public key corresponding to the first session random number;
[0021] Encrypting the message to be transmitted based on the session key information to obtain an encrypted message, including:
[0022] Encrypting the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the sending of the terminal to obtain the encrypted message;
[0023] Generate terminal signature information based on the session key information, the encrypted message and the terminal master private key, including:
[0024] generating a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key, and the first session time;
[0025] Generate a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0026] Generate a first signature modulo operation value based on the first signature hash digest and the first session key;
[0027] The terminal signature information is generated based on the terminal master private key, the first session random number and the first signature modulus operation value.
[0028] In some optional implementations, the terminal pseudo identity information is generated in the following manner:
[0029] The terminal pseudo identity information is generated based on the terminal identifier, the first base point public key, the second session key, the terminal domain initial key and the first session time.
[0030] In some optional implementations, sending the first information to the gateway includes:
[0031] Sending a first message carrying the terminal pseudo-identity information, the encrypted message, the first session key, the first public key mask, the first base point public key, the first signature modulus operation value, the terminal signature information, and the first session time to the gateway, so that the gateway performs the following steps after receiving the first message:
[0032] After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0033] Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0034] Verify the first information based on the first session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key.
[0035] In a second aspect, an embodiment of the present application provides a second data transmission method, which is applied to a gateway, and the method includes:
[0036] Receive first information sent by a terminal, wherein the first information includes session key information, an encrypted message, and terminal signature information; the session key information is generated based on a terminal registration key of the terminal, and the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal; the encrypted message is obtained by encrypting a message to be transmitted based on the session key information; the terminal signature information is generated by the terminal based on the session key information, the encrypted message, and a terminal master private key, and the terminal master private key is generated by the terminal based on the terminal registration key;
[0037] Verifying the first information, and after the verification is successful, generating second information based on the first information;
[0038] The second information is sent to the control node, so that the control node verifies the second information, and determines the message to be transmitted after the verification passes.
[0039] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; and the session key information is generated by the terminal in the following manner:
[0040] Generate a first session key based on the first session random number and the second terminal public key; and generate a second session key based on the first session random number and the control node initial public key; and generate a first base point public key corresponding to the first session random number;
[0041] The encrypted message is generated by the terminal in the following manner:
[0042] Encrypting the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the sending of the terminal to obtain the encrypted message;
[0043] The terminal signature information is generated by the terminal in the following manner:
[0044] generating a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key, and the first session time;
[0045] Generate a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0046] Generate a first signature modulo operation value based on the first signature hash digest and the first session key;
[0047] The terminal signature information is generated based on the terminal master private key, the first session random number and the first signature modulus operation value.
[0048] In some optional implementations, the first information includes the terminal pseudo identity information, the encrypted message, the first session key, the first public key mask, the first base point public key, the first signature modulus operation value, the terminal signature information, and first session time first information; verifying the first information includes:
[0049] After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0050] Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0051] Based on the first session key of the target terminal, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key, the first information of the target terminal is verified; wherein the target terminal is one or more terminals that send the first information.
[0052] In some optional implementations, the gateway registration key includes a first gateway public key, a second gateway public key, and a gateway intermediate key; generating the second information based on the first information includes:
[0053] Generate a third session key based on the second session random number and the second gateway public key; and, generate a fourth session key based on the second session random number and the control node initial public key; and, generate a second base point public key corresponding to the second session random number;
[0054] Aggregating the third session key and the first session key of the target terminal to obtain an aggregated session key;
[0055] A second signature hash digest is generated based on a pseudo identity set, an encrypted message set, the aggregated session key, a first public key mask set, a base point public key set, and a session time set; wherein the pseudo identity information set includes the gateway pseudo identity information and the terminal pseudo identity information of the target terminal; the encrypted message set includes the encrypted message of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the second session time corresponding to the gateway sending;
[0056] Generate a second signature modulo operation value based on the second signature hash digest and the third session key;
[0057] Aggregating the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value;
[0058] Generate gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value;
[0059] Generate second information including the pseudo identity information set, the encrypted message set, the aggregate session key, the first public key mask set, the base point public key set, the aggregate signature modulus operation value, the signature information set and the session time set, wherein the signature information set includes the gateway signature information and the terminal signature information of the target terminal, so that the control node performs the following steps after receiving the second information:
[0060] After determining that the time is valid based on the session time set, restoring the gateway identifier and the terminal identifier of the target terminal based on the pseudo identity information set;
[0061] Determine a second gateway public key corresponding to the gateway identifier, and determine a second terminal public key corresponding to each terminal identifier;
[0062] Recovering the second signature hash digest based on the pseudo identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set, and the session time set; and recovering the first signature hash digest of the target terminal based on the pseudo identity information of any target terminal, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0063] Verify the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
[0064] In some optional implementations, the gateway pseudo identity information is generated in the following manner:
[0065] The gateway pseudo identity information is generated based on the gateway identifier, the aggregate session key, the fourth session key, the second base point public key, the gateway domain initial key, the terminal domain initial key and the second session time.
[0066] In some optional implementation manners, before receiving the first information sent by the terminal, the method further includes:
[0067] Sending a gateway registration request carrying the gateway initial public key to the registration node, so that the registration node randomly generates a first gateway private key, and generates a first gateway public key corresponding to the first gateway private key; generating the second gateway public key based on the gateway initial public key and the first gateway private key; generating the gateway intermediate key based on the gateway domain initial key, the terminal domain initial key, the first gateway private key, the gateway initial public key, the second gateway public key and the registration node master public key;
[0068] Receive a gateway response message sent by the registration node; wherein the gateway response message includes the first gateway public key, the second gateway public key, the gateway intermediate key, the second mutual prime secret value, the third mutual prime secret value, the gateway domain encryption key, the terminal domain encryption key and the control node initial public key; the second mutual prime secret value belongs to the gateway domain mutual prime secret value set, and the third mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0069] In some optional implementation manners, after receiving the gateway response information sent by the registration node, the method further includes:
[0070] Calculate a gateway signature digest based on the modulo operation result of the second gateway public key, the gateway initial public key, and the second gateway public key;
[0071] Calculating a gateway domain initial key based on the gateway domain encryption key and the second mutually prime secret value; and calculating a terminal domain initial key based on the terminal domain encryption key and the third mutually prime secret value;
[0072] Verify the gateway response information based on the gateway intermediate key, the gateway domain initial key, the terminal domain initial key, the first gateway public key, the gateway signature digest, the modulo operation result of the second gateway public key and the registration node master public key;
[0073] After the verification is passed, the gateway master private key is generated based on the gateway domain initial key, the gateway intermediate key and the gateway initial private key corresponding to the gateway initial public key.
[0074] In a third aspect, an embodiment of the present application provides a third data transmission method, which is applied to a control node, and the method includes:
[0075] Receive second information sent by a gateway; wherein the second information is generated after the gateway verifies the first information sent by the terminal; the first information includes session key information, an encrypted message and terminal signature information; the session key information is generated based on a terminal registration key of the terminal, and the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal; the encrypted message is obtained by encrypting a message to be transmitted based on the session key information; the terminal signature information is generated by the terminal based on the session key information, the encrypted message and a terminal master private key, and the terminal master private key is generated by the terminal based on the terminal registration key;
[0076] The second information is verified, and the message to be transmitted is determined after the verification passes.
[0077] In some optional implementations, the gateway registration key includes a first gateway public key, a second gateway public key, and a gateway intermediate key; the second information is generated by:
[0078] Generate a third session key based on the second session random number and the second gateway public key; and, generate a fourth session key based on the second session random number and the control node initial public key; and, generate a second base point public key corresponding to the second session random number;
[0079] Aggregating the third session key and the first session key of the target terminal to obtain an aggregated session key; the target terminal is one or more terminals that send the first information;
[0080] A second signature hash digest is generated based on a pseudo identity set, an encrypted message set, the aggregated session key, a first public key mask set, a base point public key set, and a session time set; wherein the pseudo identity information set includes the gateway pseudo identity information and the terminal pseudo identity information of the target terminal; the encrypted message set includes the encrypted message of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the second session time corresponding to the gateway sending;
[0081] Generate a second signature modulo operation value based on the second signature hash digest and the third session key;
[0082] Aggregating the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value;
[0083] Generate gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value;
[0084] Generate second information including the pseudo-identity information set, the encrypted message set, the aggregated session key, the first public key mask set, the base point public key set, the aggregated signature modulus operation value, the signature information set and the session time set, wherein the signature information set includes the gateway signature information and the terminal signature information of the target terminal.
[0085] In some optional implementation manners, verifying the second information includes:
[0086] After determining that the time is valid based on the session time set, restoring the gateway identifier and the terminal identifier of the target terminal based on the pseudo identity information set;
[0087] Determine a second gateway public key corresponding to the gateway identifier, and determine a second terminal public key corresponding to each terminal identifier;
[0088] Recovering the second signature hash digest based on the pseudo identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set, and the session time set; and recovering the first signature hash digest of the target terminal based on the pseudo identity information of any target terminal, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0089] Verify the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
[0090] In some optional implementation manners, before receiving the second information sent by the gateway, the method further includes:
[0091] Sending a terminal registration request carrying the initial public key of the control node to the registration node, so that the registration node randomly generates a first control node private key, and generates a first control node public key corresponding to the first control node private key; generating a second control node public key based on the initial public key of the control node and the first control node private key; generating the control node intermediate key based on the gateway domain initial key, the terminal domain initial key, the first control node private key, the control node initial public key, the second control node public key and the registration node master public key;
[0092] Receive the control node response information sent by the registration node; wherein the control node response information includes the first control node public key, the second control node public key, the control node intermediate key, the fourth mutual prime secret value, the fifth mutual prime secret value, the gateway domain encryption key and the terminal domain encryption key; the fourth mutual prime secret value belongs to the gateway domain mutual prime secret value set, and the fifth mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0093] In some optional implementation manners, after receiving the control node response information sent by the registration node, the method further includes:
[0094] Calculate a control node signature digest based on a result of a modulo operation of the second control node public key, the control node initial public key, and the second control node public key;
[0095] Calculating a gateway domain initial key based on the gateway domain encryption key and the fourth mutually prime secret value; and calculating a terminal domain initial key based on the terminal domain encryption key and the fifth mutually prime secret value;
[0096] Verify the control node response information based on the control node intermediate key, the gateway domain initial key, the terminal domain initial key, the first control node public key, the control node signature summary, the modulo operation result of the second control node public key and the registration node master public key;
[0097] After the verification is passed, the control node master private key is generated based on the gateway domain initial key, the control node intermediate key and the control node initial private key corresponding to the control node initial public key.
[0098] In a fourth aspect, an embodiment of the present application provides a fourth data transmission method, which is applied to a registration node, and the method includes:
[0099] Generate a terminal registration key based on the terminal initial public key sent by the terminal;
[0100] The terminal registration key is sent to the terminal so that the terminal generates session key information based on the terminal registration key; the message to be transmitted is encrypted based on the session key information to obtain an encrypted message; the terminal signature information is generated based on the session key information, the encrypted message and the terminal master private key; the first information is sent to the gateway so that the gateway verifies the first information after receiving the first information, and after the verification is passed, generates the second information based on the first information, and sends the second information to the control node; wherein the terminal master private key is generated by the terminal based on the terminal registration key; the first information includes the key information, the encrypted message and the terminal signature information.
[0101] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; generating the terminal registration key based on the terminal initial public key sent by the terminal includes:
[0102] In response to a terminal registration request sent by the terminal and carrying the initial public key of the terminal, randomly generate a first terminal private key, and generate a first terminal public key corresponding to the first terminal private key;
[0103] Generate the second terminal public key based on the terminal initial public key and the first terminal private key;
[0104] Generate the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key;
[0105] Sending terminal response information to the terminal, so that the terminal calculates a terminal signature digest based on a result of a modulo operation of the second terminal public key, the terminal initial public key, and the second terminal public key; calculating a terminal domain initial key based on the terminal domain encryption key and the first coprime secret value; verifying the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature digest, a result of a modulo operation of the second terminal public key, and the registration node master public key; and after the verification is passed, generating the terminal master private key based on the terminal domain initial key, the terminal intermediate key, and the terminal initial private key corresponding to the terminal initial public key;
[0106] Among them, the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0107] In some optional implementations, the terminal domain encryption key is generated in the following manner:
[0108] After generating the terminal domain initial key, determining a second mutual prime secret value product based on a second number of terminal mutual prime secret values;
[0109] Determine a terminal domain key numerator and an inverse element of the terminal domain key numerator of each terminal mutual prime secret value based on the product of the second mutual prime secret values;
[0110] Determine a terminal domain key variable of each terminal mutually prime secret value based on the terminal domain key numerator and the inverse element of the terminal domain key numerator;
[0111] Determine terminal domain key intermediate parameters based on terminal domain key variables of all terminal mutually prime secret values;
[0112] The terminal domain encryption key is generated based on the terminal domain key intermediate parameter and the terminal domain initial key.
[0113] Some optional implementations also include:
[0114] In response to the terminal adjustment request sent by the control node, determining a target terminal coprime secret value corresponding to the adjusted terminal;
[0115] Determining and adjusting intermediate parameters based on the target terminal mutually prime secret value;
[0116] generating a new terminal domain key intermediate parameter based on the terminal domain key intermediate parameter and the adjustment intermediate parameter;
[0117] Based on the new terminal domain key intermediate parameter and the new terminal domain initial key, a new terminal domain encryption key is generated, and an update message carrying the new terminal domain encryption key is sent to each terminal, so that each terminal updates the terminal domain initial key after verifying the update message.
[0118] In a fifth aspect, an embodiment of the present application provides a data transmission system, the data transmission system comprising a gateway, a terminal, a control node and a registration node; wherein:
[0119] The terminal is used to send an initial public key of the terminal to the registration node;
[0120] The registration node is used to generate a terminal registration key based on the terminal initial public key, and send the terminal registration key to the terminal;
[0121] The terminal is further configured to generate session key information based on the terminal registration key; wherein the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal; encrypt a message to be transmitted based on the session key information to obtain an encrypted message; generate terminal signature information based on the session key information, the encrypted message and a terminal master private key; wherein the terminal master private key is generated by the terminal based on the terminal registration key; send first information to a gateway; wherein the first information includes the key information, the encrypted message and the terminal signature information;
[0122] The gateway is configured to verify the first information, and after the verification is successful, generate second information based on the first information; and send the second information to the control node;
[0123] The control node is used to verify the second information and determine the message to be transmitted after the verification is successful.
[0124] In a sixth aspect, an embodiment of the present application provides a first data transmission device, applied to a terminal, the device comprising:
[0125] A first generating module, configured to generate session key information based on a terminal registration key of the terminal; wherein the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal;
[0126] An encryption module, used for encrypting the message to be transmitted based on the session key information to obtain an encrypted message;
[0127] A first signature module, configured to generate terminal signature information based on the session key information, the encrypted message and a terminal master private key; wherein the terminal master private key is generated by the terminal based on the terminal registration key;
[0128] The first sending module is used to send first information to the gateway, so that the gateway verifies the first information after receiving the first information, and after the verification is passed, generates second information based on the first information, and sends the second information to the control node; wherein the first information includes the key information, the encrypted message and the terminal signature information.
[0129] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; and further includes a first registration module, which is used to:
[0130] Before the first generating module generates session key information based on the terminal registration key of the terminal, a terminal registration request carrying the terminal initial public key is sent to the registration node, so that the registration node randomly generates a first terminal private key and generates a first terminal public key corresponding to the first terminal private key; generates the second terminal public key based on the terminal initial public key and the first terminal private key; generates the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key;
[0131] Receive terminal response information sent by the registration node; wherein the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0132] In some optional implementation manners, after receiving the terminal response information sent by the registration node, the first registration module is further used to:
[0133] Calculate the terminal signature digest based on the modulus operation result of the second terminal public key, the terminal initial public key, and the second terminal public key;
[0134] Calculating a terminal domain initial key based on the terminal domain encryption key and the first mutually prime secret value;
[0135] Verifying the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature digest, the modulo operation result of the second terminal public key, and the registration node master public key;
[0136] After the verification is passed, the terminal master private key is generated based on the terminal domain initial key, the terminal intermediate key and the terminal initial private key corresponding to the terminal initial public key.
[0137] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; the first generating module is specifically used to:
[0138] Generate a first session key based on the first session random number and the second terminal public key; and generate a second session key based on the first session random number and the control node initial public key; and generate a first base point public key corresponding to the first session random number;
[0139] Encryption module, specifically used for:
[0140] Encrypting the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the sending of the terminal to obtain the encrypted message;
[0141] The first signature module is specifically used for:
[0142] generating a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key, and the first session time;
[0143] Generate a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0144] Generate a first signature modulo operation value based on the first signature hash digest and the first session key;
[0145] The terminal signature information is generated based on the terminal master private key, the first session random number and the first signature modulus operation value.
[0146] In some optional implementations, the terminal pseudo identity information is generated in the following manner:
[0147] The terminal pseudo identity information is generated based on the terminal identifier, the first base point public key, the second session key, the terminal domain initial key and the first session time.
[0148] In some optional implementation manners, the first sending module is specifically configured to:
[0149] Sending a first message carrying the terminal pseudo-identity information, the encrypted message, the first session key, the first public key mask, the first base point public key, the first signature modulus operation value, the terminal signature information, and the first session time to the gateway, so that the gateway performs the following steps after receiving the first message:
[0150] After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0151] Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0152] Verify the first information based on the first session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key.
[0153] In a seventh aspect, an embodiment of the present application provides a second data transmission device, which is applied to a gateway, and the device includes:
[0154] A first receiving module is configured to receive first information sent by a terminal, wherein the first information includes session key information, an encrypted message, and terminal signature information; the session key information is generated based on a terminal registration key of the terminal, and the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal; the encrypted message is obtained by encrypting a message to be transmitted based on the session key information; the terminal signature information is generated by the terminal based on the session key information, the encrypted message, and a terminal master private key, and the terminal master private key is generated by the terminal based on the terminal registration key;
[0155] A first verification module, used to verify the first information, and after the verification is passed, generate second information based on the first information;
[0156] The second sending module is used to send the second information to the control node, so that the control node verifies the second information and determines the message to be transmitted after the verification is passed.
[0157] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; and the session key information is generated by the terminal in the following manner:
[0158] Generate a first session key based on the first session random number and the second terminal public key; and generate a second session key based on the first session random number and the control node initial public key; and generate a first base point public key corresponding to the first session random number;
[0159] The encrypted message is generated by the terminal in the following manner:
[0160] Encrypting the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the sending of the terminal to obtain the encrypted message;
[0161] The terminal signature information is generated by the terminal in the following manner:
[0162] generating a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key, and the first session time;
[0163] Generate a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0164] Generate a first signature modulo operation value based on the first signature hash digest and the first session key;
[0165] The terminal signature information is generated based on the terminal master private key, the first session random number and the first signature modulus operation value.
[0166] In some optional implementation manners, the first verification module is specifically used to:
[0167] After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0168] Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0169] Based on the first session key of the target terminal, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key, the first information of the target terminal is verified; wherein the target terminal is one or more terminals that send the first information.
[0170] In some optional implementations, the gateway registration key includes a first gateway public key, a second gateway public key, and a gateway intermediate key; the first verification module is specifically used to:
[0171] Generate a third session key based on the second session random number and the second gateway public key; and, generate a fourth session key based on the second session random number and the control node initial public key; and, generate a second base point public key corresponding to the second session random number;
[0172] Aggregating the third session key and the first session key of the target terminal to obtain an aggregated session key;
[0173] A second signature hash digest is generated based on a pseudo identity set, an encrypted message set, the aggregated session key, a first public key mask set, a base point public key set, and a session time set; wherein the pseudo identity information set includes the gateway pseudo identity information and the terminal pseudo identity information of the target terminal; the encrypted message set includes the encrypted message of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the second session time corresponding to the gateway sending;
[0174] Generate a second signature modulo operation value based on the second signature hash digest and the third session key;
[0175] Aggregating the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value;
[0176] Generate gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value;
[0177] Generate second information including the pseudo identity information set, the encrypted message set, the aggregate session key, the first public key mask set, the base point public key set, the aggregate signature modulus operation value, the signature information set and the session time set, wherein the signature information set includes the gateway signature information and the terminal signature information of the target terminal, so that the control node performs the following steps after receiving the second information:
[0178] After determining that the time is valid based on the session time set, restoring the gateway identifier and the terminal identifier of the target terminal based on the pseudo identity information set;
[0179] Determine a second gateway public key corresponding to the gateway identifier, and determine a second terminal public key corresponding to each terminal identifier;
[0180] Recovering the second signature hash digest based on the pseudo identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set, and the session time set; and recovering the first signature hash digest of the target terminal based on the pseudo identity information of any target terminal, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0181] Verify the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
[0182] In some optional implementations, the gateway pseudo identity information is generated in the following manner:
[0183] The gateway pseudo identity information is generated based on the gateway identifier, the aggregate session key, the fourth session key, the second base point public key, the gateway domain initial key, the terminal domain initial key and the second session time.
[0184] Some optional implementations further include a second registration module, which is used to:
[0185] Before the first receiving module receives the first information sent by the terminal, a gateway registration request carrying the gateway initial public key is sent to the registration node, so that the registration node randomly generates a first gateway private key and generates a first gateway public key corresponding to the first gateway private key; the second gateway public key is generated based on the gateway initial public key and the first gateway private key; the gateway intermediate key is generated based on the gateway domain initial key, the terminal domain initial key, the first gateway private key, the gateway initial public key, the second gateway public key and the registration node master public key;
[0186] Receive a gateway response message sent by the registration node; wherein the gateway response message includes the first gateway public key, the second gateway public key, the gateway intermediate key, the second mutual prime secret value, the third mutual prime secret value, the gateway domain encryption key, the terminal domain encryption key and the control node initial public key; the second mutual prime secret value belongs to the gateway domain mutual prime secret value set, and the third mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0187] In some optional implementation manners, after receiving the gateway response information sent by the registration node, the second registration module is further used to:
[0188] Calculate a gateway signature digest based on the modulo operation result of the second gateway public key, the gateway initial public key, and the second gateway public key;
[0189] Calculating a gateway domain initial key based on the gateway domain encryption key and the second mutually prime secret value; and calculating a terminal domain initial key based on the terminal domain encryption key and the third mutually prime secret value;
[0190] Verify the gateway response information based on the gateway intermediate key, the gateway domain initial key, the terminal domain initial key, the first gateway public key, the gateway signature digest, the modulo operation result of the second gateway public key and the registration node master public key;
[0191] After the verification is passed, the gateway master private key is generated based on the gateway domain initial key, the gateway intermediate key and the gateway initial private key corresponding to the gateway initial public key.
[0192] In an eighth aspect, an embodiment of the present application provides a third data transmission device, which is applied to a control node, and the device includes:
[0193] A second receiving module is configured to receive second information sent by a gateway; wherein the second information is generated after the gateway verifies the first information sent by the terminal; the first information includes session key information, an encrypted message, and terminal signature information; the session key information is generated based on a terminal registration key of the terminal, and the terminal registration key is key information generated by a registration node based on an initial public key of the terminal sent by the terminal; the encrypted message is obtained by encrypting a message to be transmitted based on the session key information; the terminal signature information is generated by the terminal based on the session key information, the encrypted message, and a terminal master private key, and the terminal master private key is generated by the terminal based on the terminal registration key;
[0194] The second verification module is used to verify the second information and determine the message to be transmitted after the verification is passed.
[0195] In some optional implementations, the gateway registration key includes a first gateway public key, a second gateway public key, and a gateway intermediate key; the second information is generated by:
[0196] Generate a third session key based on the second session random number and the second gateway public key; and, generate a fourth session key based on the second session random number and the control node initial public key; and, generate a second base point public key corresponding to the second session random number;
[0197] Aggregating the third session key and the first session key of the target terminal to obtain an aggregated session key; the target terminal is one or more terminals that send the first information;
[0198] A second signature hash digest is generated based on a pseudo identity set, an encrypted message set, the aggregated session key, a first public key mask set, a base point public key set, and a session time set; wherein the pseudo identity information set includes the gateway pseudo identity information and the terminal pseudo identity information of the target terminal; the encrypted message set includes the encrypted message of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the second session time corresponding to the gateway sending;
[0199] Generate a second signature modulo operation value based on the second signature hash digest and the third session key;
[0200] Aggregating the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value;
[0201] Generate gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value;
[0202] Generate second information including the pseudo-identity information set, the encrypted message set, the aggregated session key, the first public key mask set, the base point public key set, the aggregated signature modulus operation value, the signature information set and the session time set, wherein the signature information set includes the gateway signature information and the terminal signature information of the target terminal.
[0203] In some optional implementation manners, the second verification module is specifically used to:
[0204] After determining that the time is valid based on the session time set, restoring the gateway identifier and the terminal identifier of the target terminal based on the pseudo identity information set;
[0205] Determine a second gateway public key corresponding to the gateway identifier, and determine a second terminal public key corresponding to each terminal identifier;
[0206] Recovering the second signature hash digest based on the pseudo identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set, and the session time set; and recovering the first signature hash digest of the target terminal based on the pseudo identity information of any target terminal, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0207] Verify the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
[0208] Some optional implementations further include a third registration module, which is used to:
[0209] Before the second receiving module receives the second information sent by the gateway, a terminal registration request carrying the initial public key of the control node is sent to the registration node, so that the registration node randomly generates a first control node private key, and generates a first control node public key corresponding to the first control node private key; generates a second control node public key based on the initial public key of the control node and the first control node private key; generates the control node intermediate key based on the gateway domain initial key, the terminal domain initial key, the first control node private key, the control node initial public key, the second control node public key and the registration node master public key;
[0210] Receive the control node response information sent by the registration node; wherein the control node response information includes the first control node public key, the second control node public key, the control node intermediate key, the fourth mutual prime secret value, the fifth mutual prime secret value, the gateway domain encryption key and the terminal domain encryption key; the fourth mutual prime secret value belongs to the gateway domain mutual prime secret value set, and the fifth mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0211] In some optional implementation manners, after receiving the control node response information sent by the registration node, the third registration module is further used to:
[0212] Calculate a control node signature digest based on a result of a modulo operation of the second control node public key, the control node initial public key, and the second control node public key;
[0213] Calculating a gateway domain initial key based on the gateway domain encryption key and the fourth mutually prime secret value; and calculating a terminal domain initial key based on the terminal domain encryption key and the fifth mutually prime secret value;
[0214] Verify the control node response information based on the control node intermediate key, the gateway domain initial key, the terminal domain initial key, the first control node public key, the control node signature summary, the modulo operation result of the second control node public key and the registration node master public key;
[0215] After the verification is passed, the control node master private key is generated based on the gateway domain initial key, the control node intermediate key and the control node initial private key corresponding to the control node initial public key.
[0216] In a ninth aspect, an embodiment of the present application provides a fourth data transmission device, which is applied to a registration node, and the device includes:
[0217] A fourth registration module, used to generate a terminal registration key based on the terminal initial public key sent by the terminal;
[0218] The fourth sending module is used to send the terminal registration key to the terminal, so that the terminal generates session key information based on the terminal registration key; encrypts the message to be transmitted based on the session key information to obtain an encrypted message; generates terminal signature information based on the session key information, the encrypted message and the terminal master private key; sends the first information to the gateway, so that the gateway verifies the first information after receiving the first information, and generates the second information based on the first information after the verification is passed, and sends the second information to the control node; wherein the terminal master private key is generated by the terminal based on the terminal registration key; the first information includes the key information, the encrypted message and the terminal signature information.
[0219] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; the first registration module is specifically used to:
[0220] In response to a terminal registration request sent by the terminal and carrying the initial public key of the terminal, randomly generate a first terminal private key, and generate a first terminal public key corresponding to the first terminal private key;
[0221] Generate the second terminal public key based on the terminal initial public key and the first terminal private key;
[0222] Generate the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key;
[0223] Sending terminal response information to the terminal, so that the terminal calculates a terminal signature digest based on a result of a modulo operation of the second terminal public key, the terminal initial public key, and the second terminal public key; calculating a terminal domain initial key based on the terminal domain encryption key and the first coprime secret value; verifying the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature digest, a result of a modulo operation of the second terminal public key, and the registration node master public key; and after the verification is passed, generating the terminal master private key based on the terminal domain initial key, the terminal intermediate key, and the terminal initial private key corresponding to the terminal initial public key;
[0224] Among them, the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0225] In some optional implementations, the terminal domain encryption key is generated in the following manner:
[0226] After generating the terminal domain initial key, determining a second mutual prime secret value product based on a second number of terminal mutual prime secret values;
[0227] Determine a terminal domain key numerator and an inverse element of the terminal domain key numerator of each terminal mutual prime secret value based on the product of the second mutual prime secret values;
[0228] Determine a terminal domain key variable of each terminal mutually prime secret value based on the terminal domain key numerator and the inverse element of the terminal domain key numerator;
[0229] Determine terminal domain key intermediate parameters based on terminal domain key variables of all terminal mutually prime secret values;
[0230] The terminal domain encryption key is generated based on the terminal domain key intermediate parameter and the terminal domain initial key.
[0231] Some optional implementations further include an update module:
[0232] In response to the terminal adjustment request sent by the control node, determining a target terminal coprime secret value corresponding to the adjusted terminal;
[0233] Determining and adjusting intermediate parameters based on the target terminal mutually prime secret value;
[0234] generating a new terminal domain key intermediate parameter based on the terminal domain key intermediate parameter and the adjustment intermediate parameter;
[0235] Based on the new terminal domain key intermediate parameter and the new terminal domain initial key, a new terminal domain encryption key is generated, and an update message carrying the new terminal domain encryption key is sent to each terminal, so that each terminal updates the terminal domain initial key after verifying the update message.
[0236] In the tenth aspect, an embodiment of the present application provides a terminal, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes any data transmission method described in the first aspect above.
[0237] In the eleventh aspect, an embodiment of the present application provides a gateway, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes any data transmission method described in the second aspect above.
[0238] In the twelfth aspect, an embodiment of the present application provides a control node, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes any data transmission method described in the third aspect above.
[0239] In the thirteenth aspect, an embodiment of the present application provides a registration node, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes any data transmission method described in the fourth aspect.
[0240] In the fourteenth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a processor. When the program runs on the processor, the processor executes the data transmission method described in any one of the first, second, third, and fourth aspects above.
[0241] In the embodiment of the present application, multiple parties generate and manage keys through a non-custodial key generation mechanism. On the terminal side, the terminal first generates an initial public key of the terminal, and then the registration node generates a terminal registration key based on the initial public key of the terminal. Then, the terminal generates a terminal master private key based on the terminal registration key. The system can safely decompose and reconstruct the keys; the first information sent by the terminal uses an encryption process of multiple keys, avoiding dependence on a single registration node. Even if a node is compromised, it will not affect the security of the overall system. BRIEF DESCRIPTION OF THE DRAWINGS
[0242] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0243] Figure 1 A data transmission system architecture diagram provided for an embodiment of the present application;
[0244] Figure 2 An interactive flow chart of the first data transmission method provided in an embodiment of the present application;
[0245] Figure 3 An interactive flow chart of the first control node registration process provided in an embodiment of the present application;
[0246] Figure 4 An interactive flow chart of the second control node registration process provided in an embodiment of the present application;
[0247] Figure 5 An interactive flow chart of the first gateway registration process provided in an embodiment of the present application;
[0248] Figure 6 An interactive flow chart of the second gateway registration process provided in an embodiment of the present application;
[0249] Figure 7 An interactive flow chart of the first terminal registration process provided in an embodiment of the present application;
[0250] Figure 8 An interactive flow chart of the second terminal registration process provided in an embodiment of the present application;
[0251] Fig. 9 An interactive flow chart of a second data transmission method provided in an embodiment of the present application;
[0252] Fig.10 An interactive flow chart of a third data transmission method provided in an embodiment of the present application;
[0253] Fig.11 A schematic diagram of a flow chart of a first data transmission method provided in an embodiment of the present application;
[0254] Fig.12 A schematic diagram of a flow chart of a second data transmission method provided in an embodiment of the present application;
[0255] Fig.13 A schematic diagram of a flow chart of a third data transmission method provided in an embodiment of the present application;
[0256] Fig.14A schematic diagram of a fourth data transmission method provided in an embodiment of the present application;
[0257] Fig.15 A schematic diagram of the structure of a first data transmission device provided in an embodiment of the present application;
[0258] Fig.16 A schematic diagram of the structure of a second data transmission device provided in an embodiment of the present application;
[0259] Fig.17 A schematic diagram of the structure of a third data transmission device provided in an embodiment of the present application;
[0260] Fig.18 A schematic diagram of the structure of a fourth data transmission device provided in an embodiment of the present application;
[0261] Fig.19 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0262] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0263] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0264] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, it can be directly connected, or indirectly connected through an intermediate medium, or it can be the internal connection of two devices. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0265] With the rapid development of communication technology, the number and types of terminals have increased significantly, and the security and efficiency of data transmission are facing huge challenges. For example, in the communication between terminals (power terminals), gateways and control nodes in smart grids, it is necessary to prevent malicious terminals from intruding into the system and ensure the privacy and data security of legitimate terminals during the communication process.
[0266] In the related art, the keys of other nodes are generated by registering and managing the node, and the nodes perform encrypted communication based on the keys.
[0267] However, the above method has an obvious single point failure risk. Once the registration management node is compromised, all terminal keys related to it may be leaked, affecting the security of the entire system.
[0268] In view of this, an embodiment of the present application proposes a data transmission method and system to improve the security of a communication system.
[0269] See also Figure 1 As shown, an embodiment of the present application provides a data transmission system, which includes a gateway, a terminal, a control node and a registration node.
[0270] This embodiment does not specifically limit the above-mentioned terminal, such as a smart meter, a household appliance, an industrial controller, etc., a terminal that communicates with a gateway and further interacts with a control node for data.
[0271] The gateway is a communication node in the system, responsible for collecting data from multiple terminals, and sending it to the control node after relevant processing. It reduces the burden of direct communication between the terminal and the control node and improves the communication efficiency of the system. The gateway also has identity authentication and data verification functions to ensure the legitimacy and integrity of the data transmitted from the terminal.
[0272] The control node is the system management center, responsible for receiving and processing data transmitted from various terminals and gateways. It has functions such as anomaly detection, terminal legitimacy verification, domain key management and update. The control node can monitor the operating status of the entire system by analyzing the terminal data in real time, and revoke the keys of untrusted terminals through the domain key update mechanism to ensure the safe operation of the smart grid.
[0273] The registration node is responsible for generating, distributing and managing keys in the entire smart grid system to ensure security during the communication process.
[0274] in:
[0275] The terminal is used to send an initial public key of the terminal to the registration node;
[0276] The registration node is used to generate a terminal registration key based on the terminal initial public key, and send the terminal registration key to the terminal;
[0277] The terminal is further configured to generate session key information based on the terminal registration key; wherein the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal; encrypt a message to be transmitted based on the session key information to obtain an encrypted message; generate terminal signature information based on the session key information, the encrypted message and a terminal master private key; wherein the terminal master private key is generated by the terminal based on the terminal registration key; send first information to a gateway; wherein the first information includes the key information, the encrypted message and the terminal signature information;
[0278] The gateway is configured to verify the first information, and after the verification is successful, generate second information based on the first information; and send the second information to the control node;
[0279] The control node is used to verify the second information and determine the message to be transmitted after the verification is successful.
[0280] The following will be combined with the accompanying drawings and specific embodiments to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0281] Figure 2 The interactive flow chart of the first data transmission method provided in the embodiment of the present application is as follows: Figure 2 As shown, the following steps are included:
[0282] Step S201: The terminal sends an initial public key of the terminal to a registration node.
[0283] Since the method of directly generating keys for each node by the registration node has a single point failure risk and low security, based on this, this embodiment uses a non-custodial key generation mechanism to generate and manage keys by multiple parties.
[0284] On the terminal side, the terminal first generates an initial public key. For example, the terminal randomly selects an initial private key k rkmc-i , and calculate the corresponding terminal initial public key R rkmc-i =k rkmc-i ·P; where P is the registered node from the elliptic curve E p The base points selected in (a,b).
[0285] This embodiment does not specifically limit the specific implementation of the non-custodial key generation mechanism. For example, the Chinese Remainder Theorem (CRT) decomposes the key generation process. The Chinese Remainder Theorem is a mathematical tool for solving a set of congruence equations. The core idea is to decompose a large number into several smaller coprime integers, solve the congruence equations under each modulus, and finally combine these results to obtain the solution to the original problem.
[0286] Step S202: The registration node generates a terminal registration key based on the terminal initial public key.
[0287] After receiving the initial public key of the terminal, the registration node generates an intermediate terminal registration key based on the initial public key of the terminal. The terminal registration key may include one or more pieces of information, and the specific generation method may refer to the subsequent embodiments.
[0288] Step S203: The registration node sends the terminal registration key to the terminal.
[0289] After generating the terminal registration key, the registration node sends it to the terminal so that the terminal generates session-related information and generates a master key of the terminal.
[0290] Step S204: The terminal generates session key information based on the terminal registration key.
[0291] In implementation, each transmission session needs to generate a key related to the session. In this embodiment, the terminal generates session key information based on the terminal registration key.
[0292] Step S205: The terminal encrypts the message to be transmitted based on the session key information to obtain an encrypted message.
[0293] The message to be transmitted is encrypted by using the session key information, thereby ensuring the security of the message to be transmitted.
[0294] This embodiment does not specifically limit the transmission message. Taking the terminal as a smart meter as an example, the following types of information are specifically included:
[0295] 1) Real-time power usage data: reflects the user's current power consumption, such as power and energy usage;
[0296] 2) Terminal status data: records the operating status of smart meters and their related terminals, helping to detect whether the terminals are in normal working condition;
[0297] 3) Load data: displays the load of electricity used by users and reflects the changes in electricity demand;
[0298] 4) Power quality data: including harmonics, voltage fluctuations, etc., to help evaluate the power quality of the power grid;
[0299] 5) Security events and alarm information: abnormal events or fault alarm information detected by smart meters;
[0300] 6) Settlement and billing data: record the user's electricity usage for subsequent settlement;
[0301] These data are important privacy and sensitive data for both users and power companies, so during the data transmission process, the encryption, integrity and untraceability of the information need to be ensured.
[0302] The above examples are described using a smart meter as an example. During implementation, other data may also be involved.
[0303] Step S206: The terminal generates terminal signature information based on the session key information, the encrypted message and the terminal master private key.
[0304] The terminal master private key is generated by the terminal based on the terminal registration key.
[0305] The terminal signature information is generated through the session key information, the encrypted message and the terminal master private key, which is convenient for the gateway to verify and improves the security of the first information sent to the gateway.
[0306] Step S207: The terminal sends first information to the gateway.
[0307] The first information includes the key information, the encrypted message and the terminal signature information.
[0308] Step S208: The gateway verifies the first information, and after the verification is successful, generates second information based on the first information.
[0309] In implementation, after receiving the first information sent by the terminal, the gateway needs to verify the first information, generate second information after the verification is passed, and send it to the control node.
[0310] Step S209: The gateway sends the second information to the control node.
[0311] In the transmission system, the control node receives messages from the terminal through the gateway.
[0312] Step S210: The control node verifies the second information and determines the message to be transmitted after the verification is successful.
[0313] In implementation, the second information received by the control node contains sensitive data. To ensure the security, privacy and integrity of the data, the control node needs to perform strict verification and recovery operations after receiving the data.
[0314] In the above solution, through the untrusted key generation mechanism, multiple parties generate and manage keys. On the terminal side, the terminal first generates the terminal initial public key, and then the registration node generates the terminal registration key based on the terminal initial public key. Furthermore, the terminal generates the terminal master private key based on the terminal registration key. The system can securely decompose and reconstruct keys. The encryption process of the first information sent by the terminal uses multiple keys, avoiding the dependence on a single registration node. Even if a certain node is compromised, it will not affect the security of the overall system.
[0315] In some optional implementation manners, before information transmission, the registration node needs to perform system initialization, that is, generate public parameters, and also needs to perform the registration of each node.
[0316] Exemplarily, the registration node selects a first prime number p (used to determine the domain of the elliptic curve), a second prime number q1 (gateway domain key generation prime number), and a third prime number q2 (terminal domain key generation prime number), where p < q1, p < q2, and
[0317] The registration node selects a secure elliptic curve E p defined over the prime field F p (a, b). A base point P ∈ E p (a, b) is selected from the elliptic curve E p (a, b).
[0318] The registration node randomly selects a master private key (registration node master private key) sk rkmc ∈ F p , and calculates the corresponding master public key (registration node master public key) PK rkmc = sk rkmc ·P.
[0319] In implementation, to enhance the security, flexibility, and scalability of the system, the system architecture is divided into a terminal domain and a gateway domain based on hierarchical management between the terminal and the gateway.
[0320] Next, the gateway domain and the keys related to the gateway domain will be introduced:
[0321] The gateway domain is the set of all gateways in the system. Each gateway domain manages the communication between the gateway and the control node through a gateway domain-related key. The gateway plays an important role in the system and is responsible for aggregating the data in the terminal domain and securely forwarding it to the control node.
[0322] Each gateway in the gateway domain uses the gateway domain-related key for data aggregation and encryption, and then sends the encrypted data to the control node. The gateway ensures the communication security between the terminal domain and the control node.
[0323] All gateways in the gateway domain share the same gateway domain key, and the key is unique in the entire system, which ensures the security of communication between gateways and realizes dynamic legitimacy management of gateways.
[0324] By dividing the gateway domain, the terminal does not need to communicate directly with the control node. The gateway can aggregate the data before transmission, reducing the communication load of the control node.
[0325] The terminal domain and gateway domain each have independent key management mechanisms, so that the terminals or gateways in each domain can perform identity authentication and data encryption at different security levels. This layered security structure effectively reduces the attack surface and increases the system's anti-attack capabilities.
[0326] Dynamic legitimacy management of terminals and gateways is achieved. When a new terminal or gateway is added, the security authentication of the terminal or gateway can be ensured by updating the domain key; when a terminal or gateway fails or is revoked, it can immediately lose its legal identity to avoid potential security risks.
[0327] The gateway plays a role in data aggregation and preprocessing between the terminal domain and the control node, reducing the burden of direct communication between each terminal and the control node and improving the overall efficiency of the system.
[0328] The domain division of the system makes it easier to add new terminals or gateways without affecting the security and communication efficiency of existing domains, thereby enhancing the scalability of the system.
[0329] The registration node generates the gateway domain initial key for the gateway domain Select n1 (first number) gateway mutual prime secret values as the gateway domain mutual prime secret value set
[0330] The first mutually prime secret value product for the gateway domain Every x g,i , calculate the gateway domain key numerator value and the inverse element ym of the gateway domain key numerator g,i , xm g,i With ym g,i Meet xm g,i ×ym g,i ≡1modx g,i ;
[0331] Gateway domain key variable var g,i =xm g,i ×ym g,i , Gateway Domain Key Intermediate Parameters
[0332] Gateway Domain Encryption Key¶ g =k g ·μ g ; where k d This is the initial key of the gateway domain.
[0333] The following is an introduction to the terminal domain and the keys related to the terminal domain:
[0334] One or more terminal domains can be set up in the system, each of which contains multiple terminals. The communication within the domain is protected by the terminal domain-related keys. Each terminal in the terminal domain shares the terminal domain-related keys to ensure identity authentication, data encryption and integrity verification when communicating with the gateway or control node. In addition, the terminal domain-related keys can also be used to realize the dynamic addition and revocation of terminals.
[0335] All terminals in the terminal domain share a terminal domain-related key (the terminal domain-related key will be introduced below), which is used for encrypted communication and identity authentication between terminals.
[0336] Different terminal domains use different domain keys to achieve security isolation between domains, ensuring that even if the key of one terminal domain is leaked, the security of other terminal domains will not be affected.
[0337] Terminals can be added or removed as needed in each terminal domain, and flexible management of terminals can be achieved by dynamically updating the terminal domain key.
[0338] The registration node generates the terminal domain initial key for the terminal domain Select n2 (second number) mutually prime secret values as the terminal domain mutually prime secret value set
[0339] The second coprime secret value product for the terminal domain Every x d,i , calculate the terminal domain key numerator value and the terminal domain key numerator inverse element ym d,i , xm d,i With ym d,i Meet xm d,i ×ym d,i ≡1modx d,i ;
[0340] Terminal domain key variable var d,i =xm d,i ×ym d,i , terminal domain key intermediate parameters
[0341] Endpoint Domain Encryption Keys d =k d ·μd ; where k d It is the initial key of the terminal domain mentioned above.
[0342] After the registration node completes initialization, it publishes the system's public parameters (pubparams) {E p (a,b),p,q1,q2,P,PK rkmc}; where E p (a, b) is the above-mentioned secure elliptic curve, p is the above-mentioned first prime number, q1 is the above-mentioned second prime number, q2 is the above-mentioned third prime number, P is the above-mentioned base point, PK rkmc The master public key of the registered node.
[0343] The following will explain the registration process of each node in conjunction with the attached drawings:
[0344] Figure 3 The interactive flow chart of the first control node registration process provided in the embodiment of the present application is as follows: Figure 3 As shown, the following steps are included:
[0345] Step S301: The control node sends a control node registration request carrying the initial public key of the control node to the registration node.
[0346] In the implementation, the control node randomly selects a control node initial private key k j , and generate the corresponding control node initial public key PK cc =k cc ·P;
[0347] Send a control node registration request to the registration node, which may include the control node ID (ID cc ) and the control node initial public key (PK cc ).
[0348] Step S302: the registration node randomly generates a first control node private key, and generates a first control node public key corresponding to the first control node private key.
[0349] In implementation, after receiving the registration request from the control node, the registration node randomly selects the first control node private key k for the control node. rkmc-cc , and generate the first control node public key R rkmc-cc =k rkmc-cc ·P; where P is the base point.
[0350] Step S303: The registration node generates the second control node public key based on the control node initial public key and the first control node private key.
[0351] Exemplarily, the second control node public key PK rkmc-cc =k rkmc-cc·PK j ; Among them, PK cc is the initial public key of the control node, k rkmc-cc The private key of the first control node.
[0352] Second control node public key PK rkmc-cc The coordinates are labeled (x1,y1).
[0353] Step S304: The registration node generates the control node intermediate key based on the gateway domain initial key, the terminal domain initial key, the first control node private key, the control node initial public key, the second control node public key and the registration node master public key.
[0354] Exemplarily, the registration node determines the modulus operation result r of the public key of the second control node rkmc-cc =x1 mod p; wherein x1 is the horizontal coordinate of the public key of the second control node, and p is the first prime number;
[0355] Control node signature summary rkmc-cc =H(ID cc ,r rkmc-cc ,PK cc ,PK rkmc-cc ), where ID cc is the control node identifier, H is the hash function, r rkmc-cc is the result of the modular operation of the public key of the second control node, PK cc PK is the initial public key of the control node. rkmc-cc is the public key of the second control node;
[0356] Control node intermediate key Among them, k g is the gateway domain initial key, k d is the initial key of the terminal domain, k rkmc-cc is the private key of the first control node, e rkmc-cc is the control node signature summary, r rkmc-cc is the result of the modular operation of the public key of the second control node, sk rkmc is the registered node master private key, and p is the first prime number.
[0357] Step S305: the registration node sends control node response information to the control node.
[0358] Among them, the control node response information includes the first control node public key, the second control node public key, the control node intermediate key, the fourth prime secret value, the fifth prime secret value, the gateway domain encryption key and the terminal domain encryption key; the fourth prime secret value belongs to the gateway domain prime secret value set, and the fifth prime secret value belongs to the terminal domain prime secret value set.
[0359] Exemplarily, the control node response information is {pubparams, R rkmc-cc ,PK rkmc-cc ,s rkmc-cc ,x g,cc ∈{x g,1 ,x g,2 ,…,x g,n1},x d,cc ∈{x d,1 ,x d,2 ,…,x d,n2},γ g ,γ d}; where pubparams is the public parameters mentioned above, R rkmc-cc is the first control node public key, PK rkmc-cc is the public key of the second control node, s rkmc-cc is the control node intermediate key, x g,cc is the fourth coprime secret value, {x g,1 ,x g,2 ,…,x g,n1} is a set of mutually prime secret values in the gateway domain, x d,cc is the fifth coprime secret value, {x d,1 ,x d,2 ,…,x d,n2} is the set of mutually prime secret values in the terminal domain, γ g Encryption key for the gateway domain, γ d Encryption key for the endpoint domain.
[0360] Register node storage information {ID cc ,PK cc ,PK rkmc-cc}.
[0361] Some optional implementations, in order to ensure the security of registration, after receiving the control node response information, verification is required, see Figure 4 As shown, it is an interactive flow chart of the second control node registration process provided by the embodiment of the present application, such as Figure 4 As shown, the following steps are included:
[0362] Step S401: The control node sends a control node registration request carrying the initial public key of the control node to the registration node.
[0363] Step S402: the registration node randomly generates a first control node private key, and generates a first control node public key corresponding to the first control node private key.
[0364] Step S403: the registration node generates the second control node public key based on the control node initial public key and the first control node private key.
[0365] Step S404: The registration node generates the control node intermediate key based on the gateway domain initial key, the terminal domain initial key, the first control node private key, the control node initial public key, the second control node public key and the registration node master public key.
[0366] Step S405: the registration node sends control node response information to the control node.
[0367] Among them, the control node response information includes the first control node public key, the second control node public key, the control node intermediate key, the fourth prime secret value, the fifth prime secret value, the gateway domain encryption key and the terminal domain encryption key; the fourth prime secret value belongs to the gateway domain prime secret value set, and the fifth prime secret value belongs to the terminal domain prime secret value set.
[0368] The specific implementation of steps S401 to S405 can refer to the above embodiment and will not be described again here.
[0369] Step S406: The control node calculates a control node signature digest based on the result of the modulus operation of the second control node public key, the control node initial public key, and the second control node public key.
[0370] Exemplarily, the coordinates (x1', y1') of the second control node public key are determined, and the modulus operation result r of the second control node public key is calculated. r ' kmc-cc = x′1 mod p;
[0371] Calculate the control node signature summary e′ rkmc-cc =H(ID cc ,r r ' kmc-cc ,PK cc ,PK rkmc-cc ), where ID cc PK is the control node identifier. cc PK is the initial public key of the control node. rkmc-cc is the public key of the second control node.
[0372] Step S407: The control node calculates a gateway domain initial key based on the gateway domain encryption key and the fourth mutually prime secret value; and calculates a terminal domain initial key based on the terminal domain encryption key and the fifth mutually prime secret value.
[0373] Exemplarily, the control node calculates the gateway domain initial key k′ g =γ g mod x g,cc ; Among them, γ gThe gateway domain encryption key, x g,cc is the fourth coprime secret value;
[0374] Calculate the initial key k′ of the terminal domain d =γ d mod x d,cc ; Among them, γ d The encryption key for the terminal domain, x d,cc is the fifth coprime secret value.
[0375] Step S408: The control node verifies the control node response information based on the control node intermediate key, the gateway domain initial key, the terminal domain initial key, the first control node public key, the control node signature summary, the modulus operation result of the second control node public key and the registration node master public key.
[0376] During implementation, the control node obtains the master public key of the registered node through public parameters, obtains the control node intermediate key, the first control node public key and the second control node public key from the control node response information, and then determines the modular operation result of the second control node public key. The gateway domain initial key, the terminal domain initial key and the control node signature summary are calculated through the above steps, and the control node response information is verified in combination with these parameters.
[0377] Exemplarily, it can be determined whether the following equation holds: (s rkmc-cc k′ g k′ d )·R rkmc-cc =e′ rkmc-cc ·P+r r ' kmc-cc ·PK rkmc ; Among them, s rkmc-cc is the control node intermediate key, k′ g is the initial key of the gateway domain, k′ d is the initial key of the terminal domain, R rkmc-cc is the first control node public key, e′ rkmc-cc is the control node signature summary, P is the base point, r r ' kmc-cc is the result of the modular operation of the public key of the second control node, PK rkmc The master public key of the registered node.
[0378] Step S409: After the verification is passed, the control node generates the control node master private key based on the gateway domain initial key, the control node intermediate key and the control node initial private key corresponding to the control node initial public key.
[0379] For example, the control node master private key Among them, srkmc-cc is the control node intermediate key, k cc The initial public key of the control node.
[0380] Control node storage information {sk cc ,PK rkmc-cc ,k′ g ,k′ d ,pubparams,PK cc}, so as to send information later; among them, sk cc PK is the master private key of the control node. rkmc-cc is the public key of the second control node, k′ g is the initial key of the gateway domain, k′ d is the initial key of the terminal domain, pubparams is the public parameters, PK cc It is the initial public key of the control node.
[0381] Figure 5 The interactive flow chart of the first gateway registration process provided in the embodiment of the present application is as follows: Figure 5 As shown, the following steps are included:
[0382] Step S501: The gateway sends a gateway registration request carrying the gateway initial public key to the registration node.
[0383] In the implementation, the gateway randomly selects a gateway initial private key k j , and generate the corresponding gateway initial public key PK j =k j ·P;
[0384] Send a gateway registration request to the registration node, which may include the gateway ID (ID j ) and the gateway initial public key (PK j ).
[0385] Step S502: The registration node randomly generates a first gateway private key, and generates a first gateway public key corresponding to the first gateway private key.
[0386] In implementation, after receiving the gateway registration request, the registration node randomly selects the first gateway private key k for the gateway. rkmc-j , and generate the first gateway public key R rkmc-j =k rkmc-j ·P; where P is the base point.
[0387] Step S503: The registration node generates the second gateway public key based on the gateway initial public key and the first gateway private key.
[0388] Exemplarily, the second gateway public key PK rkmc-j =k rkmc-j ·PKj ; Among them, PK j is the initial public key of the gateway, k rkmc-j The private key of the first gateway.
[0389] Second gateway public key PK rkmc-j The coordinates are labeled (x2,y2).
[0390] Step S504: The registration node generates the gateway intermediate key based on the gateway domain initial key, the terminal domain initial key, the first gateway private key, the gateway initial public key, the second gateway public key and the registration node master public key.
[0391] Exemplarily, the registration node determines the modulus operation result r of the second gateway public key rkmc-j =x2 mod p; wherein x2 is the horizontal coordinate of the second gateway public key, and p is the first prime number;
[0392] Gateway Signature Digest rkmc-j =H(r rkmc-j ,PK j ,PK rkmc-j ), where H is the hash function, r rkmc-j is the result of the modulus operation of the second gateway public key, PK j is the initial public key of the gateway, PK rkmc-j is the second gateway public key;
[0393] Gateway Intermediate Key Among them, k g is the initial key of the terminal domain, k d is the initial key of the terminal domain, k rkmc-j is the private key of the first gateway, e rkmc-j is the gateway signature digest, r rkmc-j is the result of the modular operation of the second gateway public key, sk rkmc is the registered node master private key, and p is the first prime number.
[0394] Step S505: The registration node sends a gateway response message to the gateway.
[0395] Among them, the gateway response information includes the first gateway public key, the second gateway public key, the gateway intermediate key, the second prime secret value, the third prime secret value, the gateway domain encryption key, the terminal domain encryption key and the control node initial public key; the second prime secret value belongs to the gateway domain prime secret value set, and the third prime secret value belongs to the terminal domain prime secret value set.
[0396] For example, the gateway response information is {pubparams, R rkmc-j ,PK rkmc-j ,s rkmc-j ,xg,j ∈{x g,1 ,x g,2 ,…,x g,n1},x d,j ∈{x d,1 ,x d,2 ,…,x d,n2},γ g ,γ d ,PK cc}; where pubparams is the public parameters mentioned above, R rkmc-j is the first gateway public key, PK rkmc-i is the second gateway public key, s rkmc-i is the gateway intermediate key, x g,i is the second coprime secret value, {x g,1 ,x g,2 ,…,x g,n1} is a set of mutually prime secret values in the gateway domain, x d,i is the third coprime secret value, {x d,1 ,x d,2 ,…,x d,n2} is the set of mutually prime secret values in the terminal domain, γ g Encryption key for the gateway domain, γ d The terminal domain encryption key, PK cc It is the initial public key of the control node.
[0397] Register node storage information {ID j ,PK j ,PK rkmc-j}.
[0398] Some optional implementations, in order to ensure the security of registration, require verification after receiving the gateway response information, see Figure 6 As shown, it is an interactive flow chart of the second gateway registration process provided by the embodiment of the present application, such as Figure 6 As shown, the following steps are included:
[0399] Step S601: The gateway sends a gateway registration request carrying the gateway initial public key to the registration node.
[0400] Step S602: The registration node randomly generates a first gateway private key, and generates a first gateway public key corresponding to the first gateway private key.
[0401] Step S603: The registration node generates the second gateway public key based on the gateway initial public key and the first gateway private key.
[0402] Step S604: The registration node generates the gateway intermediate key based on the gateway domain initial key, the terminal domain initial key, the first gateway private key, the gateway initial public key, the second gateway public key and the registration node master public key.
[0403] Step S605: The registration node sends a gateway response message to the gateway.
[0404] Among them, the gateway response information includes the first gateway public key, the second gateway public key, the gateway intermediate key, the second prime secret value, the third prime secret value, the gateway domain encryption key, the terminal domain encryption key and the control node initial public key; the second prime secret value belongs to the gateway domain prime secret value set, and the third prime secret value belongs to the terminal domain prime secret value set.
[0405] The specific implementation of steps S601 to S605 can refer to the above embodiment and will not be described again here.
[0406] Step S606: The gateway calculates a gateway signature digest based on the modular operation result of the second gateway public key, the gateway initial public key, and the second gateway public key.
[0407] Exemplarily, the coordinates (x2', y2') of the second gateway public key are determined, and the modulus operation result r of the second gateway public key is calculated. r ' kmc-j = x′2 mod p;
[0408] Calculate the gateway signature digest e′ rkmc-j =H(r r ' kmc-j ,PK j ,PK rkmc-j ), where PK j is the initial public key of the gateway, PK rkmc-j The public key of the second gateway.
[0409] Step S607: The gateway calculates a gateway domain initial key based on the gateway domain encryption key and the second mutually prime secret value; and calculates a terminal domain initial key based on the terminal domain encryption key and the third mutually prime secret value.
[0410] Exemplarily, the gateway calculates the gateway domain initial key k′ g =γ g mod x g,i ; Among them, γ g The gateway domain encryption key, x g,i is the second mutually prime secret value;
[0411] Calculate the initial key k′ of the terminal domain d =γ d mod xd,i ; Among them, γ d The encryption key for the terminal domain, x d,i is the third coprime secret value.
[0412] Step S608: The gateway verifies the gateway response information based on the gateway intermediate key, the gateway domain initial key, the terminal domain initial key, the first gateway public key, the second verification summary, the modular operation result of the second gateway public key and the registration node master public key.
[0413] During implementation, the gateway obtains the master public key of the registered node through public parameters, obtains the gateway intermediate key, the first gateway public key and the second gateway public key from the gateway response information, and then determines the modular operation result of the second gateway public key. The gateway domain initial key, the terminal domain initial key and the gateway signature summary are calculated through the above steps, and the gateway response information is verified in combination with these parameters.
[0414] Exemplarily, it can be determined whether the following equation holds: (s rkmc-j k′ g k′ d )·R rkmc-j =e′ rkmc-j ·P+r r ' kmc-j ·PK rkmc ; Among them, s rkmc-j is the gateway intermediate key, k′ g is the initial key of the gateway domain, k′ d is the initial key of the terminal domain, R rkmc-j is the first gateway public key, e′ rkmc-j is the gateway signature summary, P is the base point, r r ' kmc-j is the result of the modulus operation of the second gateway public key, PK rkmc The master public key of the registered node.
[0415] Step S609: After the gateway passes the verification, the gateway generates the gateway master private key based on the gateway domain initial key, the gateway intermediate key and the gateway initial private key corresponding to the gateway initial public key.
[0416] For example, the gateway master private key Among them, s rkmc-j is the gateway intermediate key, k i The initial public key of the gateway.
[0417] Gateway storage information j ,PK rkmc-j ,k′ g ,k′ d ,pubparams,PKj ,PK cc}, so as to send information later; among them, sk j Gateway master private key, PK rkmc-j is the second gateway public key, k′ g is the initial key of the gateway domain, k′ d is the initial key of the terminal domain, pubparams is the public parameters, PK j is the initial public key of the gateway, PK cc It is the initial public key of the control node.
[0418] Figure 7 The interactive flow chart of the first terminal registration process provided in the embodiment of the present application is as follows: Figure 7 As shown, the following steps are included:
[0419] Step S701: The terminal sends a terminal registration request carrying the initial public key of the terminal to the registration node.
[0420] In the implementation, the terminal randomly selects an initial private key k i , and generate the corresponding terminal initial public key PK i =k i ·P;
[0421] Send a terminal registration request to the registration node, which may include the terminal ID (ID i ) and the terminal initial public key (PK i ).
[0422] Step S702: The registration node randomly generates a first terminal private key, and generates a first terminal public key corresponding to the first terminal private key.
[0423] In implementation, after receiving the terminal registration request, the registration node randomly selects a first terminal private key k for the terminal. rkmc-i , and generate the first terminal public key R rkmc-i =k rkmc-i ·P; where P is the base point.
[0424] Step S703: The registration node generates the second terminal public key based on the terminal initial public key and the first terminal private key.
[0425] Exemplarily, the second terminal public key PK rkmc-i =k rkmc-i ·PK i ; Among them, PK i is the initial public key of the terminal, k rkmc-i The private key of the first terminal.
[0426] Second terminal public key PK rkmc-i The coordinates are labeled (x3,y3).
[0427] Step S704: The registration node generates the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key.
[0428] Exemplarily, the registration node determines the modulus operation result r of the second terminal public key rkmc-i =x3 mod p; wherein x3 is the horizontal coordinate of the public key of the second terminal, and p is the first prime number;
[0429] Terminal Signature Digest rkmc-i =H(r rkmc-i ,PK i ,PK rkmc-i ), where H is a hash function, H:{0,1}*→F p , used to encrypt messages and identity information; r rkmc-i is the result of the modular operation of the second terminal public key, PK i is the initial public key of the terminal, PK rkmc-i is the public key of the second terminal;
[0430] Terminal intermediate key Among them, k d is the initial key of the terminal domain, k rkmc-i is the private key of the first terminal, e rkmc-i is the terminal signature digest, r rkmc-i is the result of the modular operation of the second terminal public key, sk rkmc is the registered node master private key, and p is the first prime number.
[0431] Step S705: the registration node sends terminal response information to the terminal.
[0432] Among them, the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0433] For example, the terminal response information is {pubparams, R rkmc-i ,PK rkmc-i ,s rkmc-i ,x d,i ∈{x d,1 ,x d,2 ,…,x d,n2},γ d ,PK cc}; where pubparams is the public parameters mentioned above, R rkmc-i is the first terminal public key, PK rkmc-iis the public key of the second terminal, s rkmc-i is the terminal intermediate key, x d,i is the first coprime secret value, {x d,1 ,x d,2 ,…,x d,n2} is the set of mutually prime secret values in the terminal domain, γ d The terminal domain encryption key, PK cc It is the initial public key of the control node.
[0434] Register node storage information {ID i ,PK i ,PK rkmc-i}.
[0435] In some optional implementations, in order to ensure the security of registration, the terminal needs to perform verification after receiving the terminal response information, see Figure 8 As shown, it is an interactive flow chart of the second terminal registration process provided by the embodiment of the present application, such as Figure 8 As shown, the following steps are included:
[0436] Step S801: The terminal sends a terminal registration request carrying the initial public key of the terminal to the registration node.
[0437] Step S802: The registration node randomly generates a first terminal private key, and generates a first terminal public key corresponding to the first terminal private key.
[0438] Step S803: The registration node generates the second terminal public key based on the terminal initial public key and the first terminal private key.
[0439] Step S804: The registration node generates the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key.
[0440] Step S805: the registration node sends terminal response information to the terminal.
[0441] Among them, the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0442] The specific implementation of steps S801 to S805 can refer to the above embodiment and will not be described again here.
[0443] Step S806: The terminal calculates a terminal signature digest based on the modular operation result of the second terminal public key, the terminal initial public key, and the second terminal public key.
[0444] Exemplarily, the coordinates (x3', y3') of the second terminal public key are determined, and the modulus operation result r' of the second terminal public key is calculated. rkmc-i = x′3 mod p;
[0445] Calculate the terminal signature digest e′ rkmc-i =H(r r ' kmc-i ,PK i ,PK rkmc-i ), where PK i is the initial public key of the terminal, PK rkmc-i is the public key of the second terminal.
[0446] Step S807: The terminal calculates a terminal domain initial key based on the terminal domain encryption key and the first mutually prime secret value.
[0447] Exemplarily, the terminal calculates the terminal domain initial key k′ d =γ d mod x d,i ; Among them, γ d The encryption key for the terminal domain, x d,i is the first mutually prime secret value.
[0448] Step S808: The terminal verifies the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature summary, the modulus operation result of the second terminal public key and the registration node master public key.
[0449] During implementation, the terminal obtains the master public key of the registration node through public parameters, obtains the terminal intermediate key, the first terminal public key and the second terminal public key from the terminal response information, and then determines the modular operation result of the second terminal public key. The terminal domain initial key and the terminal signature summary are calculated through the above steps, and the terminal response information is verified in combination with these parameters.
[0450] Exemplarily, it can be determined whether the following equation holds: (s rkmc-i k′ d )·R rkmc-i =e′ rkmc-i ·P+r r ' kmc-i ·PK rkmc ; Among them, s rkmc-i is the terminal intermediate key, k′ d is the initial key of the terminal domain, R rkmc-i is the first terminal public key, e′ rkmc-i is the terminal signature summary, P is the base point, r′ rkmc-i is the result of the modular operation of the second terminal public key, PK rkmc The master public key of the registered node.
[0451] Step S809: After the terminal passes the verification, the terminal generates the terminal master private key based on the terminal domain initial key, the terminal intermediate key and the terminal initial private key corresponding to the terminal initial public key.
[0452] For example, the terminal master private key Among them, s rkmc-i is the terminal intermediate key, k i The initial public key of the terminal.
[0453] Terminal storage information i ,PK rkmc-i ,k′ d ,pubparams,PK i ,PK cc}, so as to send information later; among them, sk i is the terminal master private key, PK rkmc-i is the public key of the second terminal, k′ d is the initial key of the terminal domain, pubparams is the public parameters, PK i is the initial public key of the terminal, PK cc It is the initial public key of the control node.
[0454] Fig. 9 The interactive flow chart of the second data transmission method provided in the embodiment of the present application is as follows: Fig. 9 As shown, the following steps are included:
[0455] Step S901: The terminal sends the initial public key of the terminal to the registration node.
[0456] Step S902: The registration node generates a terminal registration key based on the terminal initial public key.
[0457] Step S903: The registration node sends the terminal registration key to the terminal.
[0458] The specific implementation of steps S901 to S903 may refer to other embodiments and will not be described in detail here.
[0459] Step S904: The terminal generates a first session key based on the first session random number and the second terminal public key; and, generates a second session key based on the first session random number and the control node initial public key; and, generates a first base point public key corresponding to the first session random number.
[0460] Exemplarily, the terminal randomly selects the first session random number k i-cc ∈F p ;
[0461] Generate the first session key PK for the session between the terminal and the control node i-cc =k i-cc ·PK rkmc-i ;
[0462] Second session key PKK for the session between the terminal and the control node i-cc =k i-cc ·PK cc ;
[0463] The first base point public key PPK i-cc =k i-cc ·P;
[0464] Among them, F p is the prime number field, PK rkmc-i is the second terminal public key, PK cc is the initial public key of the control node, and P is the base point.
[0465] Step S905: The terminal encrypts the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the terminal sending, to obtain the encrypted message.
[0466] For example, the encrypted message HM i =m i ⊕H(ID i ,PKK i-cc ,k d ,t1); where m i is the message to be transmitted, H is the hash function, ID i Terminal identification, PKK i-cc is the second session key, k d is the terminal domain initial key, and t1 is the first session time.
[0467] Step S906: The terminal generates a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time.
[0468] Exemplarily, the first public key mask HPK rkmc-i =PK rkmc-i ⊕H(PID i ,HM i ,k d ,t1); where PK rkmc-i is the public key of the second terminal, H is the hash function, PID i is the terminal pseudo identity information, HM i is the encrypted message, k d is the terminal domain initial key, and t1 is the first session time.
[0469] Privacy is further improved by hashing the public key of the second terminal.
[0470] In some optional implementations, the terminal pseudo identity information is generated in the following manner:
[0471] The terminal pseudo identity information is generated based on the terminal identifier, the first base point public key, the second session key, the terminal domain initial key and the first session time.
[0472] For example, the terminal pseudo identity information PID i =ID i ⊕H(PPK i-cc ,PKK i-cc ,k d ,t1); where ID i is the terminal identifier, H is the hash function, PPK i-cc The first base point public key, PKK i-cc is the second session key, k d is the terminal domain initial key, and t1 is the first session time.
[0473] Step S907: The terminal generates a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key and the first session time.
[0474] Exemplarily, the first signature hash digest e i-cc =H(PID i ,HM i ,r rkmc-i ,PPK i-cc ,t1); where H is the hash function, PID i is the terminal pseudo identity information, HM i is the encrypted message, r rkmc-i is the result of the modular operation corresponding to the public key of the second terminal, PPK i-cc is the first base point public key, and t1 is the first session time.
[0475] Step S908: The terminal generates a first signature modulus operation value based on the first signature hash summary and the first session key.
[0476] Exemplarily, the first signature modulo operation value r i-cc =(e i-cc +x4)mod p; where e i-cc is the first signature hash summary, x4 is the horizontal coordinate of the first session key, and p is the first prime number.
[0477] Step S909: The terminal generates the terminal signature information based on the terminal master private key, the first session random number and the first signature modulus operation value.
[0478] For example, the terminal signature information s i-cc =(1+sk i ) -1 (k i-cc -r i-cc sk i );where sk i is the terminal master private key, k i-cc is the random number of the first session, r i-cc is the modulus operation value of the first signature.
[0479] Step S910: The terminal sends first information to the gateway.
[0480] The first information includes {PID i ,HM i ,PK i-cc ,HPK rkmc-i ,PPK i-cc ,r i-cc ,s i-cc ,t1}; where PID i is the terminal pseudo identity information, HM i To encrypt the message, PK i-cc is the first session key, HPK rkmc-i is the first public key mask, PPK i-cc is the first base point public key, r i-cc is the modulus operation value of the first signature, s i-cc Terminal signature information, t1 is the first session time.
[0481] Step S911: The gateway verifies the first information, and after the verification is successful, generates second information based on the first information.
[0482] Step S912: The gateway sends the second information to the control node.
[0483] Step S913: The control node verifies the second information, and determines the message to be transmitted after the verification is successful.
[0484] The specific implementation of steps S911 to S913 may refer to other embodiments and will not be described in detail here.
[0485] In some optional implementations, in step S911, the gateway verifies the first information in the following manner:
[0486] After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0487] Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0488] Based on the first session key of the target terminal, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key, the first information of the target terminal is verified; wherein the target terminal is one or more terminals that send the first information.
[0489] In this embodiment, the terminal may perform individual verification on the first information of a single terminal, or may perform aggregate verification on the first information of multiple terminals. The two methods are described below respectively.
[0490] Verify the first information separately:
[0491] The gateway checks the freshness of the first session time t1 in the first information to determine whether the first information time is valid to prevent replay attacks.
[0492] The second terminal public key is restored by using the first public key mask, the terminal pseudo identity information, the encrypted message and the first session time in the first information, combined with the saved terminal domain initial key Among them, HPK rkmc-i is the first public key mask, PID i For terminal pseudo identity information, HM i is the encrypted message, k d is the terminal domain initial key, and t1 is the first session time.
[0493] Calculate the modulus operation result of the second terminal public key: r r ' kmc-i =x′3mod p; wherein x′3 is the horizontal coordinate of the public key of the second terminal, and p is the first prime number;
[0494] Calculate the first signature hash digest for message integrity verification, the first signature hash digest e i ' -cc =H(PID i ,HM i ,r r ' kmc-i ,PPKi-cc ,t1); where H is the hash function, PID i is the terminal pseudo identity information, HM i is the encrypted message, r r ' kmc-i is the result of the modular operation corresponding to the public key of the second terminal, PPK i-cc is the first base point public key, and t1 is the first session time.
[0495] The first signature modulus operation value and the terminal signature information generate a signature verification intermediate value to ensure the legitimacy of the signature. The signature verification intermediate value t i-j =(r i-cc +s i-cc k d )mod p; where r i-cc is the modulus operation value of the first signature, s i-cc is the terminal signature information, k d is the initial key of the terminal domain, and p is the first prime number;
[0496] The legitimacy of the first information and the integrity of the signature are verified by the following formula:
[0497] PK i-cc =k d s i-cc PK′ rkmc-i +t i-j e i ' -cc ·P+t i-j r r ' kmc-i ·PK rkmc ;
[0498] Among them, PK i-cc is the first session key, k d is the initial key of the terminal domain, s i-cc Terminal signature information, PK′ rkmc-i is the public key of the second terminal, t i-j To verify the intermediate value for the signature, e i ' -cc is the first signature hash summary, P is the base point, r r ' kmc-i is the result of the modular operation corresponding to the public key of the second terminal, PK rkmc The master public key of the registered node.
[0499] If the equation is true, it indicates that the signature and data integrity of the first information have not been tampered with, the message source is credible, and the first information has passed verification; if the equation is not true, it indicates that the first information may be abnormal or tampered with.
[0500] Aggregate verification of multiple first information:
[0501] The gateway checks the freshness of the first session time t1 in each first message respectively, such as checking in batches whether the first messages are within a valid time window, to prevent replay attacks.
[0502] For each first message, the second terminal public key is recovered by using the first public key mask, terminal pseudo identity information, encrypted message and first session time in the first message, combined with the saved terminal domain initial key Among them, HPK rkmc-i is the first public key mask, PID i For terminal pseudo identity information, HM i is the encrypted message, k d is the initial key of the terminal domain, t i,1 is the first session time corresponding to terminal i.
[0503] For each piece of first information, the modulus operation result of the second terminal public key is calculated respectively: r ' kmc-i =x′3mod p; wherein x′3 is the horizontal coordinate of the public key of the second terminal, and p is the first prime number;
[0504] For each first message, calculate the first signature hash summary e i ' -cc =H(PID i ,HM i ,r r ' kmc-i ,PPK i-cc ,t i,1 ), where H is the hash function, PID i is the terminal pseudo identity information, HM i is the encrypted message, r r ' kmc-i is the result of the modular operation corresponding to the public key of the second terminal, PPK i-cc is the first base point public key, t i,1 is the first session time corresponding to terminal i.
[0505] For each first message, the first signature modulus operation value and the terminal signature information generate a signature verification intermediate value to ensure the legitimacy of the signature. The signature verification intermediate value t i-j =(r i-cc +s i-cc k d )mod p; where r i-cc is the modulus operation value of the first signature, s i-cc is the terminal signature information, k d is the initial key of the terminal domain, and p is the first prime number;
[0506] The legitimacy of the batch first information and the integrity of the signature are verified by the following formula:
[0507]
[0508] Among them, PK i-cc is the first session key of terminal i, k d is the initial key of the terminal domain, s i-cc is the terminal signature information of terminal i, PK′ rkmc-i is the second terminal public key of terminal i, t i-j The signature verification intermediate value for terminal i, e i ' -cc is the first signature hash summary of terminal i, P is the base point, r r ' kmc-i is the result of the modular operation corresponding to the second terminal public key of terminal i, PK rkmc The master public key of the registered node.
[0509] If the equation is true, it indicates that the signature and data integrity of the batch of first information have not been tampered with, the message source is credible, and the first information has passed verification; if the equation is not true, it indicates that the first information may be abnormal or tampered with.
[0510] Through the method of aggregate verification, the gateway can efficiently verify the legitimacy of single or batch messages, ensuring the security and integrity of data transmission in the system. At the same time, the aggregate verification mechanism greatly improves the efficiency of the system in processing large-scale data, and is suitable for high-performance requirements in practical applications.
[0511] After the gateway verifies the first information, it needs to generate second information and send the second information to the control node for verification. The interaction process between the gateway and the control node will be described below.
[0512] Fig.10 The interactive flow chart of the third data transmission method provided in the embodiment of the present application is as follows: Fig.10 As shown, the following steps are included:
[0513] Step S1001: The gateway generates a third session key based on the second session random number and the second gateway public key; and generates a fourth session key based on the second session random number and the control node initial public key; and generates a second base point public key corresponding to the second session random number.
[0514] Exemplarily, the gateway randomly selects the second session random number k j-cc ∈F p ;
[0515] Generate the third session key PK for the session between the gateway and the control node j-cc=k j-cc ·PK rkmc-j ;
[0516] The fourth session key PKK for the session between the gateway and the control node j-cc =k j-cc ·PK cc ;
[0517] The second base point public key PPK j-cc =k j-cc ·P;
[0518] Among them, F p is the prime number field, PK rkmc-j is the second gateway public key, PK cc is the initial public key of the control node, and P is the base point.
[0519] Step S1002: The gateway aggregates the third session key and the first session key of the target terminal to obtain an aggregated session key.
[0520] During implementation, the gateway may generate the second information based on the first information of one terminal, and may generate aggregated second information based on the first information of multiple terminals.
[0521] For example, for a single terminal, the aggregate session key PK sum =PK i-cc +PK j-cc ; Aggregate session key for a single terminal
[0522] Among them, PK i-cc is the first session key of terminal i, PK j-cc is the third session key.
[0523] Step S1003: The gateway generates a second signature hash digest based on the pseudo identity set, the encrypted message set, the aggregated session key, the first public key mask set, the base point public key set and the session time set.
[0524] Among them, the pseudo-identity information set includes gateway pseudo-identity information and terminal pseudo-identity information of the target terminal; the encrypted message set includes encrypted messages of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the corresponding second session time sent by the gateway.
[0525] Exemplarily, the second signature hash digest e j-cc =H(PIDs,HMs,PK sum,HPKs,PPKs,ts); where H is the hash function, PIDs is the pseudo identity information set, HMs is the encrypted message set, PK sum is the aggregate session key, HPKs is the first public key mask set, PPKs is the base point public key set, and ts is the session time set.
[0526] In some optional implementations, the gateway pseudo identity information is generated in the following manner:
[0527] The gateway pseudo identity information is generated based on the gateway identifier, the aggregate session key, the fourth session key, the second base point public key, the gateway domain initial key, the terminal domain initial key and the second session time.
[0528] Exemplary, gateway pseudo-identity information Among them, ID j is the gateway identifier, H is the hash function, PK sum , is the aggregate session key, PKK j-cc The fourth session key, PPK j-cc is the second base point public key, k g is the gateway domain initial key, k d is the terminal domain initial key, and t2 is the second session time.
[0529] Step S1004: The gateway generates a second signature modulo operation value based on the second signature hash digest and the third session key.
[0530] Exemplarily, the second signature modulo operation value r j-cc =(e j-cc +x5)mod p; where e i-cc is the second signature hash summary, x5 is the abscissa of the third session key, and p is the first prime number.
[0531] Step S1005: The gateway aggregates the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value.
[0532] Exemplarily, for a single terminal, the aggregate signature modulo operation value r sum =r j-cc +r i-cc ;
[0533] For multiple terminals, aggregate signature modulus operation value
[0534] Among them, r j-cc is the modulus operation value of the second signature, r i-cc is the modulus operation value of the first signature of the target terminal i
[0535] Step S1006: The gateway generates gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value.
[0536] For example, the gateway signature information s j-cc =(1+sk j ) -1 (k j-cc -r j-cc sk j );where sk j is the gateway master private key, k j-cc is the random number for the second session, r j-cc is the modulus operation value of the second signature.
[0537] Step S1007: The gateway sends second information to the control node.
[0538] The second information includes {PIDs, HMs, PK sum ,HPKs,PPKs,r sum ,ss j-cc ,ts}; PIDs is a pseudo identity information set used to conceal the true identity of the terminal and gateway; HMs is an encrypted message set; PK sum is the aggregated session key, used for signature verification; HPKs is the first public key mask set, which further improves the privacy of information transmission; PPKs is the base point public key set, r sum is the modulus operation value of the aggregate signature, ss j-cc is the signature information set, ts is the session time set; ss j-cc ={s 1-cc ,s 2-cc ,…,s n-cc ,s j-cc},s 1-cc ,s 2-cc ,…,s n-cc is the signature information of target terminals 1 to n, s j-cc The signature information of the gateway.
[0539] Step S1008: After determining that the time is valid based on the session time set, the control node restores the gateway identifier and the terminal identifier of the target terminal based on the pseudo-identity information set.
[0540] Exemplarily, the control node first checks the freshness of all times in the session time set to ensure that the message is not delayed or replayed. The timestamp check can be implemented by setting a time threshold.
[0541] Restore the real identity of the gateway pseudo-identity information and determine the gateway identity Among them, PID j is the gateway pseudo identity information, PK sum PKK is the aggregate session key. j-cc The fourth session key, PPK j-cc is the second base point public key, k g is the gateway domain initial key, k d is the terminal domain initial key, and t2 is the second session time.
[0542] Since the fourth session key PKK j-cc =k j-cc ·PK cc =k cc ·PK j-cc Therefore, the registration node can restore the fourth session key based on the initial private key of the control node and the third session key; and then restore the identity of the gateway, the gateway identification
[0543] Since the second session key PKK i-cc =k i-cc ·PK cc =k cc ·PK i-cc Therefore, the registration node can restore the second session key based on the control node initial private key and the first session key; and then restore the identity of the terminal, the terminal identification
[0544] The parameters can be referred to in the above embodiments and will not be described again here.
[0545] Step S1009: The control node determines the second gateway public key corresponding to the gateway identifier, and determines the second terminal public key corresponding to each terminal identifier.
[0546] For example, according to the gateway ID j ' Retrieve the gateway's second gateway public key PK from the database rkmc-j =(x2,y2), and calculate its modulo operation result r rkmc-j = x2 mod p;
[0547] According to the terminal ID i ' Retrieve the second terminal public key PK of the terminal rkmc-i =(x3,y3), and calculate its modulo operation result r rkmc-i =x3 mod p
[0548] Step S1010: The control node restores the second signature hash digest based on the pseudo-identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set and the session time set; and restores the first signature hash digest of the target terminal based on the pseudo-identity information of any target terminal, the encrypted message, the modulus operation result corresponding to the second terminal public key, the first base point public key and the first session time.
[0549] Exemplarily, the second signature hash digest e j ' -cc =H(PIDs,HM s ,PK sum ,HPKs,PPKs,ts); the first signature hash summary e of target terminal i i ' -cc =H(PID i ,HM i ,r rkmc-i ,PPK i-cc , t1); various parameters can be referred to the above embodiment and will not be described again here.
[0550] Step S1011: The control node verifies the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
[0551] For a single terminal, the legitimacy of the second information and the integrity of the signature are verified by the following formula: PK sum =(k d s i-cc )·PK rkmc-i +(k d s j-cc )·PK rkmc-j +(t sum (e i ' -cc +
[0552] e j ' -cc ))·P+(t sum (r rkmc-i +r rkmc-j ))·PK rkmc ; The various parameters can be referred to in the above embodiments and will not be described again here.
[0553] If the equation is true, it indicates that the signature and data integrity of the second information have not been tampered with, the message source is credible, and the second information has passed verification; if the equation is not true, it indicates that the second information may be abnormal or tampered with.
[0554] For multiple terminals, the following formula is used to aggregate and verify the legitimacy of the second information and the integrity of the signature:
[0555] The parameters can be referred to in the above embodiments and will not be described again here.
[0556] If the equation is true, it indicates that the signature and data integrity of the batch of second information have not been tampered with, the message source is credible, and the second information has passed verification; if the equation is not true, it indicates that the second information may be abnormal or tampered with.
[0557] When the equation does not hold, there may be the following situations:
[0558] The message has been tampered with. The data may be tampered with by malicious attackers during transmission, making the signature inconsistent with the original data;
[0559] Forged identities: Pseudo identities may be forged, resulting in the source of the message being unable to be verified as a legitimate terminal or gateway;
[0560] The timestamp is inconsistent or expired. If the timestamp is invalid, the message may be replayed or delayed in transmission and cannot pass the freshness check;
[0561] Key leakage or signature invalidation may be caused by leakage of the terminal private key or illegal signing operation, resulting in the mismatch between the signature and the verification public key.
[0562] Through the recovery and verification process of batch messages, the introduction of aggregate signature and batch identity authentication mechanism not only improves the efficiency of the system in processing batch data, but also ensures the legitimacy, authenticity and integrity of all transmitted data. Through this mechanism, the control node can effectively cope with the transmission needs of batch data in large-scale smart grid scenarios, while providing advanced privacy protection and security.
[0563] The control node can recover messages in the following ways: The parameters can be referred to in the above embodiments and will not be described again here.
[0564] In some optional implementations, the registration node further performs the following steps:
[0565] In response to the terminal adjustment request sent by the control node, determining a target terminal coprime secret value corresponding to the adjusted terminal;
[0566] Determining and adjusting intermediate parameters based on the target terminal mutually prime secret value;
[0567] generating a new terminal domain key intermediate parameter based on the terminal domain key intermediate parameter and the adjustment intermediate parameter;
[0568] Based on the new terminal domain key intermediate parameter and the new terminal domain initial key, a new terminal domain encryption key is generated, and an update message carrying the new terminal domain encryption key is sent to each terminal, so that each terminal updates the terminal domain initial key after verifying the update message.
[0569] During implementation, in order to ensure the security of terminal communications and the forward and backward security of keys, the control node can monitor the terminal, and trigger a terminal adjustment request when it detects terminal abnormalities or a new terminal is added; the registration node updates the terminal domain-related keys based on the terminal adjustment request, which can not only revoke the legitimacy of the invalid terminal, but also ensure the security authentication of the newly added terminal.
[0570] This embodiment does not specifically limit the abnormal monitoring method, and the trust status of the terminal can be evaluated through data analysis methods or machine learning algorithms. For example, the control node monitors the operation status and data interaction of each terminal in the power grid, and combines historical data and real-time feedback to determine the credibility of the terminal. Alternatively, by analyzing the data packets and communication modes sent by the terminal, potential malicious terminals can be identified and the revocation mechanism can be triggered.
[0571] Exemplarily, the terminal adjustment request may include the identification of the terminal to be adjusted (abnormal terminal and newly added terminal) and the adjustment status;
[0572] The registration node determines the target terminal mutual prime secret value corresponding to the adjusted terminal (the first target terminal mutual prime secret value of the abnormal terminal and the second target terminal mutual prime secret value of the newly added terminal) based on the terminal adjustment request;
[0573] Based on the first target terminal mutually prime secret value, determine the first adjustment intermediate parameter △1var d,i Based on the second target terminal mutually prime secret value, determine the second adjustment intermediate parameter △2var d,i ;
[0574] In the original terminal domain key intermediate parameter μ d Based on this, subtract the first adjustment intermediate parameter △1var d,i , add the second adjustment intermediate parameter △2var d,i , generate new terminal domain key intermediate parameters
[0575] Randomly select a new terminal domain initial key Calculate the new terminal domain key intermediate parameters
[0576]
[0577] An update message carrying a new terminal domain encryption key is broadcast to the terminal.
[0578] Exemplarily, the first update key k is randomly selected upd , and calculate the second updated key PK upd =k upd ·PK cc =(x upd ,y upd ), PK cc Initial key for the control node;
[0579] Calculate the result of the modulo operation r upd =x upd mod p,x upd is the horizontal coordinate of the updated key;
[0580] Generate update signature digest Among them, ID rkmc PK is the registered node identifier. rkmc is the registered node master public key, t3 is the update time, t exp The validity period timestamp of the domain key update message;
[0581] Update signature to
[0582] Update message contains
[0583] Among them, various parameters can be referred to in the above embodiments and will not be described again here.
[0584] For example, after receiving the update message, the terminal checks the timestamps t3 and t exp , ensure that the message has not expired and is the latest broadcast;
[0585] The terminal calculates its new terminal domain initial key based on the update message Among them, x d,i It is the private key for the terminal domain key obtained by the terminal when registering (a unique terminal interprime secret value assigned to the terminal). Only with a valid terminal interprime secret value can the correct terminal domain initial key be calculated;
[0586] The terminal is verified by the following methods: upd k′ d )·R upd =e′ upd ·P+r upd PK rkmc;
[0587] If the equality holds, the verification is successful and the terminal updates its intra-domain key and continues communicating.
[0588] Through this process, the terminal can not only verify the authenticity and legitimacy of the key update message, but also prevent potential man-in-the-middle attacks or message tampering. If the signature verification fails, the terminal will reject the update message and avoid using any untrusted keys for communication. This mechanism not only ensures system security, but also enables the terminal to independently verify the update message, which meets the high security requirements in the smart grid environment.
[0589] Similar to the terminal domain key update process, the same mechanism can also be used to update the gateway domain key. The gateway will receive the key update message and verify it to ensure the security and effectiveness of the communication between the gateway and the control node.
[0590] In the embodiment of the present application, the data transmission method performed by the terminal is as follows: Fig.11 As shown, the following steps are included:
[0591] Step S1101: Generate session key information based on the terminal registration key of the terminal; wherein the terminal registration key is key information generated by the registration node based on the terminal initial public key sent by the terminal;
[0592] Step S1102: Encrypt the message to be transmitted based on the session key information to obtain an encrypted message;
[0593] Step S1103: Generate terminal signature information based on the session key information, the encrypted message and the terminal master private key; wherein the terminal master private key is generated by the terminal based on the terminal registration key;
[0594] Step S1104: Send the first information to the gateway so that the gateway verifies the first information after receiving the first information, generates second information based on the first information after the verification is passed, and sends the second information to the control node; wherein the first information includes the key information, the encrypted message and the terminal signature information.
[0595] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; before generating session key information based on the terminal registration key of the terminal, the method further includes:
[0596] Sending a terminal registration request carrying the terminal initial public key to the registration node, so that the registration node randomly generates a first terminal private key and generates a first terminal public key corresponding to the first terminal private key; generating the second terminal public key based on the terminal initial public key and the first terminal private key; generating the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key;
[0597] Receive terminal response information sent by the registration node; wherein the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0598] In some optional implementation manners, after receiving the terminal response information sent by the registration node, the method further includes:
[0599] Calculate the terminal signature digest based on the modulus operation result of the second terminal public key, the terminal initial public key, and the second terminal public key;
[0600] Calculating a terminal domain initial key based on the terminal domain encryption key and the first mutually prime secret value;
[0601] Verifying the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature digest, the modulo operation result of the second terminal public key, and the registration node master public key;
[0602] After the verification is passed, the terminal master private key is generated based on the terminal domain initial key, the terminal intermediate key and the terminal initial private key corresponding to the terminal initial public key.
[0603] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; and generating session key information based on the terminal registration key of the terminal includes:
[0604] Generate a first session key based on the first session random number and the second terminal public key; and generate a second session key based on the first session random number and the control node initial public key; and generate a first base point public key corresponding to the first session random number;
[0605] Encrypting the message to be transmitted based on the session key information to obtain an encrypted message, including:
[0606] Encrypting the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the sending of the terminal to obtain the encrypted message;
[0607] Generate terminal signature information based on the session key information, the encrypted message and the terminal master private key, including:
[0608] Generate a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0609] Generate a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0610] Generate a first signature modulo operation value based on the first signature hash digest and the first session key;
[0611] The terminal signature information is generated based on the terminal master private key, the first session random number and the first signature modulus operation value.
[0612] In some optional implementations, the terminal pseudo identity information is generated in the following manner:
[0613] The terminal pseudo identity information is generated based on the terminal identifier, the first base point public key, the second session key, the terminal domain initial key and the first session time.
[0614] In some optional implementations, sending the first information to the gateway includes:
[0615] Sending a first message carrying the terminal pseudo-identity information, the encrypted message, the first session key, the first public key mask, the first base point public key, the first signature modulus operation value, the terminal signature information, and the first session time to the gateway, so that the gateway performs the following steps after receiving the first message:
[0616] After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0617] Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0618] Verify the first information based on the first session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key.
[0619] In the embodiment of the present application, the data transmission method performed by the gateway is as follows: Fig.12 As shown, the following steps are included:
[0620] Step S1201: Receive first information sent by a terminal, wherein the first information includes session key information, an encrypted message, and terminal signature information; the session key information is generated based on a terminal registration key of the terminal, and the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal; the encrypted message is obtained by encrypting a message to be transmitted based on the session key information; the terminal signature information is generated by the terminal based on the session key information, the encrypted message, and a terminal master private key, and the terminal master private key is generated by the terminal based on the terminal registration key;
[0621] Step S1202: verifying the first information, and after the verification is passed, generating second information based on the first information;
[0622] Step S1203: Send the second information to the control node, so that the control node verifies the second information and determines the message to be transmitted after the verification is successful.
[0623] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; and the session key information is generated by the terminal in the following manner:
[0624] Generate a first session key based on the first session random number and the second terminal public key; and generate a second session key based on the first session random number and the control node initial public key; and generate a first base point public key corresponding to the first session random number;
[0625] The encrypted message is generated by the terminal in the following manner:
[0626] Encrypting the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the sending of the terminal to obtain the encrypted message;
[0627] The terminal signature information is generated by the terminal in the following manner:
[0628] Generate a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0629] Generate a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0630] Generate a first signature modulo operation value based on the first signature hash digest and the first session key;
[0631] The terminal signature information is generated based on the terminal master private key, the first session random number and the first signature modulus operation value.
[0632] In some optional implementations, the first information includes the terminal pseudo identity information, the encrypted message, the first session key, the first public key mask, the first base point public key, the first signature modulus operation value, the terminal signature information, and first session time first information; verifying the first information includes:
[0633] After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0634] Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0635] Based on the first session key of the target terminal, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key, the first information of the target terminal is verified; wherein the target terminal is one or more terminals that send the first information.
[0636] In some optional implementations, the gateway registration key includes a first gateway public key, a second gateway public key, and a gateway intermediate key; generating the second information based on the first information includes:
[0637] Generate a third session key based on the second session random number and the second gateway public key; and, generate a fourth session key based on the second session random number and the control node initial public key; and, generate a second base point public key corresponding to the second session random number;
[0638] Aggregating the third session key and the first session key of the target terminal to obtain an aggregated session key;
[0639] A second signature hash digest is generated based on a pseudo identity set, an encrypted message set, the aggregated session key, a first public key mask set, a base point public key set, and a session time set; wherein the pseudo identity information set includes the gateway pseudo identity information and the terminal pseudo identity information of the target terminal; the encrypted message set includes the encrypted message of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the second session time corresponding to the gateway sending;
[0640] Generate a second signature modulo operation value based on the second signature hash digest and the third session key;
[0641] Aggregating the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value;
[0642] Generate gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value;
[0643] Generate second information including the pseudo identity information set, the encrypted message set, the aggregate session key, the first public key mask set, the base point public key set, the aggregate signature modulus operation value, the signature information set and the session time set, wherein the signature information set includes the gateway signature information and the terminal signature information of the target terminal, so that the control node performs the following steps after receiving the second information:
[0644] After determining that the time is valid based on the session time set, restoring the gateway identifier and the terminal identifier of the target terminal based on the pseudo identity information set;
[0645] Determine a second gateway public key corresponding to the gateway identifier, and determine a second terminal public key corresponding to each terminal identifier;
[0646] Recovering the second signature hash digest based on the pseudo identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set, and the session time set; and recovering the first signature hash digest of the target terminal based on the pseudo identity information of any target terminal, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0647] Verify the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
[0648] In some optional implementations, the gateway pseudo identity information is generated in the following manner:
[0649] The gateway pseudo identity information is generated based on the gateway identifier, the aggregate session key, the fourth session key, the second base point public key, the gateway domain initial key, the terminal domain initial key and the second session time.
[0650] In some optional implementation manners, before receiving the first information sent by the terminal, the method further includes:
[0651] Sending a gateway registration request carrying the gateway initial public key to the registration node, so that the registration node randomly generates a first gateway private key, and generates a first gateway public key corresponding to the first gateway private key; generating the second gateway public key based on the gateway initial public key and the first gateway private key; generating the gateway intermediate key based on the gateway domain initial key, the terminal domain initial key, the first gateway private key, the gateway initial public key, the second gateway public key and the registration node master public key;
[0652] Receive a gateway response message sent by the registration node; wherein the gateway response message includes the first gateway public key, the second gateway public key, the gateway intermediate key, the second mutual prime secret value, the third mutual prime secret value, the gateway domain encryption key, the terminal domain encryption key and the control node initial public key; the second mutual prime secret value belongs to the gateway domain mutual prime secret value set, and the third mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0653] In some optional implementation manners, after receiving the gateway response information sent by the registration node, the method further includes:
[0654] Calculate a gateway signature digest based on the modulo operation result of the second gateway public key, the gateway initial public key, and the second gateway public key;
[0655] Calculating a gateway domain initial key based on the gateway domain encryption key and the second mutually prime secret value; and calculating a terminal domain initial key based on the terminal domain encryption key and the third mutually prime secret value;
[0656] Verify the gateway response information based on the gateway intermediate key, the gateway domain initial key, the terminal domain initial key, the first gateway public key, the gateway signature digest, the modulo operation result of the second gateway public key and the registration node master public key;
[0657] After the verification is passed, the gateway master private key is generated based on the gateway domain initial key, the gateway intermediate key and the gateway initial private key corresponding to the gateway initial public key.
[0658] In the embodiment of the present application, the data transmission method executed by the control node is as follows: Fig.13 As shown, the following steps are included:
[0659] Step S1301: Receive the second information sent by the gateway; wherein the second information is generated after the gateway verifies the first information sent by the terminal; the first information includes session key information, encrypted message and terminal signature information; the session key information is generated based on the terminal registration key of the terminal, and the terminal registration key is key information generated by the registration node based on the terminal initial public key sent by the terminal; the encrypted message is obtained by encrypting the message to be transmitted based on the session key information; the terminal signature information is generated by the terminal based on the session key information, the encrypted message and the terminal master private key, and the terminal master private key is generated by the terminal based on the terminal registration key;
[0660] Step S1302: verify the second information, and determine the message to be transmitted after the verification is passed.
[0661] In some optional implementations, the gateway registration key includes a first gateway public key, a second gateway public key, and a gateway intermediate key; the second information is generated by:
[0662] Generate a third session key based on the second session random number and the second gateway public key; and, generate a fourth session key based on the second session random number and the control node initial public key; and, generate a second base point public key corresponding to the second session random number;
[0663] Aggregating the third session key and the first session key of the target terminal to obtain an aggregated session key; the target terminal is one or more terminals that send the first information;
[0664] A second signature hash digest is generated based on a pseudo identity set, an encrypted message set, the aggregated session key, a first public key mask set, a base point public key set, and a session time set; wherein the pseudo identity information set includes the gateway pseudo identity information and the terminal pseudo identity information of the target terminal; the encrypted message set includes the encrypted message of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the second session time corresponding to the gateway sending;
[0665] Generate a second signature modulo operation value based on the second signature hash digest and the third session key;
[0666] Aggregating the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value;
[0667] Generate gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value;
[0668] Generate second information including the pseudo-identity information set, the encrypted message set, the aggregated session key, the first public key mask set, the base point public key set, the aggregated signature modulus operation value, the signature information set and the session time set, wherein the signature information set includes the gateway signature information and the terminal signature information of the target terminal.
[0669] In some optional implementation manners, verifying the second information includes:
[0670] After determining that the time is valid based on the session time set, restoring the gateway identifier and the terminal identifier of the target terminal based on the pseudo identity information set;
[0671] Determine a second gateway public key corresponding to the gateway identifier, and determine a second terminal public key corresponding to each terminal identifier;
[0672] Recovering the second signature hash digest based on the pseudo identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set, and the session time set; and recovering the first signature hash digest of the target terminal based on the pseudo identity information of any target terminal, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0673] Verify the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
[0674] In some optional implementation manners, before receiving the second information sent by the gateway, the method further includes:
[0675] Sending a terminal registration request carrying the initial public key of the control node to the registration node, so that the registration node randomly generates a first control node private key, and generates a first control node public key corresponding to the first control node private key; generating a second control node public key based on the initial public key of the control node and the first control node private key; generating the control node intermediate key based on the gateway domain initial key, the terminal domain initial key, the first control node private key, the control node initial public key, the second control node public key and the registration node master public key;
[0676] Receive the control node response information sent by the registration node; wherein the control node response information includes the first control node public key, the second control node public key, the control node intermediate key, the fourth mutual prime secret value, the fifth mutual prime secret value, the gateway domain encryption key and the terminal domain encryption key; the fourth mutual prime secret value belongs to the gateway domain mutual prime secret value set, and the fifth mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0677] In some optional implementation manners, after receiving the control node response information sent by the registration node, the method further includes:
[0678] Calculate a control node signature digest based on a result of a modulo operation of the second control node public key, the control node initial public key, and the second control node public key;
[0679] Calculating a gateway domain initial key based on the gateway domain encryption key and the fourth mutually prime secret value; and calculating a terminal domain initial key based on the terminal domain encryption key and the fifth mutually prime secret value;
[0680] Verify the control node response information based on the control node intermediate key, the gateway domain initial key, the terminal domain initial key, the first control node public key, the control node signature summary, the modulus operation result of the second control node public key and the registration node master public key;
[0681] After the verification is passed, the control node master private key is generated based on the gateway domain initial key, the control node intermediate key and the control node initial private key corresponding to the control node initial public key.
[0682] In the embodiment of the present application, the data transmission method performed by the registration node is as follows: Fig.14 As shown, the following steps are included:
[0683] Step S1401: Generate a terminal registration key based on the terminal initial public key sent by the terminal;
[0684] Step S1402: Send the terminal registration key to the terminal, so that the terminal generates session key information based on the terminal registration key; encrypt the message to be transmitted based on the session key information to obtain an encrypted message; generate terminal signature information based on the session key information, the encrypted message and the terminal master private key; send first information to the gateway, so that the gateway verifies the first information after receiving the first information, and generates second information based on the first information after the verification is passed, and sends the second information to the control node; wherein the terminal master private key is generated by the terminal based on the terminal registration key; the first information includes the key information, the encrypted message and the terminal signature information.
[0685] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; generating the terminal registration key based on the terminal initial public key sent by the terminal includes:
[0686] In response to a terminal registration request sent by the terminal and carrying the initial public key of the terminal, randomly generate a first terminal private key, and generate a first terminal public key corresponding to the first terminal private key;
[0687] Generate the second terminal public key based on the terminal initial public key and the first terminal private key;
[0688] Generate the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key;
[0689] Sending terminal response information to the terminal, so that the terminal calculates a terminal signature digest based on a result of a modulo operation of the second terminal public key, the terminal initial public key, and the second terminal public key; calculating a terminal domain initial key based on the terminal domain encryption key and the first coprime secret value; verifying the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature digest, a result of a modulo operation of the second terminal public key, and the registration node master public key; and after the verification is passed, generating the terminal master private key based on the terminal domain initial key, the terminal intermediate key, and the terminal initial private key corresponding to the terminal initial public key;
[0690] Among them, the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0691] In some optional implementations, the terminal domain encryption key is generated in the following manner:
[0692] After generating the terminal domain initial key, determining the second mutual prime secret value product based on the second number of terminal mutual prime secret values;
[0693] Determine a terminal domain key numerator and an inverse element of the terminal domain key numerator of each terminal mutual prime secret value based on the product of the second mutual prime secret values;
[0694] Determine a terminal domain key variable of each terminal mutual prime secret value based on the terminal domain key numerator and the inverse element of the terminal domain key numerator;
[0695] Determine terminal domain key intermediate parameters based on terminal domain key variables of all terminal mutually prime secret values;
[0696] The terminal domain encryption key is generated based on the terminal domain key intermediate parameter and the terminal domain initial key.
[0697] Some optional implementations also include:
[0698] In response to the terminal adjustment request sent by the control node, determining a target terminal coprime secret value corresponding to the adjusted terminal;
[0699] Determining and adjusting intermediate parameters based on the target terminal mutually prime secret value;
[0700] generating a new terminal domain key intermediate parameter based on the terminal domain key intermediate parameter and the adjustment intermediate parameter;
[0701] Based on the new terminal domain key intermediate parameter and the new terminal domain initial key, a new terminal domain encryption key is generated, and an update message carrying the new terminal domain encryption key is sent to each terminal, so that each terminal updates the terminal domain initial key after verifying the update message.
[0702] Figure 11 to Figure 14 The specific implementation of the embodiment can refer to the implementation of the above-mentioned interaction method, and the repeated parts will not be repeated.
[0703] like Fig.15 As shown, based on Fig.11 The invention concept of the data transmission method shown in FIG. 1 is the same as that of the invention concept, and the embodiment of the present application provides a first data transmission device 1500, which is applied to a terminal, and the device includes:
[0704] The first generating module 1501 is used to generate session key information based on the terminal registration key of the terminal; wherein the terminal registration key is key information generated by the registration node based on the terminal initial public key sent by the terminal;
[0705] An encryption module 1502 is used to encrypt the message to be transmitted based on the session key information to obtain an encrypted message;
[0706] The first signature module 1503 is used to generate terminal signature information based on the session key information, the encrypted message and the terminal master private key; wherein the terminal master private key is generated by the terminal based on the terminal registration key;
[0707] The first sending module 1504 is used to send first information to the gateway, so that the gateway verifies the first information after receiving the first information, and generates second information based on the first information after the verification is passed, and sends the second information to the control node; wherein the first information includes the key information, the encrypted message and the terminal signature information.
[0708] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; and further includes a first registration module 1505, which is used to:
[0709] Before the first generating module generates session key information based on the terminal registration key of the terminal, a terminal registration request carrying the terminal initial public key is sent to the registration node, so that the registration node randomly generates a first terminal private key and generates a first terminal public key corresponding to the first terminal private key; generates the second terminal public key based on the terminal initial public key and the first terminal private key; generates the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key;
[0710] Receive terminal response information sent by the registration node; wherein the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0711] In some optional implementation manners, after receiving the terminal response information sent by the registration node, the first registration module 1505 is further configured to:
[0712] Calculate the terminal signature digest based on the modulus operation result of the second terminal public key, the terminal initial public key, and the second terminal public key;
[0713] Calculating a terminal domain initial key based on the terminal domain encryption key and the first mutually prime secret value;
[0714] Verifying the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature digest, the modulo operation result of the second terminal public key, and the registration node master public key;
[0715] After the verification is passed, the terminal master private key is generated based on the terminal domain initial key, the terminal intermediate key and the terminal initial private key corresponding to the terminal initial public key.
[0716] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; the first generation module 1501 is specifically used to:
[0717] Generate a first session key based on the first session random number and the second terminal public key; and generate a second session key based on the first session random number and the control node initial public key; and generate a first base point public key corresponding to the first session random number;
[0718] The encryption module 1502 is specifically used for:
[0719] Encrypting the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the sending of the terminal to obtain the encrypted message;
[0720] The first signature module 1503 is specifically used for:
[0721] Generate a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0722] Generate a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0723] Generate a first signature modulo operation value based on the first signature hash digest and the first session key;
[0724] The terminal signature information is generated based on the terminal master private key, the first session random number and the first signature modulus operation value.
[0725] In some optional implementations, the terminal pseudo identity information is generated in the following manner:
[0726] The terminal pseudo identity information is generated based on the terminal identifier, the first base point public key, the second session key, the terminal domain initial key and the first session time.
[0727] In some optional implementation manners, the first sending module 1504 is specifically configured to:
[0728] Sending a first message carrying the terminal pseudo-identity information, the encrypted message, the first session key, the first public key mask, the first base point public key, the first signature modulus operation value, the terminal signature information, and the first session time to the gateway, so that the gateway performs the following steps after receiving the first message:
[0729] After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0730] Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0731] Verify the first information based on the first session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key.
[0732] like Fig.16 As shown, based on Fig.12 The invention concept of the data transmission method shown in FIG. 1 is the same as that of the invention concept, and the embodiment of the present application provides a second data transmission device 1600, which is applied to a gateway, and the device includes:
[0733] The first receiving module 1601 is used to receive first information sent by a terminal, wherein the first information includes session key information, an encrypted message and terminal signature information; the session key information is generated based on a terminal registration key of the terminal, and the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal; the encrypted message is obtained by encrypting a message to be transmitted based on the session key information; the terminal signature information is generated by the terminal based on the session key information, the encrypted message and a terminal master private key, and the terminal master private key is generated by the terminal based on the terminal registration key;
[0734] A first verification module 1602, configured to verify the first information, and after the verification is successful, generate second information based on the first information;
[0735] The second sending module 1603 is used to send the second information to the control node, so that the control node verifies the second information and determines the message to be transmitted after the verification is passed.
[0736] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; and the session key information is generated by the terminal in the following manner:
[0737] Generate a first session key based on the first session random number and the second terminal public key; and generate a second session key based on the first session random number and the control node initial public key; and generate a first base point public key corresponding to the first session random number;
[0738] The encrypted message is generated by the terminal in the following manner:
[0739] Encrypting the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the sending of the terminal to obtain the encrypted message;
[0740] The terminal signature information is generated by the terminal in the following manner:
[0741] generating a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key, and the first session time;
[0742] Generate a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0743] Generate a first signature modulo operation value based on the first signature hash digest and the first session key;
[0744] The terminal signature information is generated based on the terminal master private key, the first session random number and the first signature modulus operation value.
[0745] In some optional implementation manners, the first verification module 1602 is specifically configured to:
[0746] After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time;
[0747] Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0748] Based on the first session key of the target terminal, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key, the first information of the target terminal is verified; wherein the target terminal is one or more terminals that send the first information.
[0749] In some optional implementations, the gateway registration key includes a first gateway public key, a second gateway public key, and a gateway intermediate key; the first verification module 1602 is specifically used to:
[0750] Generate a third session key based on the second session random number and the second gateway public key; and, generate a fourth session key based on the second session random number and the control node initial public key; and, generate a second base point public key corresponding to the second session random number;
[0751] Aggregating the third session key and the first session key of the target terminal to obtain an aggregated session key;
[0752] A second signature hash digest is generated based on a pseudo identity set, an encrypted message set, the aggregated session key, a first public key mask set, a base point public key set, and a session time set; wherein the pseudo identity information set includes the gateway pseudo identity information and the terminal pseudo identity information of the target terminal; the encrypted message set includes the encrypted message of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the second session time corresponding to the gateway sending;
[0753] Generate a second signature modulo operation value based on the second signature hash digest and the third session key;
[0754] Aggregating the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value;
[0755] Generate gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value;
[0756] Generate second information including the pseudo identity information set, the encrypted message set, the aggregate session key, the first public key mask set, the base point public key set, the aggregate signature modulus operation value, the signature information set and the session time set, wherein the signature information set includes the gateway signature information and the terminal signature information of the target terminal, so that the control node performs the following steps after receiving the second information:
[0757] After determining that the time is valid based on the session time set, restoring the gateway identifier and the terminal identifier of the target terminal based on the pseudo identity information set;
[0758] Determine a second gateway public key corresponding to the gateway identifier, and determine a second terminal public key corresponding to each terminal identifier;
[0759] Recovering the second signature hash digest based on the pseudo identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set, and the session time set; and recovering the first signature hash digest of the target terminal based on the pseudo identity information of any target terminal, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0760] Verify the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
[0761] In some optional implementations, the gateway pseudo identity information is generated in the following manner:
[0762] The gateway pseudo identity information is generated based on the gateway identifier, the aggregate session key, the fourth session key, the second base point public key, the gateway domain initial key, the terminal domain initial key and the second session time.
[0763] Some optional implementations further include a second registration module 1604, which is used to:
[0764] Before the first receiving module 1601 receives the first information sent by the terminal, a gateway registration request carrying the gateway initial public key is sent to the registration node, so that the registration node randomly generates a first gateway private key, and generates a first gateway public key corresponding to the first gateway private key; the second gateway public key is generated based on the gateway initial public key and the first gateway private key; the gateway intermediate key is generated based on the gateway domain initial key, the terminal domain initial key, the first gateway private key, the gateway initial public key, the second gateway public key and the registration node master public key;
[0765] Receive a gateway response message sent by the registration node; wherein the gateway response message includes the first gateway public key, the second gateway public key, the gateway intermediate key, the second mutual prime secret value, the third mutual prime secret value, the gateway domain encryption key, the terminal domain encryption key and the control node initial public key; the second mutual prime secret value belongs to the gateway domain mutual prime secret value set, and the third mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0766] In some optional implementation manners, after receiving the gateway response information sent by the registration node, the second registration module 1604 is further used to:
[0767] Calculate a gateway signature digest based on the modulo operation result of the second gateway public key, the gateway initial public key, and the second gateway public key;
[0768] Calculating a gateway domain initial key based on the gateway domain encryption key and the second mutually prime secret value; and calculating a terminal domain initial key based on the terminal domain encryption key and the third mutually prime secret value;
[0769] Verify the gateway response information based on the gateway intermediate key, the gateway domain initial key, the terminal domain initial key, the first gateway public key, the gateway signature digest, the modulo operation result of the second gateway public key and the registration node master public key;
[0770] After the verification is passed, the gateway master private key is generated based on the gateway domain initial key, the gateway intermediate key and the gateway initial private key corresponding to the gateway initial public key.
[0771] like Fig.17 As shown, based on Fig.13 The invention concept of the data transmission method shown in FIG. 1 is the same as that of the invention concept, and the embodiment of the present application provides a third data transmission device 1700, which is applied to a control node, and the device includes:
[0772] The second receiving module 1701 is used to receive the second information sent by the gateway; wherein the second information is generated after the gateway verifies the first information sent by the terminal; the first information includes session key information, encrypted message and terminal signature information; the session key information is generated based on the terminal registration key of the terminal, and the terminal registration key is the key information generated by the registration node based on the terminal initial public key sent by the terminal; the encrypted message is obtained by encrypting the message to be transmitted based on the session key information; the terminal signature information is generated by the terminal based on the session key information, the encrypted message and the terminal master private key, and the terminal master private key is generated by the terminal based on the terminal registration key;
[0773] The second verification module 1702 is used to verify the second information and determine the message to be transmitted after the verification is passed.
[0774] In some optional implementations, the gateway registration key includes a first gateway public key, a second gateway public key, and a gateway intermediate key; the second information is generated by:
[0775] Generate a third session key based on the second session random number and the second gateway public key; and, generate a fourth session key based on the second session random number and the control node initial public key; and, generate a second base point public key corresponding to the second session random number;
[0776] Aggregating the third session key and the first session key of the target terminal to obtain an aggregated session key; the target terminal is one or more terminals that send the first information;
[0777] A second signature hash digest is generated based on a pseudo identity set, an encrypted message set, the aggregated session key, a first public key mask set, a base point public key set, and a session time set; wherein the pseudo identity information set includes the gateway pseudo identity information and the terminal pseudo identity information of the target terminal; the encrypted message set includes the encrypted message of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the second session time corresponding to the gateway sending;
[0778] Generate a second signature modulo operation value based on the second signature hash digest and the third session key;
[0779] Aggregating the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value;
[0780] Generate gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value;
[0781] Generate second information including the pseudo-identity information set, the encrypted message set, the aggregated session key, the first public key mask set, the base point public key set, the aggregated signature modulus operation value, the signature information set and the session time set, wherein the signature information set includes the gateway signature information and the terminal signature information of the target terminal.
[0782] In some optional implementation manners, the second verification module 1702 is specifically configured to:
[0783] After determining that the time is valid based on the session time set, restoring the gateway identifier and the terminal identifier of the target terminal based on the pseudo identity information set;
[0784] Determine a second gateway public key corresponding to the gateway identifier, and determine a second terminal public key corresponding to each terminal identifier;
[0785] Recovering the second signature hash digest based on the pseudo identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set, and the session time set; and recovering the first signature hash digest of the target terminal based on the pseudo identity information of any target terminal, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time;
[0786] Verify the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
[0787] Some optional implementations further include a third registration module 1703, which is used to:
[0788] Before the second receiving module 1701 receives the second information sent by the gateway, a terminal registration request carrying the initial public key of the control node is sent to the registration node, so that the registration node randomly generates a first control node private key, and generates a first control node public key corresponding to the first control node private key; generates a second control node public key based on the control node initial public key and the first control node private key; generates the control node intermediate key based on the gateway domain initial key, the terminal domain initial key, the first control node private key, the control node initial public key, the second control node public key and the registration node master public key;
[0789] Receive the control node response information sent by the registration node; wherein the control node response information includes the first control node public key, the second control node public key, the control node intermediate key, the fourth mutual prime secret value, the fifth mutual prime secret value, the gateway domain encryption key and the terminal domain encryption key; the fourth mutual prime secret value belongs to the gateway domain mutual prime secret value set, and the fifth mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0790] In some optional implementation manners, after receiving the control node response information sent by the registration node, the third registration module 1703 is further used to:
[0791] Calculate a control node signature digest based on a result of a modulo operation of the second control node public key, the control node initial public key, and the second control node public key;
[0792] Calculating a gateway domain initial key based on the gateway domain encryption key and the fourth mutually prime secret value; and calculating a terminal domain initial key based on the terminal domain encryption key and the fifth mutually prime secret value;
[0793] Verify the control node response information based on the control node intermediate key, the gateway domain initial key, the terminal domain initial key, the first control node public key, the control node signature summary, the modulus operation result of the second control node public key and the registration node master public key;
[0794] After the verification is passed, the control node master private key is generated based on the gateway domain initial key, the control node intermediate key and the control node initial private key corresponding to the control node initial public key.
[0795] like Fig.18 As shown, based on Fig.14 The invention concept of the data transmission method shown in FIG. 1 is the same as that of the invention concept, and the embodiment of the present application provides a fourth data transmission device 1800, which is applied to a registration node, and the device includes:
[0796] The fourth registration module 1801 is used to generate a terminal registration key based on the terminal initial public key sent by the terminal;
[0797] The fourth sending module 1802 is used to send the terminal registration key to the terminal, so that the terminal generates session key information based on the terminal registration key; encrypts the message to be transmitted based on the session key information to obtain an encrypted message; generates terminal signature information based on the session key information, the encrypted message and the terminal master private key; sends first information to the gateway, so that the gateway verifies the first information after receiving the first information, and generates second information based on the first information after the verification is passed, and sends the second information to the control node; wherein the terminal master private key is generated by the terminal based on the terminal registration key; the first information includes the key information, the encrypted message and the terminal signature information.
[0798] In some optional implementations, the terminal registration key includes a first terminal public key, a second terminal public key, and a terminal intermediate key; the fourth registration module 1801 is specifically used to:
[0799] In response to a terminal registration request sent by the terminal and carrying the initial public key of the terminal, randomly generate a first terminal private key, and generate a first terminal public key corresponding to the first terminal private key;
[0800] Generate the second terminal public key based on the terminal initial public key and the first terminal private key;
[0801] Generate the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key;
[0802] Sending terminal response information to the terminal, so that the terminal calculates a terminal signature digest based on a result of a modulo operation of the second terminal public key, the terminal initial public key, and the second terminal public key; calculating a terminal domain initial key based on the terminal domain encryption key and the first coprime secret value; verifying the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature digest, a result of a modulo operation of the second terminal public key, and the registration node master public key; and after the verification is passed, generating the terminal master private key based on the terminal domain initial key, the terminal intermediate key, and the terminal initial private key corresponding to the terminal initial public key;
[0803] Among them, the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
[0804] In some optional implementations, the terminal domain encryption key is generated in the following manner:
[0805] After generating the terminal domain initial key, determining a second mutual prime secret value product based on a second number of terminal mutual prime secret values;
[0806] Determine a terminal domain key numerator and an inverse element of the terminal domain key numerator of each terminal mutual prime secret value based on the product of the second mutual prime secret values;
[0807] Determine a terminal domain key variable of each terminal mutually prime secret value based on the terminal domain key numerator and the inverse element of the terminal domain key numerator;
[0808] Determine terminal domain key intermediate parameters based on terminal domain key variables of all terminal mutually prime secret values;
[0809] The terminal domain encryption key is generated based on the terminal domain key intermediate parameter and the terminal domain initial key.
[0810] Some optional implementations further include an update module 1803:
[0811] In response to the terminal adjustment request sent by the control node, determining a target terminal coprime secret value corresponding to the adjusted terminal;
[0812] Determining and adjusting intermediate parameters based on the target terminal mutually prime secret value;
[0813] generating a new terminal domain key intermediate parameter based on the terminal domain key intermediate parameter and the adjustment intermediate parameter;
[0814] Based on the new terminal domain key intermediate parameter and the new terminal domain initial key, a new terminal domain encryption key is generated, and an update message carrying the new terminal domain encryption key is sent to each terminal, so that each terminal updates the terminal domain initial key after verifying the update message.
[0815] Figure 15 to Figure 18 The specific implementation of the embodiment can refer to the implementation of the above-mentioned interaction method, and the repeated parts will not be repeated.
[0816] Based on the same technical concept, the embodiment of the present application also provides a terminal 1900, such as Fig.19 As shown, it includes at least one processor 1901 and a memory 1902 connected to the at least one processor. The specific connection medium between the processor 1901 and the memory 1902 is not limited in the embodiment of the present application. Fig.19For example, the processor 1901 and the memory 1902 are connected via a bus 1903. The bus can be divided into a path bus, a data bus, a control bus, etc. For ease of representation, Fig.19 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0817] Among them, the processor 1901 is the control node of the terminal, and can use various interfaces and lines to connect various parts of the terminal, and realize data processing by running or executing instructions stored in the memory 1902 and calling data stored in the memory 1902. Optionally, the processor 1901 may include one or more processing units, and the processor 1901 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application program, and the modem processor mainly processes the issuance of instructions. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1901. In some embodiments, the processor 1901 and the memory 1902 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0818] Processor 1901 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the data transmission method may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0819] Memory 1902, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1902 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1902 is any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1902 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0820] In an embodiment of the present application, the memory 1902 stores a computer program, and when the program is executed by the processor 1901, the processor 1901 executes the data transmission method corresponding to the above-mentioned terminal side.
[0821] Based on the same technical concept, an embodiment of the present application also provides a gateway, including at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the data transmission method corresponding to the above-mentioned gateway side.
[0822] Based on the same technical concept, an embodiment of the present application also provides a control node, including at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the data transmission method corresponding to the above-mentioned control node side.
[0823] Based on the same technical concept, an embodiment of the present application also provides a registration node, including at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the data transmission method corresponding to the above-mentioned registration node side.
[0824] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program executable by a processor. When the program runs on the processor, the processor executes the steps of the above-mentioned data transmission method.
[0825] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0826] The present application is described with reference to the flowcharts and / or block diagrams of the methods, terminals (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0827] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0828] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal so that a series of operating steps are executed on the computer or other programmable terminal to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0829] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0830] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data transmission method, characterized in that: Applied to a terminal, the method includes: Generate session key information based on the terminal registration key of the terminal; wherein the terminal registration key is key information generated by the registration node based on the terminal initial public key sent by the terminal; Encrypting the message to be transmitted based on the session key information to obtain an encrypted message; Generate terminal signature information based on the session key information, the encrypted message and the terminal master private key; wherein the terminal master private key is generated by the terminal based on the terminal registration key; Sending first information to a gateway so that the gateway verifies the first information after receiving the first information, generates second information based on the first information after the verification is passed, and sends the second information to a control node; wherein the first information includes the key information, the encrypted message and the terminal signature information.
2. The method according to claim 1, characterized in that The terminal registration key includes a first terminal public key, a second terminal public key and a terminal intermediate key; before generating session key information based on the terminal registration key of the terminal, the method further includes: Sending a terminal registration request carrying the terminal initial public key to the registration node, so that the registration node randomly generates a first terminal private key and generates a first terminal public key corresponding to the first terminal private key; generating the second terminal public key based on the terminal initial public key and the first terminal private key; generating the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key; Receive terminal response information sent by the registration node; wherein the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
3. The method according to claim 2, characterized in that After receiving the terminal response information sent by the registration node, the method further includes: Calculate the terminal signature digest based on the modulus operation result of the second terminal public key, the terminal initial public key, and the second terminal public key; Calculating a terminal domain initial key based on the terminal domain encryption key and the first mutually prime secret value; Verifying the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature digest, the modulo operation result of the second terminal public key, and the registration node master public key; After the verification is passed, the terminal master private key is generated based on the terminal domain initial key, the terminal intermediate key and the terminal initial private key corresponding to the terminal initial public key.
4. The method according to claim 1, characterized in that The terminal registration key includes a first terminal public key, a second terminal public key and a terminal intermediate key; Generate session key information based on the terminal registration key of the terminal, including: Generate a first session key based on the first session random number and the second terminal public key; and generate a second session key based on the first session random number and the control node initial public key; and generate a first base point public key corresponding to the first session random number; Encrypting the message to be transmitted based on the session key information to obtain an encrypted message, including: Encrypting the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the sending of the terminal to obtain the encrypted message; Generate terminal signature information based on the session key information, the encrypted message and the terminal master private key, including: generating a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key, and the first session time; Generate a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time; Generate a first signature modulo operation value based on the first signature hash digest and the first session key; The terminal signature information is generated based on the terminal master private key, the first session random number and the first signature modulus operation value.
5. The method according to claim 4, characterized in that The terminal pseudo identity information is generated by: The terminal pseudo identity information is generated based on the terminal identifier, the first base point public key, the second session key, the terminal domain initial key and the first session time.
6. The method according to claim 4, characterized in that Sending first information to the gateway includes: Sending a first message carrying the terminal pseudo-identity information, the encrypted message, the first session key, the first public key mask, the first base point public key, the first signature modulus operation value, the terminal signature information, and the first session time to the gateway, so that the gateway performs the following steps after receiving the first message: After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time; Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time; Verify the first information based on the first session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key.
7. A data transmission method, characterized in that: Applied to a gateway, the method comprises: Receive first information sent by a terminal, wherein the first information includes session key information, an encrypted message, and terminal signature information; the session key information is generated based on a terminal registration key of the terminal, and the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal; the encrypted message is obtained by encrypting a message to be transmitted based on the session key information; the terminal signature information is generated by the terminal based on the session key information, the encrypted message, and a terminal master private key, and the terminal master private key is generated by the terminal based on the terminal registration key; Verifying the first information, and after the verification is successful, generating second information based on the first information; The second information is sent to the control node, so that the control node verifies the second information, and determines the message to be transmitted after the verification passes.
8. The method according to claim 7, characterized in that The terminal registration key includes a first terminal public key, a second terminal public key and a terminal intermediate key; the session key information is generated by the terminal in the following manner: Generate a first session key based on the first session random number and the second terminal public key; and generate a second session key based on the first session random number and the control node initial public key; and generate a first base point public key corresponding to the first session random number; The encrypted message is generated by the terminal in the following manner: Encrypting the message to be transmitted based on the terminal identifier, the second session key, the terminal domain initial key, and the first session time corresponding to the sending of the terminal to obtain the encrypted message; The terminal signature information is generated by the terminal in the following manner: generating a first public key mask based on the second terminal public key, the terminal pseudo identity information, the encrypted message, the terminal domain initial key, and the first session time; Generate a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time; Generate a first signature modulo operation value based on the first signature hash digest and the first session key; The terminal signature information is generated based on the terminal master private key, the first session random number and the first signature modulus operation value.
9. The method according to claim 8, characterized in that The first information includes the terminal pseudo identity information, the encrypted message, the first session key, the first public key mask, the first base point public key, the first signature modulus operation value, the terminal signature information and first session time; Verifying the first information includes: After determining that the time is valid based on the first session time, recovering the second terminal public key based on the first public key mask, the terminal pseudo identity information, the encrypted message, the terminal domain initial key and the first session time; Recovering a first signature hash digest based on the terminal pseudo-identity information, the encrypted message, a modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time; Based on the first session key of the target terminal, the terminal domain initial key, the terminal signature information, the second terminal public key, the first signature modulo operation value, the first signature hash summary, the modulo operation result corresponding to the second terminal public key and the registration node master public key, the first information of the target terminal is verified; wherein the target terminal is one or more terminals that send the first information.
10. The method according to claim 9, characterized in that The gateway registration key includes a first gateway public key, a second gateway public key and a gateway intermediate key; Generating second information based on the first information includes: Generate a third session key based on the second session random number and the second gateway public key; and, generate a fourth session key based on the second session random number and the control node initial public key; and, generate a second base point public key corresponding to the second session random number; Aggregating the third session key and the first session key of the target terminal to obtain an aggregated session key; A second signature hash digest is generated based on a pseudo identity set, an encrypted message set, the aggregated session key, a first public key mask set, a base point public key set, and a session time set; wherein the pseudo identity information set includes the gateway pseudo identity information and the terminal pseudo identity information of the target terminal; the encrypted message set includes the encrypted message of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the second session time corresponding to the gateway sending; Generate a second signature modulo operation value based on the second signature hash digest and the third session key; Aggregating the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value; Generate gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value; Generate second information including the pseudo identity information set, the encrypted message set, the aggregate session key, the first public key mask set, the base point public key set, the aggregate signature modulus operation value, the signature information set and the session time set, wherein the signature information set includes the gateway signature information and the terminal signature information of the target terminal, so that the control node performs the following steps after receiving the second information: After determining that the time is valid based on the session time set, restoring the gateway identifier and the terminal identifier of the target terminal based on the pseudo identity information set; Determine a second gateway public key corresponding to the gateway identifier, and determine a second terminal public key corresponding to each terminal identifier; Recovering the second signature hash digest based on the pseudo identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set, and the session time set; and recovering the first signature hash digest of the target terminal based on the pseudo identity information of any target terminal, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time; Verify the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
11. The method according to claim 10, characterized in that The gateway pseudo identity information is generated in the following manner: The gateway pseudo identity information is generated based on the gateway identifier, the aggregate session key, the fourth session key, the second base point public key, the gateway domain initial key, the terminal domain initial key and the second session time.
12. The method according to claim 7, characterized in that Before receiving the first information sent by the terminal, the method further includes: Sending a gateway registration request carrying the gateway initial public key to the registration node, so that the registration node randomly generates a first gateway private key, and generates a first gateway public key corresponding to the first gateway private key; generating the second gateway public key based on the gateway initial public key and the first gateway private key; generating the gateway intermediate key based on the gateway domain initial key, the terminal domain initial key, the first gateway private key, the gateway initial public key, the second gateway public key and the registration node master public key; Receive a gateway response message sent by the registration node; wherein the gateway response message includes the first gateway public key, the second gateway public key, the gateway intermediate key, the second mutual prime secret value, the third mutual prime secret value, the gateway domain encryption key, the terminal domain encryption key and the control node initial public key; the second mutual prime secret value belongs to the gateway domain mutual prime secret value set, and the third mutual prime secret value belongs to the terminal domain mutual prime secret value set.
13. The method according to claim 12, characterized in that After receiving the gateway response information sent by the registration node, the method further includes: Calculate a gateway signature digest based on the modulo operation result of the second gateway public key, the gateway initial public key, and the second gateway public key; Calculating a gateway domain initial key based on the gateway domain encryption key and the second mutually prime secret value; and calculating a terminal domain initial key based on the terminal domain encryption key and the third mutually prime secret value; Verify the gateway response information based on the gateway intermediate key, the gateway domain initial key, the terminal domain initial key, the first gateway public key, the gateway signature digest, the modulo operation result of the second gateway public key and the registration node master public key; After the verification is passed, the gateway master private key is generated based on the gateway domain initial key, the gateway intermediate key and the gateway initial private key corresponding to the gateway initial public key.
14. A data transmission method, characterized in that: Applied to a control node, the method comprises: Receive second information sent by a gateway; wherein the second information is generated after the gateway verifies the first information sent by the terminal; the first information includes session key information, an encrypted message and terminal signature information; the session key information is generated based on a terminal registration key of the terminal, and the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal; the encrypted message is obtained by encrypting a message to be transmitted based on the session key information; the terminal signature information is generated by the terminal based on the session key information, the encrypted message and a terminal master private key, and the terminal master private key is generated by the terminal based on the terminal registration key; The second information is verified, and the message to be transmitted is determined after the verification passes.
15. The method according to claim 14, characterized in that The gateway registration key includes a first gateway public key, a second gateway public key and a gateway intermediate key; the second information is generated in the following manner: Generate a third session key based on the second session random number and the second gateway public key; and, generate a fourth session key based on the second session random number and the control node initial public key; and, generate a second base point public key corresponding to the second session random number; Aggregating the third session key and the first session key of the target terminal to obtain an aggregated session key; the target terminal is one or more terminals that send the first information; A second signature hash digest is generated based on a pseudo identity set, an encrypted message set, the aggregated session key, a first public key mask set, a base point public key set, and a session time set; wherein the pseudo identity information set includes the gateway pseudo identity information and the terminal pseudo identity information of the target terminal; the encrypted message set includes the encrypted message of the target terminal; the first public key mask set includes the first public key mask of the target terminal; the base point public key set includes the second base point key and the first base point key of the target terminal; the session time set includes the first session time corresponding to the target terminal and the second session time corresponding to the gateway sending; Generate a second signature modulo operation value based on the second signature hash digest and the third session key; Aggregating the second signature modulo operation value and the first signature modulo operation value of the target terminal to obtain an aggregated signature modulo operation value; Generate gateway signature information based on the gateway master private key, the second session random number and the second signature modulus operation value; Generate second information including the pseudo-identity information set, the encrypted message set, the aggregated session key, the first public key mask set, the base point public key set, the aggregated signature modulus operation value, the signature information set and the session time set, wherein the signature information set includes the gateway signature information and the terminal signature information of the target terminal.
16. The method according to claim 15, characterized in that Verifying the second information includes: After determining that the time is valid based on the session time set, restoring the gateway identifier and the terminal identifier of the target terminal based on the pseudo identity information set; Determine a second gateway public key corresponding to the gateway identifier, and determine a second terminal public key corresponding to each terminal identifier; Recovering the second signature hash digest based on the pseudo identity set, the encrypted message of the target terminal, the aggregated session key, the first signature hash digest of the target terminal, the base point public key set, and the session time set; and recovering the first signature hash digest of the target terminal based on the pseudo identity information of any target terminal, the encrypted message, the modulo operation result corresponding to the second terminal public key, the first base point public key, and the first session time; Verify the second information based on the aggregated session key, the terminal domain initial key, the terminal signature information, the second terminal public key, the gateway domain initial key, the gateway signature information, the second gateway public key, the aggregated signature modulo operation value, the signature information set, the first signature hash summary, the second signature hash summary, the modulo operation result corresponding to the second terminal public key, the modulo operation result corresponding to the second gateway public key and the registered node master public key.
17. The method according to claim 14, characterized in that Before receiving the second information sent by the gateway, the method further includes: Sending a terminal registration request carrying the initial public key of the control node to the registration node, so that the registration node randomly generates a first control node private key, and generates a first control node public key corresponding to the first control node private key; generating a second control node public key based on the initial public key of the control node and the first control node private key; generating the control node intermediate key based on the gateway domain initial key, the terminal domain initial key, the first control node private key, the control node initial public key, the second control node public key and the registration node master public key; Receive the control node response information sent by the registration node; wherein the control node response information includes the first control node public key, the second control node public key, the control node intermediate key, the fourth mutual prime secret value, the fifth mutual prime secret value, the gateway domain encryption key and the terminal domain encryption key; the fourth mutual prime secret value belongs to the gateway domain mutual prime secret value set, and the fifth mutual prime secret value belongs to the terminal domain mutual prime secret value set.
18. The method according to claim 17, characterized in that After receiving the control node response information sent by the registration node, the method further includes: Calculate a control node signature digest based on a result of a modulo operation of the second control node public key, the control node initial public key, and the second control node public key; Calculating a gateway domain initial key based on the gateway domain encryption key and the fourth mutually prime secret value; and calculating a terminal domain initial key based on the terminal domain encryption key and the fifth mutually prime secret value; Verify the control node response information based on the control node intermediate key, the gateway domain initial key, the terminal domain initial key, the first control node public key, the control node signature summary, the modulus operation result of the second control node public key and the registration node master public key; After the verification is passed, the control node master private key is generated based on the gateway domain initial key, the control node intermediate key and the control node initial private key corresponding to the control node initial public key.
19. A data transmission method, characterized in that: Applied to a registered node, the method comprises: Generate a terminal registration key based on the terminal initial public key sent by the terminal; The terminal registration key is sent to the terminal so that the terminal generates session key information based on the terminal registration key; the message to be transmitted is encrypted based on the session key information to obtain an encrypted message; the terminal signature information is generated based on the session key information, the encrypted message and the terminal master private key; the first information is sent to the gateway so that the gateway verifies the first information after receiving the first information, and after the verification is passed, generates the second information based on the first information, and sends the second information to the control node; wherein the terminal master private key is generated by the terminal based on the terminal registration key; the first information includes the key information, the encrypted message and the terminal signature information.
20. The method of claim 19, wherein: The terminal registration key includes a first terminal public key, a second terminal public key and a terminal intermediate key; generating a terminal registration key based on an initial terminal public key sent by the terminal includes: In response to a terminal registration request sent by the terminal and carrying the initial public key of the terminal, randomly generate a first terminal private key, and generate a first terminal public key corresponding to the first terminal private key; Generate the second terminal public key based on the terminal initial public key and the first terminal private key; Generate the terminal intermediate key based on the terminal domain initial key, the first terminal private key, the terminal initial public key, the second terminal public key and the registration node master private key; Sending terminal response information to the terminal, so that the terminal calculates a terminal signature digest based on a result of a modulo operation of the second terminal public key, the terminal initial public key, and the second terminal public key; calculating a terminal domain initial key based on the terminal domain encryption key and the first coprime secret value; verifying the terminal response information based on the terminal intermediate key, the terminal domain initial key, the first terminal public key, the terminal signature digest, a result of a modulo operation of the second terminal public key, and the registration node master public key; and after the verification is passed, generating the terminal master private key based on the terminal domain initial key, the terminal intermediate key, and the terminal initial private key corresponding to the terminal initial public key; Among them, the terminal response information includes the first terminal public key, the second terminal public key, the terminal intermediate key, the first mutual prime secret value, the terminal domain encryption key and the control node initial public key; the first mutual prime secret value belongs to the terminal domain mutual prime secret value set.
21. The method of claim 20, wherein: Generate the endpoint domain encryption key in the following way: After generating the terminal domain initial key, determining a second mutual prime secret value product based on a second number of terminal mutual prime secret values; Determine a terminal domain key numerator and an inverse element of the terminal domain key numerator of each terminal mutual prime secret value based on the product of the second mutual prime secret values; Determine a terminal domain key variable of each terminal mutually prime secret value based on the terminal domain key numerator and the inverse element of the terminal domain key numerator; Determine terminal domain key intermediate parameters based on terminal domain key variables of all terminal mutually prime secret values; The terminal domain encryption key is generated based on the terminal domain key intermediate parameter and the terminal domain initial key.
22. The method according to claim 21, characterized in that Also includes: In response to the terminal adjustment request sent by the control node, determining a target terminal coprime secret value corresponding to the adjusted terminal; Determining and adjusting intermediate parameters based on the target terminal mutually prime secret value; generating a new terminal domain key intermediate parameter based on the terminal domain key intermediate parameter and the adjustment intermediate parameter; Based on the new terminal domain key intermediate parameter and the new terminal domain initial key, a new terminal domain encryption key is generated, and an update message carrying the new terminal domain encryption key is sent to each terminal, so that each terminal updates the terminal domain initial key after verifying the update message.
23. A data transmission method and system, characterized in that: The system includes a terminal, a gateway, a control node and a registration node; wherein: The terminal is used to send an initial public key of the terminal to the registration node; The registration node is used to generate a terminal registration key based on the terminal initial public key, and send the terminal registration key to the terminal; The terminal is further configured to generate session key information based on the terminal registration key; wherein the terminal registration key is key information generated by a registration node based on an initial terminal public key sent by the terminal; encrypt a message to be transmitted based on the session key information to obtain an encrypted message; generate terminal signature information based on the session key information, the encrypted message and a terminal master private key; wherein the terminal master private key is generated by the terminal based on the terminal registration key; send first information to a gateway; wherein the first information includes the key information, the encrypted message and the terminal signature information; The gateway is configured to verify the first information, and after the verification is successful, generate second information based on the first information; and send the second information to the control node; The control node is used to verify the second information and determine the message to be transmitted after the verification is successful.